/**
 * header.css - 공통 헤더/네비/푸터 스타일
 */

/* ===== 상단 정보 바 ===== */
.top-info {
	position: sticky;
    top: 0;
    z-index: 101;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 8px 20px;
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
[data-theme="dark"] .top-info { background: rgba(255, 255, 255, 0.03); }
.top-info .rates { color: var(--text-secondary); }
.top-info .rates span:first-child { color: #e91e63; font-weight: 600; }
.top-info .user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}
.top-info .user-menu a {
    color: var(--text-link);
    text-decoration: none;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}
.top-info .user-menu a:hover {
    background: rgba(0,0,0,0.05);
}
[data-theme="dark"] .top-info .user-menu a:hover {
    background: rgba(255,255,255,0.1);
}
.top-info .user-menu .highlight {
    color: #e91e63;
}
.top-info .user-menu .separator {
    color: var(--text-muted);
    opacity: 0.3;
    padding: 0;
}
.top-info .user-menu .separator:hover {
    background: transparent;
}
.top-info .user-menu .btn-charge {
    background: #10b981;
    color: #fff !important;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
}
.top-info .user-menu .btn-charge:hover {
    background: #059669;
}

/* ===== 헤더 ===== */
.header {
    background: var(--bg-header);
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 37px;
    z-index: 100;
}
[data-theme="dark"] .header {
    background: rgba(15, 15, 26, 0.95);
    backdrop-filter: blur(20px);
}
.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ===== 로고 ===== */
a.logo {
    font-size: 1.3rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: flex;
    align-items: center;
}
a.logo .logo-img,
.header a.logo .logo-img,
.header .logo-img,
header .logo-img,
img.logo-img {
    height: 40px !important;
    width: auto !important;
    max-width: 120px !important;
    max-height: 40px !important;
    object-fit: contain !important;
}

/* ===== 메인 메뉴 ===== */
.main-menu { display: flex; gap: 30px; align-items: center; }
.main-menu > a, .main-menu .menu-dropdown > a {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.2s;
}
.main-menu > a:hover, .main-menu .menu-dropdown > a:hover { color: var(--primary); }
.main-menu > a.active, .main-menu .menu-dropdown > a.active { color: #e91e63; }

/* ===== 드롭다운 메뉴 ===== */
.menu-dropdown { position: relative; display: inline-block; }
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1000;
    border-radius: 8px;
    overflow: hidden;
    padding-top: 8px;  /* margin 대신 padding 사용 - 호버 유지 */
}
/* 드롭다운 호버 영역 확장 (갭 커버) */
.menu-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 10px;
}
[data-theme="light"] .dropdown-content { background: #fff; border: 1px solid var(--border-color); }
.dropdown-content a { color: #fff; padding: 12px 16px; display: block; text-decoration: none; font-size: 14px; }
[data-theme="light"] .dropdown-content a { color: var(--text-primary); }
.dropdown-content a:hover { background: #e91e63; color: #fff; }
.menu-dropdown:hover .dropdown-content { display: block; }

/* ===== 서브 네비게이션 ===== */
.sub-nav {
    background: var(--bg-nav);
    padding: 0 20px;
}
[data-theme="dark"] .sub-nav { background: rgba(102, 126, 234, 0.15); }
.sub-nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
}
.sub-nav a {
    color: rgba(255,255,255,0.85);
    padding: 12px 20px;
    font-size: 0.9rem;
    transition: all 0.2s;
    text-decoration: none;
}
.sub-nav a:hover { background: rgba(255,255,255,0.1); color: #fff; }
.sub-nav a.active { background: rgba(102,126,234,0.4); color: #fff; }

/* ===== 모바일 메뉴 ===== */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
}
.mobile-menu {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}
.mobile-menu.active { display: flex; }
.mobile-menu a { color: #fff; font-size: 1.2rem; text-decoration: none; padding: 12px 24px; }
.mobile-menu a:hover { color: #e91e63; }

/* ===== 푸터 ===== */
.footer {
    background: var(--bg-nav);
    color: rgba(255, 255, 255, 0.7);
    padding: 40px 20px;
    margin-top: 60px;
    text-align: center;
}
[data-theme="dark"] .footer { background: rgba(0, 0, 0, 0.3); }
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-info { margin-bottom: 20px; }
.footer-info p { margin-bottom: 8px; font-size: 0.9rem; }
.footer-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.footer-links a { color: rgba(255, 255, 255, 0.7); font-size: 0.85rem; text-decoration: none; }
.footer-links a:hover { color: #fff; }
.footer-copyright { font-size: 0.8rem; opacity: 0.6; }

/* ===== 반응형 - 태블릿 ===== */
@media (max-width: 1024px) {
    .main-menu { gap: 20px; }
}

/* ===== 반응형 - 모바일 ===== */
@media (max-width: 768px) {
    .top-info { flex-direction: column; text-align: center; }
    .header-inner { flex-direction: column; gap: 15px; }
    .main-menu { display: none; }
    .mobile-menu-btn { display: block; }
    .sub-nav { overflow-x: auto; }
    .sub-nav-inner { min-width: max-content; }
    .footer { padding: 30px 16px 80px; margin-top: 40px; }
}
