:root {
  /* ── Backgrounds ── */
  --bg: #0A0B0E;
  --surface: #121419;
  --surface2: #1A1D24;
  --card: var(--surface);
  --inset: #0D0E12;

  /* ── Borders ── */
  --border: rgba(255, 255, 255, 0.10);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.16);

  /* ── Text ── */
  --text: #F4F5F7;
  --muted: #AAB1BD;
  --muted2: #737A86;

  /* ── Brand accent (ONE) — cool platinum/champagne-silver, restrained ── */
  --accent: #C9CDD6;
  --accent-bright: #E4E6EA;
  --accent-glow: rgba(201, 205, 214, 0.16);
  --accent2: var(--accent-bright);  /* was undefined anywhere — avatar ring / login icon / focus ring */
  --gold: var(--accent);            /* legacy name, now aliases the platinum accent — was undefined anywhere */

  /* ── Semantic (status ONLY — reworked fully in Pass 3) ── */
  --success: #35C48E;  /* Added / Airing */
  --pending: #E8A13C;  /* Request / action needed */
  --info: #5B8DEF;     /* Coming Soon */
  --danger: #E5574B;
  --warning: var(--pending);  /* was a literal duplicate of --accent (both #fbbf24) — decoupled */
  --anime: #818cf8;    /* revisited in Pass 5 branding pass */

  /* ── Radius ── */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* ── Spacing (8pt grid) ── */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;

  /* ── Shadow / Motion ── */
  --shadow-card: 0 8px 30px rgba(0,0,0,0.45);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --motion-fast: 150ms;
  --motion-base: 220ms;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif !important;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

  /* Background grain */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
  }

  .screen { display: none; animation: fadeIn 0.4s ease; }
  .screen.active { display: block; }

  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* ── HEADER ── */
  header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(10,10,15,0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 64px;
    display: flex; align-items: center; justify-content: space-between;
  }

  .icon-inline {
    display: inline-flex;
    width: 14px; height: 14px;
    vertical-align: -2px;
    flex-shrink: 0;
  }
  .icon-inline svg { width: 100%; height: 100%; }

  .logo {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: 1px;
    color: var(--accent);
  }

  .logo-by { color: var(--muted); font-size: 13px; letter-spacing: 1px; font-family: 'Inter', sans-serif; margin-left: 8px; }

  .logo-mobile { display: none; }
  @media (max-width: 639px) {
    .logo-desktop { display: none; }
    .logo-mobile { display: inline; }
  }

  .header-right { display: flex; align-items: center; gap: 12px; }

  .user-pill {
    display: flex; align-items: center; gap: 8px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 6px 14px 6px 8px;
    font-size: 13px;
  }

  .user-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--accent2);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 600;
    overflow: hidden;
  }

  .user-avatar img { width: 100%; height: 100%; object-fit: cover; }

  .btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 20px; border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 14px; font-weight: 500;
    cursor: pointer; border: none; transition: all 0.2s;
    text-decoration: none;
  }

  .btn-primary {
    background: var(--accent);
    color: #000;
  }
  .btn-primary:hover { background: var(--accent-bright); transform: translateY(-1px); }

  .btn-ghost {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border);
  }
  .btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }

  .btn-danger {
    background: rgba(255,79,106,0.15);
    color: var(--danger);
    border: 1px solid rgba(255,79,106,0.3);
  }
  .btn-danger:hover { background: rgba(255,79,106,0.25); }

  .btn-success {
    background: rgba(46,204,138,0.15);
    color: var(--success);
    border: 1px solid rgba(46,204,138,0.3);
  }
  .btn-success:hover { background: rgba(46,204,138,0.25); }

  .btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 8px; }

  /* ── LOGIN SCREEN ── */
  #loginScreen {
    min-height: 100vh;
    align-items: center; justify-content: center;
    position: relative;
  }

  #loginScreen.active { display: flex; }

  .login-glow {
    position: absolute;
    width: 600px; height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    pointer-events: none;
  }

  .login-card {
    position: relative; z-index: 1;
    text-align: center;
    padding: 64px 48px;
    max-width: 440px; width: 100%;
  }

  .login-icon {
    width: 80px; height: 80px; border-radius: 24px;
    background: linear-gradient(135deg, var(--accent2), var(--accent));
    margin: 0 auto 32px;
    display: flex; align-items: center; justify-content: center;
    font-size: 36px;
    box-shadow: 0 20px 60px rgba(201,205,214,0.3);
  }

  .login-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 48px; letter-spacing: 1px;
    line-height: 1.05;
    margin-bottom: 12px;
  }

  .login-title .gold { color: var(--accent); }

  .login-sub {
    color: var(--muted); font-size: 15px; line-height: 1.6;
    margin-bottom: 40px;
  }

  .plex-btn {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    width: 100%; padding: 16px 24px;
    background: #e5a00d;
    color: #000; font-weight: 600; font-size: 16px;
    border: none; border-radius: 14px; cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
  }
  .plex-btn:hover { background: #f5b020; transform: translateY(-2px); box-shadow: 0 12px 40px rgba(229,160,13,0.4); }
  .plex-btn:active { transform: translateY(0); }

  .plex-logo { font-size: 22px; }

  .divider {
    display: flex; align-items: center; gap: 16px;
    margin: 24px 0; color: var(--muted); font-size: 12px;
  }
  .divider::before, .divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
  }

  .admin-link {
    color: var(--muted); font-size: 13px; cursor: pointer;
    text-decoration: underline; text-underline-offset: 3px;
    background: none; border: none; font-family: 'Inter', sans-serif;
  }
  .admin-link:hover { color: var(--text); }

  /* ── SEARCH SCREEN ── */
  .container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

  .search-hero {
    padding: 48px 0 24px;
    text-align: center;
  }

  .search-hero h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 52px; letter-spacing: 1px;
    margin-bottom: 8px;
  }

  .search-hero h1 .gold { color: var(--accent); }

  .search-hero p { color: var(--muted); font-size: 15px; margin-bottom: 32px; }

  .search-bar {
    position: relative; max-width: 600px; margin: 0 auto;
  }

  .search-bar input {
    width: 100%; padding: 18px 24px 18px 56px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    color: var(--text); font-size: 16px;
    font-family: 'Inter', sans-serif;
    outline: none; transition: all 0.2s;
  }

  .search-bar input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
  }

  .search-bar input::placeholder { color: var(--muted); }

  .search-icon {
    position: absolute; left: 20px; top: 50%; transform: translateY(-50%);
    color: var(--muted); font-size: 20px; pointer-events: none;
  }

  .search-spinner {
    position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
    display: none;
  }

  .spinner {
    width: 20px; height: 20px; border-radius: 50%;
    border: 2px solid var(--border);
    border-top-color: var(--accent2);
    animation: spin 0.7s linear infinite;
  }

  @keyframes spin { to { transform: rotate(360deg); } }

  /* ── APP LOADING OVERLAY ── */
  .app-loading-overlay {
    position: fixed; inset: 0; z-index: 500;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 50% 42%, var(--surface2) 0%, var(--bg) 72%);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity var(--motion-base) var(--ease-out), visibility var(--motion-base) var(--ease-out);
  }
  .app-loading-overlay.active {
    opacity: 1; visibility: visible; pointer-events: auto;
  }

  .loading-glow {
    position: absolute; width: 460px; height: 460px; border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    animation: loadingPulse 2.6s ease-in-out infinite;
    pointer-events: none;
  }
  @keyframes loadingPulse {
    0%, 100% { transform: scale(0.88); opacity: 0.55; }
    50%      { transform: scale(1.08); opacity: 1; }
  }

  .loading-content {
    position: relative; display: flex; flex-direction: column; align-items: center;
    padding: 0 24px;
  }

  .loading-ring {
    position: relative; width: 96px; height: 96px; margin-bottom: 28px;
    display: flex; align-items: center; justify-content: center;
  }
  .loading-ring::before, .loading-ring::after {
    content: ''; position: absolute; inset: 0; border-radius: 50%;
    border: 3px solid transparent;
  }
  .loading-ring::before {
    border-top-color: var(--accent-bright);
    border-right-color: var(--accent-bright);
    animation: loadingSpin 1.1s linear infinite;
  }
  .loading-ring::after {
    inset: 14px;
    border-bottom-color: var(--accent);
    opacity: 0.7;
    animation: loadingSpin 0.8s linear infinite reverse;
  }
  .loading-ring-icon {
    position: relative; z-index: 1; width: 32px; height: 32px; color: var(--accent-bright);
  }
  @keyframes loadingSpin { to { transform: rotate(360deg); } }

  .loading-title {
    font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 19px;
    color: var(--text); margin-bottom: 24px; text-align: center;
  }
  .loading-dots span {
    display: inline-block; opacity: 0;
    animation: loadingDotFade 1.4s infinite;
  }
  .loading-dots span:nth-child(1) { animation-delay: 0s; }
  .loading-dots span:nth-child(2) { animation-delay: 0.2s; }
  .loading-dots span:nth-child(3) { animation-delay: 0.4s; }
  @keyframes loadingDotFade {
    0%, 80%, 100% { opacity: 0; }
    40%           { opacity: 1; }
  }

  .loading-steps {
    list-style: none; display: flex; flex-direction: column; gap: 13px;
    min-width: 250px;
  }
  .loading-steps li {
    display: flex; align-items: center; gap: 10px;
    font-size: 14px; color: var(--muted2);
    transition: color var(--motion-base) var(--ease-out);
  }
  .loading-steps li.loading { color: var(--text); }
  .loading-steps li.done { color: var(--success); }

  .loading-step-icon {
    position: relative; flex-shrink: 0; width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid var(--border-strong);
    transition: border-color var(--motion-base) var(--ease-out), background var(--motion-base) var(--ease-out);
  }
  .loading-steps li.loading .loading-step-icon {
    border-color: var(--border);
    border-top-color: var(--accent-bright);
    animation: loadingSpin 0.7s linear infinite;
  }
  .loading-steps li.done .loading-step-icon {
    border-color: var(--success); background: var(--success);
  }
  .loading-steps li.done .loading-step-icon::after {
    content: ''; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px;
    border: solid var(--bg); border-width: 0 2px 2px 0; transform: rotate(45deg);
  }

  .loading-skip {
    margin-top: 26px; background: none; border: none; color: var(--muted);
    font-size: 12px; text-decoration: underline; cursor: pointer; font-family: 'Inter', sans-serif;
    animation: fadeIn var(--motion-base) var(--ease-out);
  }
  .loading-skip:hover { color: var(--text); }

  /* ── SUPPORT BANNER (library stats + donation CTA) ── */
  .support-banner {
    max-width: 600px; margin: 28px auto 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
  }

  .support-stats {
    display: flex; justify-content: center; gap: 32px;
    margin-bottom: 14px;
  }

  .support-stat { text-align: center; }

  .support-stat-num {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700; font-size: 20px;
    color: var(--accent-bright);
  }

  .support-stat-label {
    font-size: 10px; color: var(--muted);
    text-transform: uppercase; letter-spacing: 1px;
    margin-top: 2px;
    display: flex; align-items: center; justify-content: center; gap: 5px;
  }

  .legend-dot {
    display: inline-block; width: 6px; height: 6px;
    border-radius: 50%; flex-shrink: 0;
  }

  .legend-dot.movies { background: var(--accent); }
  .legend-dot.shows { background: var(--info); }

  .support-progress-track {
    width: 100%; height: 6px; border-radius: var(--radius-pill);
    background: var(--surface2); overflow: hidden;
    margin-bottom: 16px;
    display: flex;
  }

  .support-progress-fill {
    height: 100%;
    transition: width 0.6s ease;
  }

  .support-progress-fill.movies { background: var(--accent); }
  .support-progress-fill.shows { background: var(--info); }

  .support-cta {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
  }

  .support-cta p {
    flex: 1; min-width: 200px;
    font-size: 12px; color: var(--muted); line-height: 1.5; margin: 0;
  }

  .bmc-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: #FFDD00; color: #0a0a0a;
    font-family: 'Inter', sans-serif; font-weight: 600; font-size: 13px;
    padding: 10px 18px; border-radius: var(--radius-pill);
    text-decoration: none; white-space: nowrap;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }

  .bmc-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(255, 221, 0, 0.25);
  }

  .bmc-btn-icon { font-size: 15px; }

  @media (max-width: 480px) {
    .support-stats { gap: 20px; }
    .support-stat-num { font-size: 17px; }
    .support-cta { flex-direction: column; align-items: center; }
    .support-cta p { text-align: center; }
  }

  /* ── RESULTS ── */
  .section-label {
    font-size: 11px; font-weight: 600; letter-spacing: 2px;
    color: var(--muted); text-transform: uppercase;
    margin: 32px 0 16px;
  }

  .results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    padding-bottom: 48px;
  }

  .show-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s;
    position: relative;
  }

  .show-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255,255,255,0.15);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  }

  .show-poster {
    width: 100%; aspect-ratio: 2/3;
    object-fit: cover; display: block;
    background: var(--surface2);
    transition: transform var(--motion-base) var(--ease-out);
  }
  .show-card:hover .show-poster { transform: scale(1.03); }
  .on-today-card:hover .on-today-poster { transform: scale(1.03); }

  .show-poster-placeholder {
    width: 100%; aspect-ratio: 2/3;
    background: var(--surface2);
    display: flex; align-items: center; justify-content: center;
    font-size: 48px; color: var(--muted);
  }

  .show-info {
    padding: 12px;
  }

  .show-title {
    font-size: 13px; font-weight: 600; line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .show-meta { font-size: 11px; color: var(--muted); font-family: 'Inter', sans-serif; }

  .badge {
    position: absolute; top: 10px; right: 10px;
    padding: 4px 10px; border-radius: 100px;
    font-size: 10px; font-weight: 600; letter-spacing: 0.5px;
    text-transform: uppercase;
  }

  .badge-owned {
    background: var(--success);
    color: #000;
  }

  .badge-downloading {
    background: var(--accent);
    color: #000;
  }

  .badge-movie {
    background: rgba(46,138,204,0.9);
    color: #fff;
  }
  .badge-tv {
    background: rgba(167,139,250,0.9);
    color: #fff;
  }

  .badge-anime {
    background: rgba(167,139,250,0.9);
    color: #fff;
  }

  .badge-pending {
    background: var(--pending);
    color: #000;
  }

  /* Informational, non-actionable states (Coming Soon / Unreleased) — was
     sharing --warning/--pending amber with "Requested". Distinct blue now. */
  .badge-info {
    background: var(--info);
    color: #fff;
  }

  /* ── SHOW DETAIL MODAL ── */
  .modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 200;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    align-items: flex-end;
    justify-content: center;
  }

  .modal-overlay.open { display: flex; animation: fadeIn 0.2s ease; }

  @media (min-width: 640px) {
    .modal-overlay { align-items: center; }
  }

  .modal {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 24px 24px 0 0;
    width: 100%; max-width: 640px;
    max-height: 90vh; overflow-y: auto;
    animation: slideUp 0.3s ease;
  }

  @media (min-width: 640px) {
    .modal { border-radius: 24px; }
  }

  @keyframes slideUp {
    from { transform: translateY(40px) scale(0.98); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
  }

  .modal-header {
    display: flex; align-items: flex-start; gap: 16px;
    padding: 24px; border-bottom: 1px solid var(--border);
  }

  .modal-poster {
    width: 80px; height: 120px; border-radius: 10px;
    object-fit: cover; flex-shrink: 0;
    background: var(--surface2);
  }

  .modal-poster-placeholder {
    width: 80px; height: 120px; border-radius: 10px;
    background: var(--surface2);
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; flex-shrink: 0;
  }

  .modal-title { font-size: 20px; font-weight: 700; margin-bottom: 6px; line-height: 1.2; }
  .modal-meta { font-size: 13px; color: var(--muted); font-family: 'Inter', sans-serif; margin-bottom: 10px; }

  .tags-row { display: flex; flex-wrap: wrap; gap: 6px; }
  .tag {
    padding: 3px 10px; border-radius: 100px;
    font-size: 11px; font-weight: 500;
    background: var(--surface2); color: var(--muted);
    border: 1px solid var(--border);
  }
  .tag-anime { background: rgba(167,139,250,0.15); color: var(--anime); border-color: rgba(167,139,250,0.3); }
  .tag-owned { background: rgba(46,204,138,0.15); color: var(--success); border-color: rgba(46,204,138,0.3); }
  .tag-seasons { background: var(--accent-glow); color: var(--accent); border-color: rgba(201,205,214,0.3); }

  .modal-body { padding: 20px 24px; }

  .modal-overview {
    font-size: 14px; color: var(--muted); line-height: 1.7;
    margin-bottom: 20px;
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .maintenance-banner {
    background: rgba(229,87,75,0.12);
    border: 1px solid rgba(229,87,75,0.35);
    border-radius: 12px; padding: 16px 18px;
    font-size: 14px; color: var(--danger);
    margin-bottom: 20px; line-height: 1.5;
    display: flex; gap: 12px; align-items: flex-start;
  }

  .maintenance-banner-icon { font-size: 18px; flex-shrink: 0; }

  .approval-notice {
    background: rgba(245,158,11,0.1);
    border: 1px solid rgba(245,158,11,0.25);
    border-radius: 12px; padding: 14px 16px;
    font-size: 13px; color: var(--warning);
    margin-bottom: 16px; line-height: 1.5;
    display: flex; gap: 10px; align-items: flex-start;
  }

  .anime-notice {
    background: rgba(167,139,250,0.1);
    border: 1px solid rgba(167,139,250,0.25);
    border-radius: 12px; padding: 14px 16px;
    font-size: 13px; color: var(--anime);
    margin-bottom: 16px; line-height: 1.5;
    display: flex; gap: 10px; align-items: flex-start;
  }

  .owned-notice {
    background: rgba(46,204,138,0.1);
    border: 1px solid rgba(46,204,138,0.25);
    border-radius: 12px; padding: 14px 16px;
    font-size: 13px; color: var(--success);
    margin-bottom: 16px; line-height: 1.5;
    display: flex; gap: 10px; align-items: flex-start;
  }

  .modal-footer {
    padding: 16px 24px 24px;
    display: flex; gap: 10px; justify-content: flex-end;
  }

  /* ── ADMIN PIN MODAL ── */
  .pin-modal {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px 32px;
    width: 100%; max-width: 360px;
    text-align: center;
    animation: slideUp 0.3s ease;
  }

  .pin-title { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
  .pin-sub { color: var(--muted); font-size: 13px; margin-bottom: 28px; }

  .pin-dots {
    display: flex; justify-content: center; gap: 12px; margin-bottom: 28px;
  }

  .pin-dot {
    width: 14px; height: 14px; border-radius: 50%;
    border: 2px solid var(--border);
    transition: all 0.15s;
  }

  .pin-dot.filled { background: var(--accent2); border-color: var(--accent2); }
  .pin-dot.error { background: var(--danger); border-color: var(--danger); animation: shake 0.3s ease; }

  @keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
  }

  .pin-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
    max-width: 240px; margin: 0 auto;
  }

  .pin-key {
    aspect-ratio: 1; border-radius: 14px;
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text); font-size: 20px; font-weight: 500;
    cursor: pointer; transition: all 0.15s;
    font-family: 'Inter', sans-serif;
  }

  .pin-key:hover { background: var(--surface); border-color: rgba(255,255,255,0.2); transform: scale(1.05); }
  .pin-key:active { transform: scale(0.95); }

  /* ── ADMIN SCREEN ── */
  .admin-header {
    padding: 32px 0 24px;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 16px;
  }

  .admin-title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 40px; letter-spacing: 1px; }
  .admin-title .gold { color: var(--accent); }

  .stats-row {
    display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px;
  }

  .stat-chip {
    padding: 8px 16px; border-radius: 100px;
    background: var(--surface); border: 1px solid var(--border);
    font-size: 13px; display: flex; align-items: center; gap: 8px;
  }

  .stat-chip .num { font-weight: 700; font-family: 'Inter', sans-serif; }
  .stat-chip .num.orange { color: var(--accent); }
  .stat-chip .num.purple { color: var(--anime); }
  .stat-chip .num.green { color: var(--success); }

  .requests-list { display: flex; flex-direction: column; gap: 12px; padding-bottom: 48px; }

  .request-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    display: flex; gap: 16px; align-items: flex-start;
    transition: all 0.2s;
  }

  .request-card:hover { border-color: rgba(255,255,255,0.12); }

  .request-poster {
    width: 56px; height: 84px; border-radius: 8px;
    object-fit: cover; flex-shrink: 0;
    background: var(--surface2);
  }

  .request-poster-placeholder {
    width: 56px; height: 84px; border-radius: 8px;
    background: var(--surface2);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; flex-shrink: 0;
  }

  .request-content { flex: 1; min-width: 0; }

  .request-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
  .request-meta { font-size: 12px; color: var(--muted); font-family: 'Inter', sans-serif; margin-bottom: 10px; }

  .request-by {
    font-size: 12px; color: var(--muted);
    display: flex; align-items: center; gap: 6px; margin-bottom: 12px;
  }

  .request-by strong { color: var(--text); }

  .request-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }

  .flag {
    padding: 3px 10px; border-radius: 100px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.5px;
    text-transform: uppercase;
  }

  .flag-anime { background: rgba(167,139,250,0.15); color: var(--anime); }
  .flag-approval { background: rgba(245,158,11,0.15); color: var(--warning); }
  .flag-auto { background: rgba(46,204,138,0.15); color: var(--success); }
  .flag-watchlist { background: var(--accent-glow); color: var(--accent); }

  .season-select-row {
    display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
    flex-wrap: wrap;
  }

  .season-select-row label { font-size: 13px; color: var(--muted); }

  .season-select {
    background: var(--surface2); border: 1px solid var(--border);
    color: var(--text); padding: 6px 12px; border-radius: 8px;
    font-family: 'Inter', sans-serif; font-size: 13px; outline: none;
    cursor: pointer;
  }

  .request-actions { display: flex; gap: 8px; flex-wrap: wrap; }

  .empty-state {
    text-align: center; padding: 80px 24px;
    color: var(--muted);
  }

  .empty-state .icon { font-size: 48px; margin-bottom: 16px; }
  .empty-state h3 { font-size: 18px; color: var(--text); margin-bottom: 8px; }
  .empty-state p { font-size: 14px; line-height: 1.6; }

  .toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    background: var(--surface2); border: 1px solid var(--border);
    border-radius: 12px; padding: 12px 20px;
    font-size: 14px; z-index: 999;
    animation: toastIn 0.3s ease;
    white-space: nowrap;
    display: none;
  }

  .toast.show { display: block; }
  .toast.success { border-color: rgba(46,204,138,0.4); color: var(--success); }
  .toast.error { border-color: rgba(255,79,106,0.4); color: var(--danger); }

  @keyframes toastIn {
    from { transform: translateX(-50%) translateY(20px); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
  }

  /* responsive */
  @media (max-width: 600px) {
    .search-hero h1 { font-size: 36px; }
    .results-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
    .admin-title { font-size: 30px; }
    .request-card { flex-direction: column; }
  }
  /* ON TODAY SECTION */
  .on-today-section {
    margin-top: 24px;
    margin-bottom: 20px;
  }
  .on-today-header {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 24px;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .on-today-carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 16px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .on-today-carousel::-webkit-scrollbar {
    height: 6px;
  }

  /* ── Skeleton shimmer (replaces bare spinner placeholders) ── */
  @keyframes skeletonShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
  }
  .skeleton-card {
    min-width: 140px; max-width: 140px;
    aspect-ratio: 2/3;
    border-radius: var(--radius-md);
    background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    flex-shrink: 0;
  }
  .on-today-carousel::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
  }
  .on-today-card {
    min-width: 140px;
    max-width: 140px;
    background: var(--card);
    border-radius: 12px;
    overflow: hidden;
    scroll-snap-align: start;
    position: relative;
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
  }
  .on-today-poster {
    width: 100%;
    aspect-ratio: 2/3;
    background: #1a1a24;
    object-fit: cover;
    transition: transform var(--motion-base) var(--ease-out);
  }
  .on-today-info {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  .on-today-title {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
  }
  .on-today-ep {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .on-today-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(4px);
    color: var(--gold);
    font-size: 10px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 12px;
    border: 1px solid rgba(201, 205, 214, 0.3);
  }
  .btn-request-today {
    margin-top: auto;
    width: 100%;
    font-size: 12px;
    padding: 8px 14px;
    justify-content: center;
    text-align: center;
  }

/* ── SIMPLE DARK BABY STEP 2: GLASS CARDS & AMBIENT GLOW ── */
.show-card, .on-today-card, .trending-card, .search-card, .season-card, .movie-card, .tv-card, .admin-item, .stat-card {
  background: rgba(23, 26, 37, 0.4) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease !important;
}

.show-card:hover, .on-today-card:hover, .trending-card:hover, .search-card:hover, .season-card:hover, .movie-card:hover, .tv-card:hover, .admin-item:hover, .stat-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 10px 40px -10px rgba(201, 205, 214, 0.15), 0 0 20px rgba(201, 205, 214, 0.05) !important;
  border-color: rgba(201, 205, 214, 0.2) !important;
}

