/**
 * Unified Header Styles
 * ======================
 *
 * New transparent floating header design system.
 * Structure: Logo + Search (left) | Nav Links (center) | Icons + Profile (right)
 *
 * Usage: Include this CSS and use the AppHeader component
 */

/* =============================================================================
   CSS VARIABLES
   ============================================================================= */

:root {
    --header-height: 72px;
    --header-bg: transparent;
    --header-text: rgba(255, 255, 255, 0.95);
    --header-text-muted: rgba(255, 255, 255, 0.6);
    --header-accent: #D9A520;
    --header-accent-hover: #E8B730;
    --header-search-bg: rgba(255, 255, 255, 0.08);
    --header-search-bg-focus: rgba(255, 255, 255, 0.12);
    --header-border: rgba(255, 255, 255, 0.1);
    --header-icon-size: 24px;
    --header-avatar-size: 40px;
}

/* =============================================================================
   MAIN HEADER CONTAINER
   ============================================================================= */

.unified-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    font-family: var(--font-sans, 'Inter', -apple-system, BlinkMacSystemFont, sans-serif);

    /* Subtle gradient fade for transparency over hero images */
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.5) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0) 100%
    );
}

.unified-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 24px;
    max-width: 1920px;
    margin: 0 auto;
}

/* =============================================================================
   LEFT SECTION: Logo + Search
   ============================================================================= */

.unified-header__left {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 0 0 auto;
}

/* Logo */
.unified-header__logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.unified-header__logo:hover {
    opacity: 0.85;
}

.unified-header__logo-img {
    height: 48px;
    width: auto;
}

.unified-header__logo-text {
    font-family: var(--font-serif, 'Libre Baskerville', Georgia, serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--header-text);
    margin-left: 12px;
}

/* Search Bar */
.unified-header__search {
    position: relative;
    display: flex;
    align-items: center;
}

.unified-header__search-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--header-text-muted);
    pointer-events: none;
    transition: color 0.2s ease;
}

.unified-header__search-input {
    width: 280px;
    padding: 10px 16px 10px 42px;
    background: var(--header-search-bg);
    border: 1px solid transparent;
    border-radius: 24px;
    color: var(--header-text);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}

.unified-header__search-input::placeholder {
    color: var(--header-text-muted);
}

.unified-header__search-input:focus {
    background: var(--header-search-bg-focus);
    border-color: var(--header-accent);
}

.unified-header__search-input:focus + .unified-header__search-icon,
.unified-header__search:focus-within .unified-header__search-icon {
    color: var(--header-accent);
}

/* =============================================================================
   CENTER SECTION: Navigation Links
   ============================================================================= */

.unified-header__center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
}

.unified-header__nav {
    display: flex;
    align-items: center;
    gap: 40px;
}

.unified-header__nav-link {
    position: relative;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--header-text);
    text-decoration: none;
    padding: 6px 0;
    transition: color 0.2s ease;
}

.unified-header__nav-link:hover,
.unified-header__nav-link--active {
    color: var(--header-accent);
}

/* Active indicator underline */
.unified-header__nav-link--active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--header-accent);
    border-radius: 1px;
}

/* =============================================================================
   RIGHT SECTION: Icons + Profile
   ============================================================================= */

.unified-header__right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 0 0 auto;
    position: relative;
}

/* Icon Buttons (Invite, Notifications, etc.) */
.unified-header__icon-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--header-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.unified-header__icon-btn:hover {
    color: var(--header-text);
    background: rgba(255, 255, 255, 0.08);
}

.unified-header__icon-btn svg {
    width: var(--header-icon-size);
    height: var(--header-icon-size);
}

/* Notification Badge */
.unified-header__badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 10px;
    height: 10px;
    background: #EF4444;
    border: 2px solid var(--color-bg, #1a1a2e);
    border-radius: 50%;
    pointer-events: none;
}

.unified-header__badge--count {
    width: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 10px;
    font-weight: 600;
    line-height: 14px;
    text-align: center;
    top: 0;
    right: -2px;
}

/* Profile Avatar Button */
.unified-header__profile {
    position: relative;
}

