/*타임스토푸~*/
.preload * {
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -ms-transition: none !important;
    -o-transition: none !important;
    transition: none !important;
}

body {
    opacity: 0;
    font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
    margin: 0;
    padding: 25px 25px;
    background-color: #efefef;
    color: #333;
    min-width: 1400px;
}

body.loaded {
    opacity: 1;
}

body.dark-mode {
    background-color: #2a2a2a;
    color: #eee;
}

body.dark-mode .header-container {
    background-color: #222222;
    border-bottom: 1px solid #333;
}

body.dark-mode .site-footer {
    background-color: transparent; 
    color: #999;
}

body.dark-mode .footer-top {
    border-bottom: 1px solid #333;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 800px;
    margin: 0 auto;
     box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 상단바 전체 스타일 */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    display: flex;
    justify-content: center;
}

.header-container {
    width: 1400px;
    background-color: #38aae1; 
    color: #fff;
    padding: 5px 20px; 
    border-radius: 15px 15px 0 0;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    transition: background-color 0.3s ease;
}

.header-left {
    display: flex;
    align-items: center;
    flex: 1;
}

/* 로고 스타일 */
.logo {
    display: flex;
    align-items: center;
    margin-right: 30px;
}

.logo-img {
    height: 40px; 
    margin-right: 10px;
}

.logo-title {
    font-size: 18px;
    font-weight: bold;
}

.logo-subtitle {
    font-size: 11px;
    color: #ccc;
}

/*main은 상단메뉴바 아래 본문란을 말함 PS.자주 잊어먹음ㅠㅠ!*/
main {
    width: 1400px; 
    margin: 0 auto; 
    box-sizing: border-box; 
    background-color: #ffffff;
    padding: 10px;
    border-radius: 0 0 15px 15px;
}

body.dark-mode main {
    background-color: #222222;
    color: #e0e0e0;
}

body.dark-mode main h1,
body.dark-mode main h2,
body.dark-mode mai a {
    color: #ffffff; 
}

.main-nav {
    flex: 1; 
    display: flex;
    justify-content: center; 
}

/* 메인 메뉴 스타일 */
.main-nav > ul { 
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

.main-nav li {
    position: relative;
    margin: 0 10px;
}

.main-nav a {
    font-size: 14px; 
    color: #fff;
    padding: 10px 0;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s ease;
}

.main-nav a i {
    font-size: 16px; 
}

.main-nav a:hover {
    color: #b4b4b4;
}

.logo-small-home {
    margin-left: -5px;
    margin-right: 0 !important;
}

/* N 배지 스타일 */
.badge {
    background-color: #f26522;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* 드롭다운 (하위 메뉴) 스타일 */
.dropdown {
    position: relative;
}

.dropdown-trigger {
    cursor: pointer;
}

.submenu {
    display: block;
    opacity: 0; 
    visibility: hidden; 
    transform: translateY(-15px); 
    transition: all 0.3s ease; 
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #333;
    color: #fff;
    width: 200px;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    padding: 10px 0;
}

.submenu li {
    margin: 0;
}

.submenu a {
    padding: 10px 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #444; /* 구분선 */
}

.submenu li:last-child a {
    border-bottom: none;
}

.submenu a i {
    margin-right: 10px;
    width: 16px;
    text-align: center;
}

.dropdown:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 우측 영역 스타일 */
.header-right {
    display: flex;
    align-items: center;
}

.header-icon {
    font-size: 20px;
    color: #fff;
    margin-right: 20px;
    cursor: pointer;
    transition: color 0.3s ease; /*자주 까먹는데 이부분은 마우스를 올리면 부드럽게 색을 바꿔주게함*/
}

.header-icon:hover {
    color: #b4b4b4;
}

.btn {
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

.btn-login {
    background-color: transparent;
    border: 1px solid rgba(255,255,255,0.5);
    color: #fff;
}

.btn-login:hover {
    color: #b4b4b4;
    border-color: #b4b4b4;
}
.badge-new {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background-color: #ff7f00;
    color: white;
    font-size: 10px;
    font-weight: bold;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    font-family: Arial, sans-serif;
}
.badge-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background-color: #27ae60;
    color: white;
    font-size: 10px;
    font-weight: bold;
    border-radius: 50%;
    margin-left: 6px; /* 상단 메뉴용 */
    margin-right: 0;
    vertical-align: middle;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    font-family: Arial, sans-serif;
}
/* 리스트 제목 앞 뱃지 간격 (기존 N뱃지도 함께 적용) */
.td-title .badge-new, .td-title .badge-edit {
    margin-right: 6px; 
    margin-left: 0;
}




/*칭호 시스템 CSS*/
.user-title-badge {
            display: inline-block; padding: 3px 10px; font-size: 12px; font-weight: bold;
            color: #ffffff !important;
            background-color: #2ecc71; border-radius: 12px; margin-bottom: 5px; vertical-align: middle;
        }
/* 댓글창 등 닉네임 옆에 붙을 때의 여백 */
.title-inline { margin-bottom: 0; margin-right: 6px; }

/* 스스로 빛나는 숨쉬는 후광 애니메이션 */
@keyframes adminGlow {
    0% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.4); }
    50% { box-shadow: 0 0 15px rgba(255, 215, 0, 1); }
    100% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.4); }
}

