/* ===== THEME: VICE CITY / وایس سیتی =====
   iOS-style look (glass bars, floating tab bar, rounded grouped cards, filled pill buttons, hairlines)
   in Vice City colours. Dark by default; follows the device's light/dark setting like iOS does.
   Only active under <html data-theme="vicecity">; it overrides the tokens of app.css and nothing else. */

/* ---- dark (Vice City at night: ink-violet, hot pink, teal, sunset orange) ---- */
html[data-theme="vicecity"] {
  color-scheme: dark;
  --c-night: 11 7 22;
  --c-night-soft: 21 14 40;
  --c-night-surface: 29 21 54;
  --c-night-border: 54 42 88;
  --c-night-top: 46 28 78;
  --c-backdrop: 16 10 32;
  --c-audio: 14 9 30;
  --c-pink: 255 79 163;
  --c-pink2: 255 140 200;
  --c-cyan: 45 226 230;
  --c-cyan2: 140 244 246;
  --c-purple: 160 106 255;
  --c-orange: 255 138 61;
  --c-orange2: 255 170 110;
  --c-yellow: 255 214 10;
  --c-ink: 247 243 255;
  --c-ink-muted: 176 166 204;
  --c-ink-faint: 124 114 156;
  --c-ink-soft: 224 216 244;
  --c-white: 255 255 255;
  --c-on-accent: 12 6 24;
  --vc-shadow: 0 1px 0 rgb(255 255 255 / 0.05) inset, 0 12px 32px -16px rgb(0 0 0 / 0.75);
  --vc-bar: rgb(var(--c-night-surface) / 0.66);
}

/* ---- light (Vice City by day: lavender-white, deep pink, teal-blue, warm peach) ---- */
@media (prefers-color-scheme: light) {
  html[data-theme="vicecity"] {
    color-scheme: light;
    --c-night: 244 240 250;
    --c-night-soft: 236 230 246;
    --c-night-surface: 255 255 255;
    --c-night-border: 222 212 238;
    --c-night-top: 235 224 250;
    --c-backdrop: 240 233 250;
    --c-audio: 252 249 255;
    --c-pink: 225 38 120;
    --c-pink2: 196 28 104;
    --c-cyan: 0 140 168;
    --c-cyan2: 0 118 142;
    --c-purple: 116 66 220;
    --c-orange: 214 90 14;
    --c-orange2: 190 74 8;
    --c-yellow: 160 100 0;
    --c-ink: 29 21 50;
    --c-ink-muted: 96 86 128;
    --c-ink-faint: 126 116 156;
    --c-ink-soft: 60 48 92;
    --c-white: 29 21 50;
    --c-on-accent: 255 255 255;
    --vc-shadow: 0 1px 2px rgb(var(--c-ink) / 0.05), 0 10px 28px -14px rgb(var(--c-ink) / 0.22);
    --vc-bar: rgb(255 255 255 / 0.72);
  }
}

html[data-theme="vicecity"] { background-color: rgb(var(--c-night)); }
html[data-theme="vicecity"] body { background-color: rgb(var(--c-night)); }
html[data-theme="vicecity"] { --hairline: rgb(var(--c-ink) / 0.10); }

