/* 헤더 컴포넌트 스타일 */
.main-header {
    background: #f8f8f4;
    color: #111;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: none;
}

.auth-notice {
    background: #fff8e1;
    color: #4a3b14;
    border-bottom: 1px solid #f0e2b4;
    padding: 10px 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.auth-notice strong {
    margin-right: 6px;
}

.auth-notice button {
    background: none;
    border: none;
    color: #4a3b14;
    cursor: pointer;
    font-weight: 600;
}

/* 공지 바 스타일 */
.notice-bar {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
}

.notice-bar.notice-info {
    background: #e3f2fd;
    color: #0d47a1;
    border-bottom: 1px solid #90caf9;
}

.notice-bar.notice-warning {
    background: #fff3e0;
    color: #e65100;
    border-bottom: 1px solid #ffb74d;
}

.notice-bar.notice-error {
    background: #ffebee;
    color: #c62828;
    border-bottom: 1px solid #ef5350;
}

.notice-content {
    flex: 1;
}

.notice-message {
    font-weight: 500;
}

.notice-message a {
    color: inherit;
    text-decoration: underline;
}

.notice-message a:hover {
    text-decoration: none;
}

.notice-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 14px;
    line-height: 1.5;
    cursor: pointer;
    padding: 4px 8px;
    opacity: 0.7;
    transition: opacity 0.2s;
    font-weight: 500;
}

.notice-close:hover {
    opacity: 1;
}

.navbar {
    padding: 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
}

/* 브랜드 로고 */
.nav-brand {
    flex-shrink: 0;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #111;
    font-weight: 700;
    font-size: 1.1rem;
    transition: color 0.2s ease;
}

.brand-link:hover {
    color: #4a5568;
}

.brand-icon {
    font-size: 1.3rem;
    opacity: 0.9;
}

.brand-text {
    color: #111;
}

/* 네비게이션 메뉴 */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    color: #1f2937;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover {
    background: #ececec;
    color: #111;
}

.nav-icon {
    font-size: 1.1rem;
}

/* 사용자 섹션 */
.nav-user {
    position: relative;
}

.login-section .btn-login {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    background: #e8e8e3;
    border: 1px solid #d6d6d0;
    border-radius: 18px;
    color: #111;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.btn-login:hover {
    background: #deded8;
    border-color: #c8c8c2;
}

/* 사용자 드롭다운 */
.user-dropdown {
    position: relative;
}

.user-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #ecece7;
    border: 1px solid #dcdcd6;
    border-radius: 18px;
    color: #111;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.user-button:hover {
    background: #e1e1db;
}

.user-avatar-image {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.3);
}

.user-avatar-default {
    width: 28px;
    height: 28px;
    background: #d8d8d0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* 기존 호환성 */
.user-avatar {
    width: 28px;
    height: 28px;
    background: #d8d8d0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.user-name {
    font-weight: 600;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.user-button.active .dropdown-arrow,
.admin-toggle.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* 드롭다운 메뉴 */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 240px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
    border: 1px solid #e8e8e0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    backdrop-filter: none;
    z-index: 1000;
}

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

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: white;
    border: 1px solid #e8e8e0;
    border-bottom: none;
    border-right: none;
    transform: rotate(45deg);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
}

.dropdown-item:hover {
    background: #f5f5f0;
    color: #111;
}

.dropdown-item:first-child {
    border-radius: 12px 12px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 12px 12px;
}

.dropdown-item.user-info {
    background: #f8f9fa;
    cursor: default;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.dropdown-item.user-info:hover {
    background: #f8f9fa;
    color: #333;
}

.dropdown-item.logout-btn {
    color: #dc3545;
}

.dropdown-item.logout-btn:hover {
    background: #fff5f5;
    color: #dc3545;
}

.item-icon {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.user-role {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-role.role-super-admin {
    background: #1f2937;
    color: #f5f5f5;
}

.user-role.role-admin {
    background: #374151;
    color: #f5f5f5;
}

.user-role.role-vip {
    background: #d6d6d0;
    color: #333;
}

.user-role.role-normal {
    background: #e9ecef;
    color: #666;
}

.user-email {
    font-size: 0.9rem;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-divider {
    height: 1px;
    background: #e9ecef;
    margin: 4px 0;
}

/* 네비게이션 관리 드롭다운 */
.nav-admin-dropdown {
    position: relative;
    display: inline-block;
}

.admin-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    background: none;
    color: #1f2937;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.admin-toggle:hover {
    background: #ececec;
    color: #111;
}

.admin-menu {
    left: 0;
    right: auto;
}

.admin-menu::before {
    left: 20px;
    right: auto;
}

/* 모바일 햄버거 메뉴 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: #e0ded6;
    border: 1px solid #d0ccc2;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: #1f2933;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: #d6d3c9;
    border-color: #c5c0b4;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

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

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

/* 반응형 디자인 */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 15px;
        min-height: 56px;
    }
    
    .brand-text {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        flex-direction: column;
        padding: 20px;
        gap: 1rem;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.3s ease;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    }
    
    .nav-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }
    
    .nav-link {
        justify-content: center;
        padding: 12px;
        border-radius: 8px;
        width: 100%;
    }
    
    .nav-user {
        width: 100%;
    }
    
    .login-section .btn-login {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
    }
    
    .user-button {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        margin-top: 10px;
        box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    }
    
    .dropdown-menu::before {
        display: none;
    }
    
    .user-name {
        max-width: none;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 10px;
    }
    
    .brand-link {
        font-size: 1.1rem;
    }
    
    .brand-icon {
        font-size: 1.3rem;
    }
}
