/* =========================================
   1. VARIABLES & THEME
   ========================================= */
:root {
  --bg: #0b1220;
  --card: rgba(255,255,255,.06);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.70);
  --muted2: rgba(255,255,255,.55);
  --border: rgba(255,255,255,.14);
  --accent: rgba(120,255,200,.9); 
  --cyan: #2ec8ff;
  --shadow: 0 20px 60px rgba(0,0,0,.45);
  --radius: 18px;
  --max: 1600px; 
  --nav-height: 70px;
}

/* =========================================
   2. RESET & GLOBAL BASE
   ========================================= */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

body {
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background:
    radial-gradient(900px 500px at 20% 10%, rgba(46, 200, 255, .18), transparent 60%),
    radial-gradient(700px 500px at 80% 30%, rgba(90, 255, 170, .14), transparent 55%),
    radial-gradient(900px 700px at 40% 85%, rgba(80, 140, 255, .12), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; transition: color 0.2s; }
a:hover { color: #fff; }

/* =========================================
   3. SHARED LAYOUT
   ========================================= */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 30px 20px;
}

/* =========================================
   4. SHARED COMPONENTS
   ========================================= */
.glass-card {
  background: linear-gradient(180deg, var(--card), transparent 120%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
  position: relative;
  overflow: hidden;
}
.glass-card:before {
  content:""; position:absolute; inset:-2px;
  background: radial-gradient(520px 220px at 20% 0%, rgba(46,200,255,.08), transparent 55%);
  pointer-events:none; filter: blur(10px); opacity: .9;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 8px 16px; border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.06);
  color: var(--text); font-weight: 600; font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn:hover { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.22); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: rgba(120,255,200,.12); border-color: rgba(120,255,200,.26); }
.btn-primary:hover { background: rgba(120,255,200,.18); border-color: rgba(120,255,200,.34); }

.btn-danger { background: rgba(255, 80, 80, 0.15); border-color: rgba(255, 80, 80, 0.3); color: #ff8080; }
.btn-danger:hover { background: rgba(255, 80, 80, 0.25); border-color: rgba(255, 80, 80, 0.5); }

.btn-fb:hover { color: #1877f2 !important; border-color: rgba(24, 119, 242, 0.4) !important; }
.btn-ig:hover { color: #E1306C !important; border-color: rgba(225, 48, 108, 0.4) !important; }
.btn-x:hover  { color: #fff !important; border-color: rgba(255, 255, 255, 0.6) !important; }
.btn-social-square { width: 42px; height: 42px; padding: 0 !important; }

.form-group { text-align: left; margin-bottom: 20px; }
.form-group label { display: block; margin-left: 10px; margin-bottom: 8px; font-size: 14px; color: var(--muted); font-weight: 500; }
.form-control { width: 100%; box-sizing: border-box; padding: 16px 20px; font-size: 16px; border-radius: 30px; background: rgba(0, 0, 0, 0.25); border: 1px solid rgba(255,255,255,0.1); color: #fff; outline: none; transition: 0.2s all; }
.form-control:focus { background: rgba(0, 0, 0, 0.4); border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.form-group a { color: var(--accent); font-weight: 500; }

@keyframes status-pulse {
    0% { box-shadow: 0 0 0 0 rgba(120, 255, 200, 0.6); }
    70% { box-shadow: 0 0 0 8px rgba(120, 255, 200, 0); }
    100% { box-shadow: 0 0 0 0 rgba(120, 255, 200, 0); }
}

/* =========================================
   5. NAVIGATION (MAIN HEADER)
   ========================================= */
.site-header { position: sticky; top: 0; z-index: 1000; background: rgba(11, 18, 32, 0.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.nav-inner { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; height: 60px; }
.nav-brand img { height: 32px; width: auto; display: block; }
.nav-items { display: flex; gap: 25px; align-items: center; font-size: 14px; font-weight: 500; }
.nav-items a { color: var(--muted); }
.nav-items a:hover, .nav-items a.active { color: var(--text); }
.nav-actions { display: flex; gap: 15px; align-items: center; }

.nav-toggle { display: none; font-size: 24px; cursor: pointer; color: var(--text); }
.mobile-menu { display: none; flex-direction: column; background: #0b1220; border-bottom: 1px solid var(--border); padding: 20px; position: absolute; top: 60px; left: 0; right: 0; z-index: 999; box-shadow: 0 10px 20px rgba(0,0,0,0.5); }
.mobile-menu.active { display: flex; }
.mobile-menu a { padding: 15px 0; font-size: 16px; border-bottom: 1px solid rgba(255,255,255,0.05); color: var(--text); }
.header-avatar { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); object-fit: cover; transition: border-color 0.2s; }
.user-dropdown:hover .header-avatar { border-color: var(--accent); }

/* =========================================
   6. HEADER UTILITIES
   ========================================= */
.btn-icon { padding: 8px 12px; color: var(--muted); }
.btn-icon:hover { color: #fff; background: rgba(255,255,255,0.1); }
.btn-admin { padding: 8px 12px; color: #ff8080; border-color: rgba(255,100,100,0.3); }
.btn-admin:hover { background: rgba(255, 80, 80, 0.15); border-color: #ff8080; color: #ff8080; }
.mobile-divider { border: 0; border-top: 1px solid rgba(255,255,255,0.1); margin: 5px 0; }
.mobile-admin-link { color: #ff8080 !important; }
.mobile-logout-link { color: var(--muted) !important; }

.user-dropdown { position: relative; display: flex; align-items: center; padding: 10px 0; cursor: pointer; }
.dropdown-menu { display: none; position: absolute; top: 55px; right: 0; width: 200px; background: #0f172a; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 10px; z-index: 1001; }
.dropdown-menu::before { content: ""; position: absolute; top: -20px; left: 0; right: 0; height: 25px; background: transparent; }
.user-dropdown:hover .dropdown-menu { display: block; }
.dropdown-header { padding: 8px 12px; font-size: 11px; font-weight: 700; color: var(--muted2); text-transform: uppercase; letter-spacing: 0.5px; }
.dropdown-menu a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; font-size: 14px; color: var(--muted); border-radius: 8px; transition: all 0.2s; }
.dropdown-menu a i { width: 16px; text-align: center; color: var(--accent); font-size: 14px; }
.dropdown-menu a:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.dropdown-logout { color: #ff8080 !important; }
.dropdown-logout i { color: #ff8080 !important; }

/* =========================================
   7. PAGE: AUTHENTICATION
   ========================================= */
.auth-wrapper { display: flex; justify-content: center; align-items: center; min-height: 80vh; padding: 20px; }
.login-card { width: 100%; max-width: 420px; padding: 45px 40px; text-align: center; }
.btn-auth-action { display: block; width: 50%; margin: 25px auto 0; border-radius: 30px; padding: 12px; font-size: 16px; font-weight: 700; transition: transform 0.2s ease; }
.btn-auth-action:hover { transform: translateY(-2px); }
.auth-footer { margin-top: 30px; font-size: 14px; color: var(--muted); }
.auth-footer a { color: var(--accent); font-weight: 600; }

/* =========================================
   8. PAGE: ROLES & BADGES
   ========================================= */
.badge-admin { background: #d32f2f !important; color: white !important; }
.badge-mod   { background: #7b1fa2 !important; color: white !important; }
.badge-pro   { background: #fbc02d !important; color: #000 !important; }
.badge-beta  { background: #0288d1 !important; color: white !important; }
.role-badge { font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 4px; margin-left: 8px; vertical-align: middle; text-transform: uppercase; }

/* =========================================
   9. FOOTER
   ========================================= */
.site-footer { border-top: 1px solid var(--border); background: rgba(0,0,0,.14); color: var(--muted2); font-size: 13px; padding: 30px 0; margin-top: auto; }
.footer-inner { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; }

/* =========================================
   10. COMPONENTS (GRID & POSTERS)
   ========================================= */
.movie-poster-card { 
    background-size: cover; 
    background-position: center; 
    aspect-ratio: 2 / 3; 
    border-radius: 12px; 
    position: relative; 
    overflow: hidden; 
    border: none; /* Remove the old border entirely */
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

/* The Glass Layer + Reflection */
.movie-poster-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 12px;
    /* This is your permanent glass edge */
    border: 1px solid rgba(255, 255, 255, 0.12);
    /* The Light Sweep (hidden to the left by default) */
    background: linear-gradient(
        135deg, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0) 45%, 
        rgba(255,255,255,0.08) 50%, 
        rgba(255,255,255,0) 55%, 
        rgba(255,255,255,0) 100%
    );
    background-size: 250% 250%;
    background-position: 200% 0;
    transition: background-position 0.6s ease;
    pointer-events: none;
}

.movie-poster-card:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 20px 40px rgba(0,0,0,0.6); 
}

/* Trigger the reflection sweep on hover */
.movie-poster-card:hover::before {
    background-position: 0 0;
    border-color: rgba(255, 255, 255, 0.3);
}

.poster-badge { 
    z-index: 3; /* Ensure badge stays above the glass reflection */
    text-shadow: 0 0 8px currentColor; 
    backdrop-filter: blur(12px); 
    background: rgba(11, 18, 32, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15); 
}

.poster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px; }

/* 1. Prevent grid items from expanding due to large children */
.disco-card {
    display: block;
    min-width: 0; 
    /* removed overflow: hidden to fix chop */
    text-decoration: none;
}

/* 2. Force the 2:3 ratio and LOCK the size */
.disco-poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    /* This is the key: it forces the image to crop, not expand */
    background-size: cover; 
    background-position: center top; 
    background-repeat: no-repeat;
    background-color: #0b1220; 
    
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 10px;
    transition: transform 0.2s ease, border-color 0.2s ease;
    
    /* Nuclear backup: ensures it can't grow taller than standard desktop view */
    max-height: 350px; 
    
    /* --- SMOOTHING MAGIC --- */
    transform: translateZ(0); 
    backface-visibility: hidden; 
    image-rendering: -webkit-optimize-contrast;
    image-rendering: high-quality;
}

/* 3. Standardize the Discovery Grid itself */
.discovery-grid {
    display: grid;
    /* Force 6 equal columns on desktop, 3 on mobile */
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    align-items: start;
}

@media (max-width: 768px) {
    .discovery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .disco-poster {
        max-height: 200px;
    }
}

.disco-card:hover .disco-poster {
    transform: translateY(-5px);
    border-color: var(--accent) !important;
}

.search-row:hover { background: rgba(120, 255, 200, 0.05) !important; }
.overview-text { color: var(--muted); font-size: 13px; line-height: 1.5; max-width: 600px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* =========================================
   11. MEDIA QUERIES & RESPONSIVE
   ========================================= */
@media (max-width: 992px) {
    .nav-items { display: none; }
    .nav-inner { padding: 0 15px; }
    .nav-actions .btn { padding: 6px 12px; font-size: 13px; }
    .footer-inner { flex-direction: column; gap: 20px; text-align: center; }
    .poster-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }

    /* HIDE HEADER AUTH BUTTONS & DASHBOARD ACTIONS ON MOBILE */
    .desktop-only { display: none !important; }
}

/* =========================================
   12. TITLE PAGE
   ========================================= */
.title-page-container { max-width: 1600px; margin: 0 auto; padding: 0 20px 40px 20px; }
.title-grid { display: grid; grid-template-columns: 320px 1fr; gap: 50px; align-items: start; }

/* Sidebar & Verified Seal */
.poster-container { padding: 10px; margin-bottom: 20px; border-radius: 16px; }
.poster-container img { width: 100%; border-radius: 10px; display: block; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.sidebar-verified-box { margin-bottom: 25px; text-align: center; width: 100%; }
.verified-badge-large { 
    width: 100%; max-width: 240px; height: auto; object-fit: contain; 
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.4)) drop-shadow(0 0 15px rgba(120,255,200,0.2)); 
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}
.verified-badge-large:hover { transform: scale(1.03); }

/* Library Controls */
.lib-controls { margin-bottom: 20px; }
.lib-toggle-btn { width: 100%; padding: 14px; font-weight: 700; }
.lib-lock-msg { color: var(--muted); font-size: 11px; text-align: center; margin-top: 8px; display: none; }

/* Collections Sidebar */
.collection-sidebar { padding: 20px; border-radius: 12px; }
.section-header { font-size: 11px; text-transform: uppercase; color: var(--accent); letter-spacing: 1.5px; margin: 0 0 15px 0; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 10px; }
.collection-list { display: flex; flex-direction: column; gap: 15px; }
.collection-item { display: flex; gap: 15px; text-decoration: none; align-items: center; padding: 10px; background: rgba(255,255,255,0.02); border-radius: 8px; transition: all 0.2s ease; border: 1px solid transparent; }
.collection-item:hover { background: rgba(255,255,255,0.08) !important; border-color: rgba(255,255,255,0.1) !important; transform: translateX(4px); }
.collection-item img { width: 50px; height: 75px; object-fit: cover; border-radius: 6px; box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.collection-meta { display: flex; flex-direction: column; gap: 4px; }
.collection-title { font-size: 14px; color: #fff; line-height: 1.2; font-weight: 600; }
.collection-year { font-size: 11px; color: var(--muted); font-weight: 500; }

/* Main Content Area */
.media-title { margin: -12px 0 0 0; font-size: 48px; font-weight: 800; line-height: 1.1; word-wrap: break-word; }
.meta-row { display: flex; gap: 20px; align-items: center; margin-top: 12px; margin-bottom: 25px; }
.meta-item { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.network-pill { color: var(--accent); font-weight: 800; background: rgba(120,255,200,0.1); padding: 2px 8px; border-radius: 4px; font-size: 14px; }
.badge-tv { background: #2ec8ff; color: #0b1220; }
.badge-movie { background: #78ffc8; color: #0b1220; }
.badge-base { padding: 4px 12px; border-radius: 4px; font-weight: 900; font-size: 11px; text-transform: uppercase; }

/* Stats Grid */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stat-card { padding: 15px; text-align: center; }
.stat-card.accent-border { border-bottom: 2px solid var(--accent); }
.stat-card.cyan-border { border-bottom: 2px solid var(--cyan); }
.stat-label { display: block; font-size: 10px; color: var(--muted); text-transform: uppercase; }
.stat-value { font-size: 18px; font-weight: 800; }

/* Overview & Progress */
.summary-card { padding: 25px; margin-bottom: 25px; }
.summary-text { color: var(--muted); line-height: 1.7; font-size: 15px; margin: 0; }
.movie-progress-card { padding: 25px; border-left: 4px solid var(--border); }

/* Episode Elements */
.guide-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 10px; }
.btn-bulk { background: none; border: 1px solid var(--accent); color: var(--accent); font-size: 10px; padding: 4px 10px; border-radius: 4px; cursor: pointer; text-transform: uppercase; }

/* Tabs & Season Blocks */
.block-tabs, .simple-season-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 15px; }
.simple-season-list, .season-block-content { padding: 15px; background: rgba(255,255,255,0.02); border-radius: 10px; }
.season-block-content { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 15px; }
.block-tab, .season-tab { padding: 8px 15px; background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 6px; color: var(--muted); cursor: pointer; font-size: 12px; }
.block-tab.active, .season-tab.active { border-color: var(--accent) !important; color: var(--accent) !important; background: rgba(120,255,200,0.1) !important; }

/* Episode Rows */
.unified-season-box { padding: 0; overflow: hidden; border-radius: 12px; margin-bottom: 25px; }
.season-header-attached { padding: 20px 25px; background: rgba(255,255,255,0.04); border-bottom: 1px solid rgba(255,255,255,0.05); display: flex; justify-content: space-between; align-items: center; }
.episode-row { padding: 12px 25px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.03); }
.fa-check-double { opacity: 0.8; margin-left: 5px; font-size: 10px; vertical-align: middle; color: var(--accent); }
.ep-left, .ep-right { display: flex; align-items: center; gap: 15px; }
.ep-num { color: var(--accent); font-family: monospace; width: 25px; font-size: 13px; }
.ep-title { font-size: 14px; opacity: 0.9; }
.ep-date { font-size: 11px; opacity: 0.5; font-family: monospace; }
.ep-check { cursor: pointer; font-size: 18px; }

/* Responsive Visibility Toggles */
.mobile-only { display: none !important; }
@media (max-width: 992px) {
    .title-grid { grid-template-columns: 1fr; gap: 30px; }
    .media-title { font-size: 32px !important; text-align: center; }
    .meta-row { justify-content: center !important; }
    .desktop-only { display: none !important; }
    div.mobile-only { display: block !important; }
    span.mobile-only { display: inline !important; }
    .verified-badge-large { max-width: 180px; }
}

/* --- Library List View --- */
.lib-list-container { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }

.lib-row {
    display: grid;
    grid-template-columns: 80px 1fr 80px 280px 40px;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0 20px;
    height: 75px; /* Taller height for vertical posters */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
}

.lib-row:hover { height: 100px; background: rgba(255, 255, 255, 0.08); border-color: var(--accent); }

/* Clean vertical poster scaling */
.lib-poster-mini {
    width: 45px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    transition: transform 0.3s ease;
}

.lib-row:hover .lib-poster-mini { transform: scale(1.15); }

.lib-title { font-weight: 700; font-size: 18px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-dates { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* Progress Bar */
.lib-progress { display: flex; justify-content: flex-end; }
.lib-progress-container { width: 100%; max-width: 240px; text-align: right; }
.lib-progress-text { font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 800; color: var(--accent); text-transform: uppercase; display: block; margin-bottom: 5px; letter-spacing: 0.5px; }
.lib-progress-track { width: 100%; height: 5px; background: rgba(255, 255, 255, 0.1); border-radius: 10px; overflow: hidden; }
.lib-progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--cyan)); border-radius: 10px; transition: width 0.6s ease; }

/* Filters & Dropdown Reset */
.lib-filters { display: flex; gap: 12px; margin-top: 15px; align-items: center; }
#libSearch, #libSort, .filter-btn { background: rgba(255, 255, 255, 0.05); cursor: pointer; border: 1px solid var(--border); border-radius: 8px; color: #fff; padding: 10px 15px; font-size: 14px; outline: none; }
#libSort { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; padding-right: 40px; }
#libSort option { background: #111; color: #fff; }
.filter-btn.active { background: var(--accent); color: #000; border-color: var(--accent); }

/* Verified Badge */
.verified-badge-img { width: 36px; height: 41px; object-fit: contain; filter: drop-shadow(0 0 4px rgba(0, 255, 170, 0.1)); display: block; margin: 0 auto; transition: transform 0.3s ease; }
.lib-row:hover .verified-badge-img { transform: scale(1.1); }

/* =========================================
   13. SPACING & LAYOUT REFINEMENTS
   ========================================= */
   
/* Prevents the 'double gap' when a container is inside main-content */
.main-content > .container {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Ensure the search bar wrapper doesn't push down too far */
.search-header-box {
    margin-top: 0;
}

/* =========================================
   14. HEADER SEARCH & LAYOUT
   ========================================= */
.header-search-form { position: relative; display: flex; align-items: center; }
.header-search-input {
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 6px 15px 6px 35px;
    color: #fff;
    font-size: 13px;
    width: 180px;
    outline: none;
    transition: all 0.3s ease;
}
.header-search-input:focus { background: rgba(0,0,0,0.3); border-color: var(--accent); width: 220px; }
.header-search-icon { position: absolute; left: 12px; color: var(--muted2); font-size: 13px; pointer-events: none; }

/* Centered Navigation Logic (Desktop) */
@media (min-width: 993px) {
    .nav-inner { 
        position: relative; /* Context for absolute centering */
        justify-content: space-between;
    }
    .nav-brand, .nav-actions { 
        z-index: 10; 
        position: relative; 
    }
    .nav-items { 
        position: absolute; 
        left: 50%; 
        transform: translateX(-50%); 
        display: flex; 
        gap: 25px; 
        align-items: center; 
    }
}

/* Mobile Header Adjustments */
@media (max-width: 992px) {
    .header-search-input { width: 140px; }
    .header-search-input:focus { width: 160px; }
    
    /* Force burger to the far right */
    .nav-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        order: 10; /* Ensures it is visually last */
        margin-left: 10px;
        font-size: 22px;
    }
    
    /* Mobile Menu Search Container */
    .mobile-search-container {
        padding-bottom: 15px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        margin-bottom: 10px;
    }
}