/* ---- backdrop: dusk sky with a pink horizon glow ---- */
html[data-theme="vicecity"] .site-sky {
  background:
    radial-gradient(90% 55% at 50% 108%, rgb(255 79 163 / 0.30), transparent 62%),
    radial-gradient(70% 45% at 88% -6%, rgb(160 106 255 / 0.26), transparent 66%),
    linear-gradient(180deg, #0b0716 0%, #150c2c 58%, #26113a 100%);
}

/* ---- iOS surfaces ---- */
html[data-theme="vicecity"] .bg-night-surface.rounded-xl,
html[data-theme="vicecity"] .bg-night-surface.rounded-2xl,
html[data-theme="vicecity"] .site-theme .bg-night-surface.rounded-xl,
html[data-theme="vicecity"] .site-theme .bg-night-surface.rounded-2xl {
  border-radius: 20px;
  border-color: var(--hairline);
  box-shadow: var(--vc-shadow);
}
html[data-theme="vicecity"] .card-hover:hover {
  border-color: rgb(var(--c-pink) / 0.40);
  box-shadow: 0 16px 34px -18px rgb(var(--c-pink) / 0.55);
}

/* glass top bar */
html[data-theme="vicecity"] .app-shell header.app-chrome {
  background: var(--vc-bar);
  -webkit-backdrop-filter: saturate(190%) blur(26px);
  backdrop-filter: saturate(190%) blur(26px);
  border-color: var(--hairline);
}
/* floating glass tab bar (iOS 26 style): a rounded island above the bottom edge */
html[data-theme="vicecity"] .app-shell nav.app-chrome {
  left: 12px;
  right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  padding-bottom: 0;
  max-width: 26rem;
  margin-inline: auto;
  border: 0.5px solid var(--hairline);
  border-radius: 28px;
  background: var(--vc-bar);
  -webkit-backdrop-filter: saturate(190%) blur(26px);
  backdrop-filter: saturate(190%) blur(26px);
  box-shadow: 0 18px 40px -16px rgb(0 0 0 / 0.55), 0 0 0 0.5px rgb(255 255 255 / 0.04) inset;
}
html[data-theme="vicecity"] .app-shell nav.app-chrome .ios-tab { border-radius: 22px; margin: 4px 2px; }
html[data-theme="vicecity"] .app-shell nav.app-chrome .ios-tab[aria-current="page"] { background: rgb(var(--c-pink) / 0.15); }

/* ---- buttons: flat filled iOS pills instead of the neon gradient ---- */
html[data-theme="vicecity"] .bg-vice-gradient,
html[data-theme="vicecity"] .site-theme .bg-vice-gradient,
html[data-theme="vicecity"] .app-shell .bg-vice-gradient,
html[data-theme="vicecity"] .gc-splash-retry,
html[data-theme="vicecity"] .au-submit {
  background-image: none;
  background-color: rgb(var(--c-pink));
  color: rgb(var(--c-on-accent));
  border-radius: 14px;
  box-shadow: 0 8px 20px -10px rgb(var(--c-pink) / 0.7);
  transition: transform 0.12s ease, opacity 0.12s ease;
}
html[data-theme="vicecity"] .bg-vice-gradient:active,
html[data-theme="vicecity"] .au-submit:active { transform: scale(0.97); opacity: 0.88; }

/* ---- no neon glow: soft depth like iOS ---- */
html[data-theme="vicecity"] .neon-text-pink,
html[data-theme="vicecity"] .neon-text-cyan { text-shadow: none; }
html[data-theme="vicecity"] .shadow-neon-pink,
html[data-theme="vicecity"] .shadow-neon-cyan,
html[data-theme="vicecity"] .shadow-neon-purple,
html[data-theme="vicecity"] .site-theme .shadow-neon-pink { box-shadow: 0 10px 24px -10px rgb(var(--c-pink) / 0.5); }

/* ---- form fields: rounded, filled, pink focus ring ---- */
html[data-theme="vicecity"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]),
html[data-theme="vicecity"] textarea,
html[data-theme="vicecity"] select { border-radius: 12px; }
html[data-theme="vicecity"] input:focus,
html[data-theme="vicecity"] textarea:focus,
html[data-theme="vicecity"] select:focus {
  outline: none;
  border-color: rgb(var(--c-pink) / 0.65);
  box-shadow: 0 0 0 3px rgb(var(--c-pink) / 0.25);
}