.unified-header__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--header-avatar-size);
    height: var(--header-avatar-size);
    background: linear-gradient(135deg, #D9A520 0%, #B8860B 100%);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-serif, 'Libre Baskerville', Georgia, serif);
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.unified-header__avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 0 3px rgba(217, 165, 32, 0.35);
}

.unified-header__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Glass Pill Container */
.unified-header__glass-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
}

.unified-header__glass-pill .unified-header__icon-btn {
    width: 36px;
    height: 36px;
}

.unified-header__glass-pill .unified-header__avatar {
    width: 32px;
    height: 32px;
    font-size: 13px;
}

/* Profile Dropdown */
.unified-header__dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 220px;
    background: rgba(30, 35, 40, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 2001;
}

.unified-header__dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.unified-header__dropdown-header {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.unified-header__dropdown-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--header-text);
}

.unified-header__dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 4px 0;
}

.unified-header__dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--header-text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.15s ease;
}

.unified-header__dropdown-item:hover {
    color: var(--header-text);
    background: rgba(255, 255, 255, 0.05);
}

.unified-header__dropdown-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.unified-header__dropdown-item--danger {
    color: #EF4444;
}

.unified-header__dropdown-item--danger:hover {
    color: #F87171;
    background: rgba(239, 68, 68, 0.1);
}

/* =============================================================================
   COMMAND PALETTE - Cinematic OS Design
   ============================================================================= */

