/* =========================================
   다크 글래스 헤더 스타일 (Dark Glassmorphism)
   - 고급스러운 반투명 블랙
   - 몰입감 있는 디자인
   - 선명한 화이트 텍스트
========================================= */

/* =========================================
   헤더 기본 스타일
========================================= */
.header {
    position: relative;
    z-index: 999;

    /* 배경 이미지 설정 */
    background-image: url('/static/images/header.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    /* 유리 질감 테두리 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);

    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
}

/* =========================================
   헤더 좌측 (로고)
========================================= */
.header-left {
    flex: 1;
    display: flex;
    align-items: center;
}

/* 사용자 인사말 (밝은 노란색 유지) */
.header-greeting {
    color: #02360f;
    font-size: 0.95rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.header-greeting i {
    font-size: 1.1rem;
    color: #ff7700;
}

/* 모바일 햄버거 메뉴 (사이드바용) */
.mobile-menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 44px;
    height: 44px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: none;
}

/* 햄버거 아이콘 (화이트) */
.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 24px;
    margin: 0 auto;
}

.hamburger-icon span {
    display: block;
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* 메뉴 열렸을 때 X 모양 */
.mobile-menu-toggle.active .hamburger-icon span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* =========================================
   헤더 중앙 (로고)
========================================= */
.header-center {
    flex: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.header-logo:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: none;
}

/* 로고 아이콘 (화이트) */
.logo-icon {
    font-size: 28px;
    color: white;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

/* 로고 텍스트 */
.header-title {
    font-size: 22px;
    font-weight: 800;
    color: #1e3a5f;
    margin: 0;
    letter-spacing: -0.5px;
}

/* 고 글자 스타일 (1/2 크기) */
.title-circle {
    display: inline;
    font-size: 0.5em;
    vertical-align: middle;
    margin: 0 1px;
}

/* =========================================
   헤더 우측 (네비게이션)
========================================= */

.header-logo:hover .logo-icon {
    transform: none;
}
.header-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 0;
}

/* =========================================
   헤더 링크 스타일
========================================= */
.header-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none !important;
    color: #1e3a5f;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease;
    position: relative;
    border: 1px solid transparent;
}

.header-link:hover {
    color: inherit;
}

/* 헤더 대시보드 링크 */
.header-dashboard {
    background: linear-gradient(135deg, #FF6B35, #FF8E53);
    color: white !important;
    font-weight: 600;
    padding: 6px 14px;
}

.header-dashboard:hover {
    background: linear-gradient(135deg, #FF8E53, #FFD93D);
    color: white !important;
    transform: translateY(-1px);
}

.header-dashboard i {
    color: white;
}

.header-points {
    font-weight: 700;
}

/* 링크 아이콘 */
.link-icon {
    font-size: 18px;
}

/* =========================================
   헤더 분리선
========================================= */
.header-divider {
    width: 1px;
    height: 14px;
    background-color: rgba(255, 255, 255, 0.2);
    margin: 0 8px;
}

/* =========================================
   헤더 드롭다운 메뉴 (햄버거 버튼)
========================================= */
.header-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.header-dropdown-toggle {
    background: none;
    border: 1px solid transparent;
    color: rgba(12, 12, 12, 0.9);
    cursor: pointer;
    padding: 8px 12px;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.header-dropdown-toggle:hover {
    color: inherit;
}

/* 드롭다운 메뉴 (다크 테마) */
.header-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: rgba(30, 30, 40, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 180px;
    padding: 8px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.header-dropdown.active .header-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 드롭다운 메뉴 아이템 */
.header-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.header-dropdown-menu a:hover {
    background-color: transparent;
    color: white;
}

.header-dropdown-menu a i {
    width: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}

.header-dropdown-menu a:hover i {
    color: white;
}

/* 드롭다운 구분선 */
.header-dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
    margin: 8px 0;
}

/* 드롭다운 섹션 제목 */
.header-dropdown-section {
    padding: 8px 12px 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 관리자 링크 */
.header-dropdown-admin {
    color: #FFD93D !important;
}

.header-dropdown-admin:hover {
    background: rgba(255, 217, 61, 0.15) !important;
}

.header-dropdown-admin i {
    color: #FFD93D !important;
}

/* =========================================
   반응형 디자인 - 태블릿
========================================= */
@media (max-width: 1024px) {
    .header {
        padding: 0 20px;
    }

    .header-title {
        font-size: 20px;
    }

    .header-link .link-text {
        display: none;
    }

    .header-greeting {
        font-size: 0.85rem;
    }
}

/* =========================================
   반응형 디자인 - 모바일
========================================= */
@media (max-width: 768px) {
    .header {
        padding: 0 12px;
        height: 50px;
    }

    .header-greeting {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .header-center {
        flex: 2;
    }

    .header-logo {
        padding: 6px;
    }

    .logo-icon {
        font-size: 22px;
    }

    .header-title {
        font-size: 18px;
    }

    .header-nav {
        gap: 2px;
    }

    .header-link {
        padding: 8px 10px;
        font-size: 13px;
        min-height: 44px;
    }

    /* 로그인/로그아웃 텍스트 숨김 - 아이콘만 표시 */
    .header-link span,
    .header-link .link-text {
        display: none;
    }

    .header-dropdown-toggle {
        padding: 8px 10px;
        min-height: 44px;
        min-width: 44px;
    }

    .header-dropdown-menu {
        right: -8px;
        min-width: 200px;
    }

    .header-divider {
        margin: 0 4px;
    }
}

/* =========================================
   반응형 디자인 - 초소형 모바일
========================================= */
@media (max-width: 480px) {
    .header {
        padding: 0 8px;
    }

    .header-title {
        font-size: 16px;
    }

    /* 고 글자 - 모바일에서도 1/2 크기 유지 */
    .title-circle {
        font-size: 0.5em;
    }

    .logo-icon {
        font-size: 18px;
    }

    .header-link {
        padding: 8px;
        font-size: 12px;
    }

    .header-dropdown-toggle {
        padding: 8px;
    }
}

/* =========================================
   가로 모드(Landscape) 모바일
========================================= */
@media (max-height: 500px) and (orientation: landscape) {
    .header {
        height: 44px;
    }

    .header-title {
        font-size: 16px;
    }

    .header-dropdown-menu {
        max-height: 70vh;
        overflow-y: auto;
    }
}