/* Generous Breathing Room & Rounded Corners for Premium Feel */
.show-card, .on-today-card, .movie-card, .tv-card, .admin-item {
  border-radius: 20px !important;
  overflow: hidden;
}

.admin-item {
  padding: 20px !important;
  margin-bottom: 16px !important;
}


/* ── SIMPLE DARK BABY STEP 3: INPUTS & BUTTONS ── */
input[type="text"], input[type="password"], input[type="email"], select, textarea, .search-bar {
  background: rgba(23, 26, 37, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: var(--text) !important;
  transition: all 0.3s ease !important;
}

input:focus, select:focus, textarea:focus, .search-bar:focus-within {
  border-color: var(--accent) !important;
  box-shadow: 0 0 15px rgba(201, 205, 214, 0.2) !important;
  outline: none !important;
}

.btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

.btn-primary, .login-btn, .plex-btn {
  background: var(--accent);
  color: #000 !important;
  border: none !important;
  box-shadow: 0 4px 15px rgba(201, 205, 214, 0.2) !important;
}

.btn-primary:hover, .login-btn:hover, .plex-btn:hover {
  box-shadow: 0 8px 25px rgba(201, 205, 214, 0.4) !important;
  transform: translateY(-2px) !important;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}


/* ── SIMPLE DARK UI OVERHAUL: FLUID SPACING & RESPONSIVE GRID ── */
.login-card { padding: clamp(32px, 8vw, 64px) clamp(24px, 5vw, 48px) !important; }
.modal-header, .modal-body, .modal-footer { padding: clamp(16px, 4vw, 24px) !important; }
.container { padding: 0 clamp(16px, 4vw, 24px) !important; }
@media (max-width: 600px) {
  .modal-footer { flex-wrap: wrap !important; flex-direction: column-reverse !important; }
  .modal-footer .btn { width: 100% !important; justify-content: center !important; margin-bottom: 8px !important; }
  .results-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 768px) {
  .header-right { overflow-x: auto !important; padding-bottom: 8px !important; -webkit-overflow-scrolling: touch !important; }
}
.search-hero h1, .login-title { font-size: clamp(32px, 8vw, 52px) !important; }
.show-card, .login-card, .modal { border-radius: 24px !important; }


/* ── NETFLIX STYLE HOVER SCROLL BUTTONS ── */
.scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(19, 27, 43, 0.85) !important;
  border: 1px solid var(--border) !important;
  color: var(--accent) !important;
  width: 44px;
  height: 44px;
  border-radius: 50% !important;
  cursor: pointer;
  z-index: 100;
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  opacity: 0;
  pointer-events: none;
}
.on-today-section:hover .scroll-btn {
  opacity: 1;
  pointer-events: auto;
}
.scroll-btn:hover {
  background: var(--surface2) !important;
  color: #fff !important;
  border-color: var(--accent) !important;
  transform: translateY(-50%) scale(1.1);
}
.scroll-btn.left { left: -10px; }
.scroll-btn.right { right: -10px; }
@media (max-width: 768px) {
  .scroll-btn { display: none !important; } /* Hide on touch devices */
}


/* ── CENTERING CAROUSELS (USER REQUEST) ── */
.on-today-carousel {
  margin: 0 auto !important;
  width: max-content !important;
  max-width: 100% !important;
}
.on-today-header {
  text-align: center !important;
  justify-content: center !important;
}

/* ── ACCESSIBILITY: focus-visible + reduced motion ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[onclick]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