.command-palette {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.command-palette.open {
    opacity: 1;
    visibility: visible;
}

.command-palette__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 9, 11, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.command-palette__modal {
    position: relative;
    width: 100%;
    max-width: 680px;
    max-height: 72vh;
    margin: 0 20px;
    background: rgba(24, 24, 27, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 24px 80px rgba(0, 0, 0, 0.7),
        0 0 120px rgba(217, 165, 32, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(-20px) scale(0.98);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.command-palette.open .command-palette__modal {
    transform: translateY(0) scale(1);
}

/* Header with Teacher Input */
.command-palette__header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.command-palette__input-wrapper {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

/* Gold Glow on Focus */
.command-palette__input-wrapper:focus-within {
    border-color: rgba(217, 165, 32, 0.4);
    box-shadow: 0 0 0 3px rgba(217, 165, 32, 0.1);
    background: rgba(217, 165, 32, 0.03);
}

.command-palette__input-wrapper svg {
    width: 22px;
    height: 22px;
    color: rgba(161, 161, 170, 0.7);
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.command-palette__input-wrapper:focus-within svg {
    color: var(--header-accent);
}

.command-palette__input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 18px;
    font-weight: 400;
    font-family: inherit;
    color: #fafafa;
    caret-color: var(--header-accent);
    letter-spacing: -0.01em;
}

/* Cycling placeholder animation - brighter for readability */
.command-palette__input::placeholder {
    color: rgba(161, 161, 170, 0.9);
    transition: opacity 0.3s ease;
}

.command-palette__input.placeholder-fade::placeholder {
    opacity: 0;
}

.command-palette__shortcut {
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    color: rgba(161, 161, 170, 0.7);
}

/* Body & Sections */
.command-palette__body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0 12px;
}

.command-palette__section {
    padding: 0 12px;
    margin-bottom: 8px;
}

.command-palette__section:last-child {
    margin-bottom: 0;
}

.command-palette__section-title {
    padding: 10px 14px 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(161, 161, 170, 0.5);
}

.command-palette__items {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Item Rows */
.command-palette__item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    background: transparent;
    border: none;
    border-left: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
    margin: 0 2px;
}

.command-palette__item:hover {
    background: rgba(255, 255, 255, 0.04);
}

/* Active/Selected State - Gold Accent */
.command-palette__item--selected {
    background: rgba(217, 165, 32, 0.08) !important;
    border-left-color: var(--header-accent);
}

.command-palette__item--selected .command-palette__item-text {
    color: #fff;
}

.command-palette__item-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
}

.command-palette__item-text {
    flex: 1;
    font-size: 14px;
    font-weight: 450;
    color: rgba(250, 250, 250, 0.9);
    letter-spacing: -0.01em;
}

.command-palette__item-text strong {
    color: var(--header-accent);
    font-weight: 600;
}

/* Category Pills with Color Coding */
.command-palette__item-category {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Default category style */
.command-palette__item-category {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(161, 161, 170, 0.8);
}

/* Date: Blue tint */
.command-palette__item-category--date {
    background: rgba(59, 130, 246, 0.12);
    color: rgb(96, 165, 250);
}

/* Location: Emerald tint */
.command-palette__item-category--location {
    background: rgba(16, 185, 129, 0.12);
    color: rgb(52, 211, 153);
}

/* Status: Orange/Amber tint */
.command-palette__item-category--status {
    background: rgba(251, 146, 60, 0.12);
    color: rgb(251, 146, 60);
}

/* Event: Purple tint */
.command-palette__item-category--event {
    background: rgba(168, 85, 247, 0.12);
    color: rgb(192, 132, 252);
}

/* Search: Gold tint */
.command-palette__item-category--search {
    background: rgba(217, 165, 32, 0.12);
    color: rgb(217, 165, 32);
}

/* Person: Cyan tint */
.command-palette__item-category--person {
    background: rgba(34, 211, 238, 0.12);
    color: rgb(34, 211, 238);
}

/* Empty State */
.command-palette__empty {
    padding: 16px;
    text-align: center;
    color: rgba(161, 161, 170, 0.5);
    font-size: 13px;
}

/* Jump To Section (Zero State Navigation) */
.command-palette__jump-to {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 0 14px;
}

.command-palette__jump-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.command-palette__jump-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.command-palette__jump-item--selected {
    background: rgba(217, 165, 32, 0.08);
    border-color: rgba(217, 165, 32, 0.3);
}

.command-palette__jump-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    color: rgba(161, 161, 170, 0.8);
}

.command-palette__jump-icon svg {
    width: 16px;
    height: 16px;
}

.command-palette__jump-text {
    font-size: 13px;
    font-weight: 500;
    color: rgba(250, 250, 250, 0.85);
}

/* Footer */
.command-palette__footer {
    padding: 12px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
}

.command-palette__hint {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 12px;
    color: rgba(161, 161, 170, 0.5);
}

.command-palette__hint kbd {
    padding: 3px 7px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 500;
    margin-right: 4px;
    color: rgba(161, 161, 170, 0.7);
}

/* =============================================================================
   MOBILE COMMAND PALETTE (THE CORTEX)
   Full-screen navigation hub on mobile devices
   ============================================================================= */

/* Hide header icons on mobile - moved to Cortex */
@media (max-width: 768px) {
    .unified-header__icon-btn--hide-mobile {
        display: none !important;
    }
}

/* Mobile Navigation Grid - Hidden on desktop */
.command-palette__mobile-nav,
.command-palette__mobile-utilities {
    display: none;
}

/* Desktop-only sections - Hidden on mobile */
@media (max-width: 768px) {
    .command-palette__desktop-only {
        display: none !important;
    }

    .command-palette__mobile-nav,
    .command-palette__mobile-utilities {
        display: block;
    }
}

/* Mobile Command Palette - Full Screen */
@media (max-width: 768px) {
    .command-palette {
        padding-top: 0;
        align-items: stretch;
    }

    .command-palette__modal {
        max-width: 100%;
        max-height: 100%;
        height: 100%;
        margin: 0;
        border-radius: 0;
        border: none;
    }

    .command-palette__header {
        padding: 16px 18px;
        padding-top: calc(env(safe-area-inset-top) + 16px);
    }

    .command-palette__input {
        font-size: 17px;
    }

    .command-palette__shortcut {
        display: none;
    }

    .command-palette__body {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .command-palette__footer {
        display: none;
    }

    .command-palette__item {
        padding: 12px;
    }
}

/* Mobile Navigation Grid (2x2) */
.command-palette__nav-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 0 14px;
}

.command-palette__nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.command-palette__nav-item:hover,
.command-palette__nav-item:active {
    background: rgba(217, 165, 32, 0.1);
    border-color: rgba(217, 165, 32, 0.3);
    transform: scale(0.98);
}

.command-palette__nav-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    color: var(--header-accent, #D9A520);
}

.command-palette__nav-icon svg {
    width: 32px;
    height: 32px;
}

.command-palette__nav-text {
    font-size: 13px;
    font-weight: 600;
    color: rgba(250, 250, 250, 0.9);
    text-align: center;
}

/* Mobile Utilities Row */
.command-palette__utilities-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 14px;
}

.command-palette__utility-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    color: rgba(250, 250, 250, 0.9);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    position: relative;
}

.command-palette__utility-item:hover,
.command-palette__utility-item:active {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.command-palette__utility-item svg {
    width: 18px;
    height: 18px;
    color: var(--header-accent, #D9A520);
}

.command-palette__utility-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #EF4444;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Close button for Cortex */
.command-palette__close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.command-palette__close:hover,
.command-palette__close:active {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.95);
}

.command-palette__close svg {
    width: 18px;
    height: 18px;
}

/* Mobile Cortex layout */
@media (max-width: 768px) {
    .command-palette__header {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .command-palette__close {
        display: flex;
    }

    .command-palette__input-wrapper {
        flex: 1;
    }

    /* Hide backdrop touch hint on mobile */
    .command-palette__backdrop {
        background: rgba(9, 9, 11, 0.95);
    }
}

/* =============================================================================
   VARIANT: Dashboard (with more prominent actions)
   ============================================================================= */

.unified-header--dashboard .unified-header__nav {
    gap: 32px;
}

/* =============================================================================
   VARIANT: Page (with title in center)
   ============================================================================= */

.unified-header--page .unified-header__center {
    flex: 1 1 auto;
}

.unified-header__page-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-serif, 'Libre Baskerville', Georgia, serif);
    font-size: 1.25rem;
    font-weight: 400;
    font-style: italic;
    color: var(--header-accent);
    margin: 0;
}

.unified-header__page-title svg {
    width: 24px;
    height: 24px;
    opacity: 0.8;
}

/* Back Button */
.unified-header__back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--header-border);
    border-radius: 8px;
    color: var(--header-text);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.unified-header__back-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--header-accent);
    color: var(--header-accent);
}