/* ---- light variant: pastel sunset scene (same pieces the Leonida theme restyles) ---- */
@media (prefers-color-scheme: light) {
  /* page backdrop: sunset sky instead of the starry night */
  html[data-theme="vicecity"] .site-sky {
    background: linear-gradient(180deg, #d7c9f4 0%, #f2c6e0 38%, #fbd9d0 72%, #fdeff3 100%);
  }
  html[data-theme="vicecity"] .site-sky::after {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(55% 38% at 50% 72%, rgba(255, 226, 172, 0.7), rgba(255, 226, 172, 0) 70%);
  }
  html[data-theme="vicecity"] .site-sky svg,
  html[data-theme="vicecity"] .vice-star { display: none; }

  /* the hero / footer scene becomes a sunset skyline */
  html[data-theme="vicecity"] .vice-sky { background: linear-gradient(180deg, #9a86da 0%, #de8fc7 46%, #f7a7a2 76%, #fdc999 100%); }
  html[data-theme="vicecity"] .vice-glow { background: radial-gradient(ellipse at 50% 100%, rgba(255, 228, 176, 0.95), rgba(255, 160, 132, 0.4) 40%, transparent 72%); }
  html[data-theme="vicecity"] .vice-horizon { opacity: 0.55; box-shadow: none; }
  html[data-theme="vicecity"] .vice-grid { background: #4b2a78; }
  html[data-theme="vicecity"] .hero-sun { opacity: 0.95; filter: none; }
  html[data-theme="vicecity"] .vice-stage [fill="#120a2b"] { fill: #5d3490; }
  html[data-theme="vicecity"] .vice-stage [stop-color="#1d0f45"] { stop-color: #6b3d9c; }
  html[data-theme="vicecity"] .vice-stage [fill="#1d0f45"] { fill: #a77fc4; }
  html[data-theme="vicecity"] .vice-stage [fill="#0b0720"] { fill: #5b3590; }
  html[data-theme="vicecity"] .vice-stage [fill="#07051a"] { fill: #3f2068; }
  html[data-theme="vicecity"] .hero-sun {
    background: linear-gradient(180deg, #fff0b8 0%, #ffc27a 30%, #f58aa6 65%, #a279e0 100%);
  }
  html[data-theme="vicecity"] .hero-sub { color: rgb(var(--c-ink)); font-weight: 500; }
  html[data-theme="vicecity"] .site-sky {
    background: linear-gradient(180deg, #e3d9f7 0%, #f6d3e6 44%, #fde0d4 78%, #fff1ec 100%);
  }
  html[data-theme="vicecity"] .app-shell nav.app-chrome {
    box-shadow: 0 16px 36px -16px rgb(var(--c-ink) / 0.32), 0 0 0 0.5px rgb(255 255 255 / 0.6) inset;
  }
  html[data-theme="vicecity"] .app-shell .countdown-live > div { box-shadow: 0 6px 18px -8px rgb(var(--c-ink) / 0.25); }
  html[data-theme="vicecity"] .app-shell [data-back-to-top] { box-shadow: 0 6px 16px -4px rgb(var(--c-ink) / 0.35); }
}

/* ---- the home slider keeps the dark look in both variants ---- */
/* The home slider keeps the default (dark) look in every theme: it re-declares the default tokens,
   so its overlay, title, subtitle, dots and button resolve to the original colours. */
html[data-theme="vicecity"] .slider-banner {
  --c-night: 10 8 24;
  --c-night-soft: 19 15 40;
  --c-night-surface: 24 20 51;
  --c-night-border: 43 36 80;
  --c-pink: 255 46 146;
  --c-pink2: 255 110 199;
  --c-cyan: 23 233 192;
  --c-purple: 138 92 255;
  --c-orange: 255 122 61;
  --c-yellow: 255 210 63;
  --c-ink: 245 243 255;
  --c-ink-muted: 156 147 184;
  --c-ink-faint: 107 99 144;
  --c-white: 255 255 255;
  --c-on-accent: 10 8 24;
}
html[data-theme="vicecity"] .slider-banner .bg-vice-gradient {
  background-image: none;
  background-color: rgb(var(--c-cyan));
  box-shadow: none;
}
html[data-theme="vicecity"] .slider-banner .bg-vice-gradient { border-radius: 14px; }
