/* ==================== CSS VARIABLES ==================== */
:root {
    --title-gradient-start: #1f2a44;
    --title-gradient-end: #f2a83a;
    --title-font-size: 1.1rem;
    --title-font-size-mobile: 0.95rem;
    --title-font-size-small: 0.85rem;
    --title-font-weight: 700;
    --title-padding: 4px 12px;
    --title-padding-mobile: 2px 8px;
    --title-border-radius: 30px;
    --back-btn-bg: rgba(242, 168, 58, 0.1);
    --back-btn-hover-bg: rgba(242, 168, 58, 0.2);
    --back-btn-active-bg: rgba(242, 168, 58, 0.3);
    --back-btn-icon-color: #f2a83a;
    --mobile-header-bg: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    --desktop-header-bg: rgba(15, 23, 42, 0.95);
}

/* ==================== DESKTOP HEADER ==================== */
.desktop-header {
    position: sticky;
    top: 0;
    background: var(--desktop-header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(242, 168, 58, 0.15);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    height: 70px;
    min-height: 70px;
    max-height: 70px;
    overflow: hidden;
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    height: 100%;
}

.logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.5px;
    line-height: 1;
}

.logo-text .accent {
    color: #f2a83a;
}

.desktop-nav {
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px;
    border-radius: 60px;
}

.nav-link {
    padding: 8px 24px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    color: #94a3b8;
    transition: all 0.2s;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
}

.nav-link:hover {
    color: #f2a83a;
    background: rgba(242, 168, 58, 0.15);
}

.nav-link.active {
    background: linear-gradient(135deg, #f2a83a, #e5982b);
    color: #1f2a44;
}

.auth-section {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    height: 100%;
}

.btn-login,
.btn-register {
    padding: 8px 20px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    line-height: 1;
}

.btn-login {
    background: transparent;
    color: #94a3b8;
    border: 1px solid #334155;
}

.btn-login:hover {
    border-color: #f2a83a;
    color: #f2a83a;
    background: rgba(242, 168, 58, 0.1);
}

.btn-register {
    background: linear-gradient(135deg, #f2a83a, #e5982b);
    color: #1f2a44;
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(242, 168, 58, 0.3);
}

/* ==================== USER DROPDOWN ==================== */
.user-avatar {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
    border: 1px solid rgba(242, 168, 58, 0.2);
    height: 40px;
}

.user-avatar:hover {
    background: rgba(242, 168, 58, 0.15);
    border-color: rgba(242, 168, 58, 0.4);
}

.user-avatar i:first-child {
    font-size: 1.2rem;
    color: #f2a83a;
}

.user-avatar span {
    font-size: 0.85rem;
    font-weight: 500;
    color: white;
    line-height: 1;
}

.user-avatar i:last-child {
    font-size: 0.7rem;
    color: #94a3b8;
    transition: transform 0.2s;
}

.user-avatar:hover i:last-child {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 12px;
    background: linear-gradient(135deg, #1f2a44, #2d3a5e);
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    min-width: 240px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s ease;
    z-index: 10000;
    border: 1px solid rgba(242, 168, 58, 0.2);
    backdrop-filter: blur(10px);
}

.user-dropdown.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    display: block !important;
}

.dropdown-item {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    text-decoration: none;
    color: #e2e8f0;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: rgba(242, 168, 58, 0.15);
    color: #f2a83a;
    padding-left: 26px;
}

.dropdown-item i {
    width: 20px;
    color: #f2a83a;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 4px 0;
}

.logout-item {
    color: #ef4444 !important;
}

.logout-item i {
    color: #ef4444 !important;
}

.logout-item:hover {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #ef4444 !important;
}

/* ==================== MOBILE HEADER ==================== */
.mobile-header {
    display: none;
    position: sticky;
    top: 0;
    background: var(--mobile-header-bg);
    border-bottom: 1px solid rgba(242, 168, 58, 0.2);
    z-index: 1000;
    height: 60px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.mobile-header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 12px;
}

.mobile-back-btn {
    background: var(--back-btn-bg);
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.mobile-back-btn:hover {
    background: var(--back-btn-hover-bg);
    transform: scale(1.05);
}

.mobile-back-btn:active {
    transform: scale(0.95);
    background: var(--back-btn-active-bg);
}

.mobile-back-btn i {
    font-size: 1.2rem;
    color: var(--back-btn-icon-color);
    transition: transform 0.2s;
}

.mobile-back-btn:hover i {
    transform: translateX(-2px);
}

.mobile-page-title {
    flex: 1;
    text-align: center;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    padding: 0 8px;
}

.mobile-page-title span {
    font-size: var(--title-font-size);
    font-weight: var(--title-font-weight);
    background: linear-gradient(135deg, var(--title-gradient-start), var(--title-gradient-end));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.2;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: -0.3px;
    text-transform: capitalize;
    position: relative;
    padding: var(--title-padding);
    border-radius: var(--title-border-radius);
}

.mobile-placeholder {
    width: 38px;
    flex-shrink: 0;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .desktop-header {
        display: none;
    }
    
    .mobile-header {
        display: block;
    }
}

@media (min-width: 769px) {
    .mobile-header {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .mobile-header-container {
        padding: 0 12px;
        gap: 8px;
    }
    
    .mobile-back-btn {
        width: 34px;
        height: 34px;
    }
    
    .mobile-back-btn i {
        font-size: 1rem;
    }
    
    .mobile-page-title span {
        font-size: var(--title-font-size-mobile);
        padding: var(--title-padding-mobile);
    }
    
    .mobile-placeholder {
        width: 34px;
    }
}

@media (max-width: 380px) {
    .mobile-page-title span {
        font-size: var(--title-font-size-small);
        max-width: 140px;
        padding: 2px 6px;
    }
}

@supports (padding-top: env(safe-area-inset-top)) {
    .mobile-header {
        padding-top: env(safe-area-inset-top);
        height: calc(60px + env(safe-area-inset-top));
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-header {
    animation: fadeIn 0.3s ease;
}