.unified-header__back-btn svg {
    width: 16px;
    height: 16px;
}

/* =============================================================================
   VARIANT: Admin (with admin badge)
   ============================================================================= */

.unified-header__admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(217, 165, 32, 0.15);
    border: 1px solid rgba(217, 165, 32, 0.3);
    border-radius: 6px;
    color: var(--header-accent);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.unified-header__admin-badge svg {
    width: 14px;
    height: 14px;
}

/* =============================================================================
   MOBILE RESPONSIVENESS
   ============================================================================= */

@media (max-width: 1200px) {
    .unified-header__nav {
        gap: 24px;
    }

    .unified-header__search-input {
        width: 220px;
    }
}

@media (max-width: 1024px) {
    .unified-header__center {
        display: none;
    }

    .unified-header__left {
        flex: 1;
    }

    .unified-header__search-input {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .unified-header__inner {
        padding: 0 16px;
    }

    .unified-header__left {
        gap: 16px;
    }

    .unified-header__search {
        display: none;
    }

    .unified-header__logo-text {
        display: none;
    }

    .unified-header__right {
        gap: 12px;
    }

    .unified-header__icon-btn {
        width: 36px;
        height: 36px;
    }

    .unified-header__avatar {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}

/* =============================================================================
   MOBILE MENU (hidden by default, shown on mobile)
   ============================================================================= */

/* Hamburger menu button - Hidden on mobile since Cortex replaces it */
.unified-header__mobile-menu-btn {
    display: none;
    padding: 8px;
    background: transparent;
    border: none;
    color: var(--header-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.unified-header__mobile-menu-btn:hover {
    color: var(--header-accent);
}

/* Show hamburger on tablet (768-1024px) where Cortex isn't full-screen */
@media (min-width: 769px) and (max-width: 1024px) {
    .unified-header__mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Hide hamburger on mobile - Cortex (search icon) is the primary nav */
@media (max-width: 768px) {
    .unified-header__mobile-menu-btn {
        display: none !important;
    }
}

.unified-header__mobile-menu-btn svg {
    width: 24px;
    height: 24px;
}

/* Mobile Menu Overlay */
.unified-header__mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.unified-header__mobile-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.unified-header__mobile-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 85%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.unified-header__mobile-overlay.open .unified-header__mobile-panel {
    transform: translateX(0);
}

.unified-header__mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.unified-header__mobile-title {
    font-family: var(--font-serif, 'Libre Baskerville', Georgia, serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--header-accent);
}

.unified-header__mobile-close {
    padding: 8px;
    background: transparent;
    border: none;
    color: var(--header-text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
}

.unified-header__mobile-close:hover {
    color: var(--header-text);
}

.unified-header__mobile-close svg {
    width: 24px;
    height: 24px;
}

.unified-header__mobile-nav {
    flex: 1;
    padding: 16px 0;
}

.unified-header__mobile-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    color: var(--header-text);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.unified-header__mobile-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--header-accent);
    border-left-color: var(--header-accent);
}

.unified-header__mobile-link.active {
    background: rgba(217, 165, 32, 0.15);
    color: var(--header-accent);
    border-left-color: var(--header-accent);
}

.unified-header__mobile-link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.unified-header__mobile-link-icon svg {
    width: 20px;
    height: 20px;
}

.unified-header__mobile-link-text {
    font-size: 15px;
    font-weight: 500;
}

/* Body scroll lock for mobile menu */
body.mobile-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* =============================================================================
   BODY OFFSET (to prevent content hiding under fixed header)
   ============================================================================= */

body.has-unified-header {
    padding-top: var(--header-height);
}

/* Optional: Remove padding if hero goes behind header */
body.has-unified-header.hero-behind-header {
    padding-top: 0;
}

/* =============================================================================
   DROPDOWN POSITIONING (for profile dropdown integration)
   ============================================================================= */

.unified-header__profile .profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 280px;
}

/* =============================================================================
   NOTIFICATION DROPDOWN (positioned outside header for z-index)
   ============================================================================= */

.notification-dropdown-wrapper {
    position: fixed;
    z-index: 1001;
}

.notification-dropdown-wrapper .notification-dropdown {
    background: var(--color-bg, #1a1a2e);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    min-width: 320px;
    max-width: 400px;
    max-height: 480px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.notification-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.notification-dropdown-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--header-text);
}

.notification-mark-all-btn {
    background: transparent;
    border: none;
    color: var(--header-accent);
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.notification-mark-all-btn:hover {
    background: rgba(217, 165, 32, 0.1);
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--header-text-muted);
    font-size: 14px;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s;
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.notification-item.unread {
    background: rgba(217, 165, 32, 0.08);
}

.notification-item.unread:hover {
    background: rgba(217, 165, 32, 0.12);
}

.notification-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--header-accent);
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-content p {
    margin: 0 0 4px;
    font-size: 13px;
    color: var(--header-text);
    line-height: 1.4;
}

.notification-time {
    font-size: 11px;
    color: var(--header-text-muted);
}

/* =============================================================================
   TROPHY DRAWER (slide-out panel for quick trophy view)
   ============================================================================= */

.trophy-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 360px;
    max-width: 90vw;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
    z-index: 2001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.trophy-drawer.open {
    transform: translateX(0);
}

.trophy-drawer__overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.trophy-drawer__overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.trophy-drawer__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.trophy-drawer__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-serif, 'Libre Baskerville', Georgia, serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--header-accent, #D9A520);
    margin: 0;
}

.trophy-drawer__title svg {
    width: 24px;
    height: 24px;
}

.trophy-drawer__close {
    padding: 8px;
    background: transparent;
    border: none;
    color: var(--header-text-muted, rgba(255, 255, 255, 0.6));
    cursor: pointer;
    transition: color 0.2s ease;
    border-radius: 8px;
}

.trophy-drawer__close:hover {
    color: var(--header-text, #fff);
    background: rgba(255, 255, 255, 0.1);
}

.trophy-drawer__close svg {
    width: 20px;
    height: 20px;
}

.trophy-drawer__content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    -webkit-overflow-scrolling: touch;
}

.trophy-drawer__loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    color: var(--header-text-muted, rgba(255, 255, 255, 0.6));
}

.trophy-drawer__spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(217, 165, 32, 0.2);
    border-top-color: var(--header-accent, #D9A520);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

/* Stats row */
.trophy-drawer__stats {
    display: flex;
    justify-content: space-between;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    margin-bottom: 20px;
}

.trophy-drawer__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.trophy-drawer__stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--header-accent, #D9A520);
    font-family: var(--font-serif, 'Libre Baskerville', Georgia, serif);
}

.trophy-drawer__stat-label {
    font-size: 11px;
    color: var(--header-text-muted, rgba(255, 255, 255, 0.5));
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Section styling */
.trophy-drawer__section {
    margin-bottom: 20px;
}

.trophy-drawer__section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--header-text-muted, rgba(255, 255, 255, 0.5));
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
}