/* 관리자 전용 스페셜 칭호 뱃지 */
.title-관리자 {
    background-color: #2b2b2b !important;
    color: #ffd700 !important;
    border: 1px solid #ffd700 !important;
    font-weight: bold;
    animation: adminGlow 1.5s infinite alternate !important;
}
.title-세계수 { background-color: #2ecc71; color: white; } /* 세계수: 초록 */
.title-열매 { background-color: #e67e22; color: white; }     /* 열매: 주황 */
.title-나무 { background-color: #27ae60; color: white; }      /* 나무: 진녹색 */
.title-줄기 { background-color: #f1c40f; color: black; }      /* 줄기: 노랑 */
.title-새싹 { background-color: #56c95f !important; color: white ; }  /* 새싹: 연두 */
.title-주의요함 { background-color: #e74c3c; color: white; }   /* 주의요함: 빨강 */
.title-custom { background-color: #9b59b6 !important; color: white !important; }

/* ========================================================
   🌓 라이트 / 다크 통합 테마 변수 정의
   ======================================================== */

/* 1) 기본 상태: 라이트 모드 */
:root {
    --accent-blue: #2996e3;
    --accent-blue-hover: #1b82cc;
    --accent-blue-glow: rgba(41, 150, 227, 0.25);

    --search-bg: #ffffff;
    --search-select-bg: #f8fafc;
    --search-border: #e2e8f0;
    --search-border-hover: #cbd5e1;
    --search-text: #1e293b;
    --search-placeholder: #94a3b8;
    --search-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    
    /* 라이트 모드 셀렉트 화살표 색상 (슬레이트 그레이) */
    --search-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
}

/* 2) 다크 모드 활성화 상태 (body.dark-mode) */
body.dark-mode {
    --search-bg: #1e293b;
    --search-select-bg: #1e293b;
    --search-border: #334155;
    --search-border-hover: #475569;
    --search-text: #f8fafc;
    --search-placeholder: #64748b;
    --search-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);

    /* 다크 모드 셀렉트 화살표 색상 (포인트 블루) */
    --search-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%232996e3' stroke-width='2.2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
}

/* ========================================================
   🔍 검색 바 컴포넌트 스타일 (두 모드 공통 사용)
   ======================================================== */

.board-search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 36px auto;
    padding: 0 16px;
    max-width: 580px;
    width: 100%;
    box-sizing: border-box;
}

/* 셀렉트 드롭다운 */
.search-select {
    height: 44px;
    padding: 0 36px 0 14px;
    border: 1px solid var(--search-border);
    border-radius: 12px;
    background-color: var(--search-select-bg);
    color: var(--search-text);
    font-size: 14px;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    box-shadow: var(--search-shadow);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    
    appearance: none;
    -webkit-appearance: none;
    background-image: var(--search-arrow);
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
}

.search-select:hover {
    border-color: var(--search-border-hover);
}

.search-select:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px var(--accent-blue-glow);
}

.search-select option {
    background-color: var(--search-bg);
    color: var(--search-text);
}

/* 인풋 + 버튼 결합 박스 */
.search-input-box {
    flex: 1;
    display: flex;
    align-items: center;
    height: 44px;
    background-color: var(--search-bg);
    border: 1px solid var(--search-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--search-shadow);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-input-box:focus-within {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px var(--accent-blue-glow), 0 4px 12px var(--accent-blue-glow);
}

/* 인풋창 */
.search-input-box input {
    flex: 1;
    height: 100%;
    padding: 0 16px;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: var(--search-text);
}

.search-input-box input::placeholder {
    color: var(--search-placeholder);
    font-weight: 400;
}

/* 검색 버튼 */
.btn-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    margin-right: 4px;
    padding: 0 18px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-blue-hover) 100%);
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: -0.2px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(41, 150, 227, 0.3);
    transition: all 0.2s ease;
}

.btn-search:hover {
    filter: brightness(1.08);
    box-shadow: 0 4px 12px rgba(41, 150, 227, 0.45);
    transform: translateY(-1px);
}

.btn-search:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(41, 150, 227, 0.3);
}

.btn-search i {
    font-size: 12px;
}