/* Trophy list */
.trophy-drawer__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trophy-drawer__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: background 0.2s;
}

.trophy-drawer__item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.trophy-drawer__item-icon {
    font-size: 28px;
    line-height: 1;
}

.trophy-drawer__item-info {
    display: flex;
    flex-direction: column;
}

.trophy-drawer__item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--header-text, #fff);
}

.trophy-drawer__item-tier {
    font-size: 11px;
    color: var(--header-text-muted, rgba(255, 255, 255, 0.5));
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tier colors */
.trophy-drawer__item.tier-bronze .trophy-drawer__item-tier { color: #CD7F32; }
.trophy-drawer__item.tier-silver .trophy-drawer__item-tier { color: #C0C0C0; }
.trophy-drawer__item.tier-gold .trophy-drawer__item-tier { color: #FFD700; }
.trophy-drawer__item.tier-platinum .trophy-drawer__item-tier { color: #E5E4E2; }
.trophy-drawer__item.tier-special .trophy-drawer__item-tier { color: #9370DB; }

/* Next up progress */
.trophy-drawer__next {
    padding: 16px;
    background: rgba(217, 165, 32, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(217, 165, 32, 0.2);
}

.trophy-drawer__next-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.trophy-drawer__next-icon {
    font-size: 32px;
    line-height: 1;
}

.trophy-drawer__next-info {
    display: flex;
    flex-direction: column;
}

.trophy-drawer__next-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--header-text, #fff);
}

.trophy-drawer__next-progress {
    font-size: 12px;
    color: var(--header-accent, #D9A520);
}

.trophy-drawer__progress-bar {
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.trophy-drawer__progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--header-accent, #D9A520) 0%, #F4D03F 100%);
    border-radius: 4px;
    transition: width 0.5s ease-out;
}

/* Empty states */
.trophy-drawer__empty,
.trophy-drawer__empty-section {
    text-align: center;
    padding: 32px 20px;
    color: var(--header-text-muted, rgba(255, 255, 255, 0.5));
}

.trophy-drawer__empty a {
    color: var(--header-accent, #D9A520);
    text-decoration: none;
}

.trophy-drawer__empty a:hover {
    text-decoration: underline;
}

.trophy-drawer__hint {
    font-size: 13px;
    margin-top: 8px;
    opacity: 0.7;
}

/* Footer */
.trophy-drawer__footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.trophy-drawer__view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background: var(--header-accent, #D9A520);
    color: #1a1a2e;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.trophy-drawer__view-all:hover {
    background: #E8B824;
    transform: translateY(-1px);
}

.trophy-drawer__view-all svg {
    transition: transform 0.2s;
}

.trophy-drawer__view-all:hover svg {
    transform: translateX(4px);
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .trophy-drawer {
        width: 100%;
        max-width: 100%;
    }

    .trophy-drawer__stats {
        padding: 12px;
    }

    .trophy-drawer__stat-value {
        font-size: 20px;
    }
}
