/*
 * CineBase - Custom Styles
 * Ferrari Design System
 * Dark Theme via CSS Custom Properties
 */

/* --- Premium Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&display=swap');

/* ========================================================================
   CSS Custom Properties — Design Tokens
   Ferrari tokens in :root
   These variables are referenced by Tailwind config
   ======================================================================== */

:root {
  /* Ferrari Rosso Corsa — Primary */
  --ferrari-primary: #da291c;
  --ferrari-primary-active: #b01e0a;
  --ferrari-primary-hover: #9d2211;

  /* Surface */
  --ferrari-canvas: #181818;
  --ferrari-canvas-elevated: #303030;

  /* Text */
  --ferrari-ink: #ffffff;
  --ferrari-body: #969696;
  --ferrari-body-strong: #ffffff;
  --ferrari-body-on-light: #181818;
  --ferrari-muted: #666666;
  --ferrari-muted-soft: #8f8f8f;
  --ferrari-on-primary: #ffffff;

  /* Hairlines */
  --ferrari-hairline: #303030;
  --ferrari-hairline-on-light: #d2d2d2;

  /* Semantic */
  --ferrari-semantic-info: #4c98b9;
  --ferrari-semantic-success: #03904a;
  --ferrari-semantic-warning: #f13a2c;

  /* Accent (scoped — Hypersail only) */
  --ferrari-accent-yellow: #f6e500;

  /* Typography — Geist premium geometric sans (FerrariSans substitute) */
  --ferrari-font: 'Geist', 'Inter', -apple-system, system-ui, sans-serif;

  /* Spacing — 4px base, 8px ladder */
  --space-xxxs: 4px;
  --space-xxs: 8px;
  --space-xs: 16px;
  --space-sm: 24px;
  --space-md: 32px;
  --space-lg: 48px;
  --space-xl: 64px;
  --space-xxl: 96px;
  --space-super: 128px;

  /* Rounded — sharp by default */
  --rounded-none: 0px;
  --rounded-xs: 2px;
  --rounded-sm: 4px;
  --rounded-md: 6px;
  --rounded-lg: 8px;
  --rounded-xl: 12px;
  --rounded-full: 9999px;
}

/* Stili base: impostano font, colori di sfondo e transizioni globali del documento. */
/* Stili base: impostano font, sfondo e colore del documento. */
/* ========================================================================
   Base Styles
   ======================================================================== */

body {
  font-family: var(--ferrari-font);
  background-color: var(--ferrari-canvas);
  color: var(--ferrari-ink);
}

/* Scrollbar personalizzata: uniforma l'aspetto della barra di scorrimento nel tema. */
/* Scrollbar personalizzata: armonizza la barra di scorrimento col tema. */
/* ========================================================================
   Scrollbar
   ======================================================================== */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--ferrari-canvas);
}

::-webkit-scrollbar-thumb {
  background: var(--ferrari-hairline);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--ferrari-hairline);
}

/* Animazioni globali: gestiscono fade, rotazione e micro-movimenti dell'interfaccia. */
/* Animazioni globali: definiscono fade, rotazione e micro-movimenti. */
/* ========================================================================
   Animations
   ======================================================================== */

.animate-fade-in {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* ========================================================================
   Ferrari Typography
   ======================================================================== */

.ferrari-display-mega { font-family: var(--ferrari-font); font-size: 80px; font-weight: 500; line-height: 1.05; letter-spacing: -1.6px; }
.ferrari-display-xl { font-family: var(--ferrari-font); font-size: 56px; font-weight: 500; line-height: 1.1; letter-spacing: -1.12px; }
.ferrari-display-lg { font-family: var(--ferrari-font); font-size: 36px; font-weight: 500; line-height: 1.2; letter-spacing: -0.36px; }
.ferrari-display-md { font-family: var(--ferrari-font); font-size: 26px; font-weight: 500; line-height: 1.5; letter-spacing: 0.195px; }
.ferrari-title-md { font-family: var(--ferrari-font); font-size: 18px; font-weight: 700; line-height: 1.2; letter-spacing: 0; }
.ferrari-title-sm { font-family: var(--ferrari-font); font-size: 16px; font-weight: 500; line-height: 1.4; letter-spacing: 0.08px; }
.ferrari-body-md { font-family: var(--ferrari-font); font-size: 14px; font-weight: 400; line-height: 1.5; letter-spacing: 0; }
.ferrari-body-sm { font-family: var(--ferrari-font); font-size: 13px; font-weight: 400; line-height: 1.5; letter-spacing: 0; }
.ferrari-caption { font-family: var(--ferrari-font); font-size: 12px; font-weight: 400; line-height: 1.4; letter-spacing: 0; }
.ferrari-caption-uppercase { font-family: var(--ferrari-font); font-size: 11px; font-weight: 600; line-height: 1.4; letter-spacing: 1.1px; text-transform: uppercase; }
.ferrari-button { font-family: var(--ferrari-font); font-size: 14px; font-weight: 700; line-height: 1.0; letter-spacing: 1.4px; text-transform: uppercase; }
.ferrari-nav-link { font-family: var(--ferrari-font); font-size: 13px; font-weight: 600; line-height: 1.4; letter-spacing: 0.65px; text-transform: uppercase; }

/* ========================================================================
   Ferrari Buttons
   ======================================================================== */

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: var(--ferrari-primary); color: var(--ferrari-on-primary);
  font-family: var(--ferrari-font); font-size: 14px; font-weight: 700;
  line-height: 1.0; letter-spacing: 1.4px; text-transform: uppercase;
  padding: 14px 32px; height: 48px; border: none; cursor: pointer;
  border-radius: 0; transition: background 0.2s ease;
}
.btn-primary:hover { background: var(--ferrari-primary-hover); }
.btn-primary:active { background: var(--ferrari-primary-active); }

.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: transparent; color: var(--ferrari-ink);
  border: 1px solid var(--ferrari-ink);
  font-family: var(--ferrari-font); font-size: 14px; font-weight: 700;
  line-height: 1.0; letter-spacing: 1.4px; text-transform: uppercase;
  padding: 13px 31px; height: 48px; cursor: pointer;
  border-radius: 0; transition: background 0.2s ease;
}
.btn-outline:hover { background: rgba(255,255,255,0.08); }

.btn-tertiary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: transparent; color: var(--ferrari-ink);
  border: none; cursor: pointer;
  font-family: var(--ferrari-font); font-size: 14px; font-weight: 700;
  line-height: 1.0; letter-spacing: 1.4px; text-transform: uppercase;
  padding: 0; border-radius: 0; transition: opacity 0.2s ease;
}
.btn-tertiary:hover { opacity: 0.8; }

/* ========================================================================
   Ferrari Navbar
   ======================================================================== */

.navbar-ferrari {
  background: var(--ferrari-canvas); height: 64px;
  border-bottom: 1px solid var(--ferrari-hairline);
}

.nav-link-ferrari {
  font-family: var(--ferrari-font); font-size: 13px; font-weight: 600;
  line-height: 1.4; letter-spacing: 0.65px; text-transform: uppercase;
  color: var(--ferrari-ink); transition: opacity 0.2s ease;
}
.nav-link-ferrari:hover { opacity: 0.8; }

/* ========================================================================
   Ferrari Cards
   ======================================================================== */

.card-ferrari {
  background: var(--ferrari-canvas-elevated);
  border: none; border-radius: 0;
}

.card-ferrari-light {
  background: var(--ferrari-canvas);
  border: 1px solid var(--ferrari-hairline);
  border-radius: 0;
}

/* ========================================================================
   Ferrari Form Inputs
   ======================================================================== */

.input-ferrari {
  background: var(--ferrari-canvas-elevated) !important; color: var(--ferrari-ink) !important;
  border: 1px solid var(--ferrari-hairline);
  border-radius: 4px; padding: 14px 16px; height: 48px;
  font-family: var(--ferrari-font); font-size: 14px;
  outline: none; transition: border-color 0.2s ease;
  -webkit-text-fill-color: var(--ferrari-ink);
}
.input-ferrari:focus { border-color: var(--ferrari-primary); }
.input-ferrari::placeholder { color: var(--ferrari-muted); opacity: 0.7; }
.input-ferrari:-webkit-autofill,
.input-ferrari:-webkit-autofill:hover,
.input-ferrari:-webkit-autofill:focus,
.input-ferrari:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px var(--ferrari-canvas-elevated) inset !important;
  -webkit-text-fill-color: var(--ferrari-ink) !important;
  caret-color: var(--ferrari-ink);
  transition: background-color 5000s ease-in-out 0s;
}

select.input-ferrari {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23666666' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center; background-repeat: no-repeat;
  background-size: 1.25em 1.25em; padding-right: 2.5rem;
}

input[type='password']::-ms-reveal,
input[type='password']::-ms-clear {
  display: none;
}

input[type='password']::-webkit-credentials-auto-fill-button,
input[type='password']::-webkit-contacts-auto-fill-button,
input[type='password']::-webkit-textfield-decoration-container {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
}

/* ========================================================================
   Ferrari Badge
   ======================================================================== */

.badge-ferrari {
  display: inline-flex; align-items: center;
  background: var(--ferrari-canvas-elevated); color: var(--ferrari-ink);
  font-family: var(--ferrari-font); font-size: 11px; font-weight: 600;
  line-height: 1.4; letter-spacing: 1.1px; text-transform: uppercase;
  border-radius: 9999px; padding: 4px 12px;
}

/* ========================================================================
   Ferrari Livery Band
   ======================================================================== */

.livery-band {
  background: var(--ferrari-primary); color: var(--ferrari-ink);
  padding: 96px 0; text-align: center;
}

/* ========================================================================
   Ferrari Footer
   ======================================================================== */

.footer-ferrari {
  background: var(--ferrari-canvas); color: var(--ferrari-body);
  padding: 64px 48px;
}

.footer-link-ferrari {
  color: var(--ferrari-body); transition: color 0.2s ease;
  font-family: var(--ferrari-font); font-size: 13px; font-weight: 400;
}
.footer-link-ferrari:hover { color: var(--ferrari-ink); }

/* ========================================================================
   Ferrari Hero (Cinematic Full-bleed) — CINEMATIC ELEVATION v2
   ======================================================================== */

.hero-cinema {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--ferrari-canvas);
}

/* --- Letterbox Frame — cinema aspect ratio cue --- */
.hero-cinema::before,
.hero-cinema::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  z-index: 10;
  background: #000000;
  pointer-events: none;
  will-change: transform;
  transition: height 0.8s cubic-bezier(0.32, 0.72, 0, 1);
}
.hero-cinema::before {
  top: 0;
  height: clamp(0px, 3dvh, 32px);
}
.hero-cinema::after {
  bottom: 0;
  height: clamp(0px, 6dvh, 64px);
}

/* --- Hero Background Layer --- */
.hero-cinema-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center top;
  will-change: transform;
  animation: kenBurnsHero 20s ease-in-out infinite alternate;
}
.hero-cinema-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(
    ellipse 120% 80% at 50% 40%,
    transparent 0%,
    rgba(24, 24, 24, 0.15) 40%,
    rgba(24, 24, 24, 0.65) 80%,
    rgba(24, 24, 24, 0.92) 100%
  );
}
/* Slide transition state — hidden, will fade in */
.hero-cinema-bg-transitioning {
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.32, 0.72, 0, 1);
}
.hero-cinema-bg-active {
  opacity: 1;
  transition: opacity 1.2s cubic-bezier(0.32, 0.72, 0, 1);
}

@keyframes kenBurnsHero {
  0%   { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.06) translate(-1%, -0.5%); }
}

/* --- Hero Content — sits above the bg, overlaid with dramatic vignette --- */
.hero-cinema-content {
  position: relative; z-index: 5;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 100dvh;
  padding: clamp(28px, 8vh, 96px) clamp(16px, 5vw, 5rem) clamp(48px, 10vh, 80px);
}

/* --- Eyebrow tag — microscopic pill, Ferrari style --- */
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--ferrari-font); font-size: 11px; font-weight: 600;
  line-height: 1.4; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--ferrari-primary);
  margin-bottom: clamp(8px, 2vh, 20px);
  opacity: 0; transform: translateY(12px);
  animation: heroRevealStagger 1s 0.1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-eyebrow::before {
  content: '';
  display: block; width: 24px; height: 1px;
  background: var(--ferrari-primary);
}

/* --- Hero Title --- */
.hero-cinema-title {
  font-family: var(--ferrari-font); font-size: clamp(36px, 8vw, 80px);
  font-weight: 500; line-height: 1.05; letter-spacing: -1.6px;
  color: var(--ferrari-ink); max-width: 860px;
  opacity: 0; transform: translateY(16px);
  animation: heroRevealStagger 1s 0.25s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  text-wrap: balance;
}
.hero-cinema-title .highlight {
  color: var(--ferrari-primary);
  position: relative; display: inline;
}

/* --- Hero Subtitle --- */
.hero-cinema-subtitle {
  font-family: var(--ferrari-font); font-size: clamp(14px, 2vw, 18px);
  font-weight: 400; line-height: 1.6;
  color: var(--ferrari-body); max-width: 620px;
  margin-top: clamp(12px, 2vh, 24px);
  opacity: 0; transform: translateY(12px);
  animation: heroRevealStagger 1s 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* --- Hero CTA row --- */
.hero-cinema-ctas {
  display: flex; flex-wrap: wrap; gap: 1rem;
  margin-top: clamp(20px, 3vh, 36px);
  opacity: 0; transform: translateY(12px);
  animation: heroRevealStagger 1s 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes heroRevealStagger {
  to { opacity: 1; transform: translateY(0); }
}

/* --- Film Grain Overlay — fixed, pointer-events-none, subtle analog texture --- */
.hero-film-grain {
  position: fixed; inset: 0; z-index: 50;
  pointer-events: none;
  opacity: 0.035;
  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)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
  will-change: opacity;
}
@media (prefers-reduced-motion: reduce) {
  .hero-film-grain { display: none; }
}

/* --- Scanlines removed --- */

/* --- Breathing Card Pulse --- */
.breathing-card {
  animation: cardBreath 4s ease-in-out infinite;
}
@keyframes cardBreath {
  0%, 100% { box-shadow: 0 0 0 0 rgba(218, 41, 28, 0); }
  50%      { box-shadow: 0 0 0 2px rgba(218, 41, 28, 0.15), 0 0 25px rgba(218, 41, 28, 0.06); }
}
@media (prefers-reduced-motion: reduce) {
  .breathing-card { animation: none; }
}

/* --- Animated Gradient Text (hero title) --- */
.gradient-text {
  animation: gradientTextFlow 10s ease-in-out infinite;
}
@keyframes gradientTextFlow {
  0%   { background-position: 0% 50%; }
  35%  { background-position: 100% 50%; }
  65%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .gradient-text { animation: none; }
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .hero-cinema-content { padding: 40px 16px 48px; }
  .hero-cinema-title { letter-spacing: -0.8px; }
  .hero-cinema::before { height: 0; }
  .hero-cinema::after { height: clamp(0px, 4dvh, 32px); }
}
@media (min-width: 641px) and (max-width: 1024px) {
  .hero-cinema-title { letter-spacing: -1.2px; }
}

/* ========================================================================
   Ferrari Utility Classes
   ======================================================================== */

.text-primary { color: var(--ferrari-primary); }
.text-ink { color: var(--ferrari-ink); }
.text-body { color: var(--ferrari-body); }
.text-muted { color: var(--ferrari-muted); }
.bg-canvas { background: var(--ferrari-canvas); }
.bg-canvas-elevated { background: var(--ferrari-canvas-elevated); }
.border-hairline { border: 1px solid var(--ferrari-hairline); }
.label-caps {
  font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--ferrari-body);
}

/* Validazione form: evidenzia i campi con errore e lo stato focus. */
/* Validazione form: segnala errori e stato focus. */
/* ========================================================================
   Form Validation
   ======================================================================== */

.form-input-error {
  border-color: var(--ferrari-semantic-warning) !important;
}
.form-input-error:focus {
  box-shadow: 0 0 0 2px rgba(218, 41, 28, 0.2);
}

/* ========================================================================
   Table Striped
   ======================================================================== */

.table-striped tr:nth-child(even) {
  background-color: var(--ferrari-canvas);
}

img {
  max-width: 100%;
  height: auto;
}

@media print {
  .no-print { display: none !important; }
}

/* Tab della programmazione: gestisce stato attivo e interazione tra categorie. */
/* Tab della programmazione: gestiscono stato attivo e navigazione. */
/* ========================================================================
   Programmazione v2 - Tabs
   ======================================================================== */

.tab-btn {
  color: var(--ferrari-body);
  background: var(--ferrari-canvas);
  border-radius: 0;
}
.tab-btn:hover {
  color: var(--ferrari-ink);
  background: var(--ferrari-canvas-elevated);
}
.active-tab {
  color: #ffffff;
  background: var(--ferrari-primary);
}
.active-tab:hover {
  filter: brightness(1.05);
}

/* Clamp delle righe: limita il testo su due righe per una griglia ordinata. */
/* Clamp del testo: limita i contenuti a due righe. */
/* ========================================================================
   Programmazione v2 - Line Clamp
   ======================================================================== */

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Scrollbar della lista cinema: ottimizza lo scroll verticale dell'elenco. */
/* Scrollbar della lista cinema: ottimizza lo scorrimento verticale. */
/* ========================================================================
   Programmazione v2 - Modal Scrollbar
   ======================================================================== */

#cinema-list::-webkit-scrollbar { width: 4px; }
#cinema-list::-webkit-scrollbar-track { background: transparent; }
#cinema-list::-webkit-scrollbar-thumb {
  background: var(--ferrari-hairline);
  border-radius: 10px;
}

/* ========================================================================
   Programmazione v2 - Carousel
   ======================================================================== */

.programmazione-carousel-shell { display: block; }

.programmazione-carousel-track {
  display: flex; gap: 1.5rem;
  overflow-x: auto; scroll-behavior: smooth;
  padding: 0.25rem 0.125rem 0.75rem;
  -ms-overflow-style: none; scrollbar-width: none;
}
.programmazione-carousel-track::-webkit-scrollbar { display: none; }

.programmazione-carousel-card { flex: 0 0 min(20rem, 82vw); }

@media (min-width: 640px) {
  .programmazione-carousel-card { flex-basis: 18rem; }
}
@media (min-width: 1024px) {
  .programmazione-carousel-card { flex-basis: 19rem; }
}

.programmazione-carousel-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem;
  border: 1px solid var(--ferrari-hairline);
  background: var(--ferrari-canvas); color: var(--ferrari-ink);
  cursor: pointer; transition: all 0.2s ease;
}
.programmazione-carousel-arrow:hover {
  border-color: var(--ferrari-primary);
  background: var(--ferrari-primary); color: #ffffff;
}
.programmazione-carousel-arrow:disabled {
  opacity: 0.4; cursor: not-allowed;
  border-color: var(--ferrari-hairline);
  background: var(--ferrari-canvas); color: var(--ferrari-body);
}
.programmazione-carousel-arrow:disabled:hover {
  border-color: var(--ferrari-hairline);
  background: var(--ferrari-canvas); color: var(--ferrari-body);
}

/* ========================================================================
   FASE 10 - Date Rail
   ======================================================================== */

.date-rail-scroll {
  display: flex; gap: 0.5rem;
  overflow-x: auto; scroll-behavior: smooth;
  padding: 0.5rem 0.25rem;
  -ms-overflow-style: none; scrollbar-width: none;
}
.date-rail-scroll::-webkit-scrollbar { display: none; }

.date-rail-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 4.5rem; padding: 0.625rem 0.5rem;
  border: 2px solid var(--ferrari-hairline);
  background: var(--ferrari-canvas); color: var(--ferrari-body);
  cursor: pointer; transition: all 0.2s ease; flex-shrink: 0;
}
.date-rail-btn:hover {
  border-color: var(--ferrari-primary);
  color: var(--ferrari-primary);
}
.date-rail-btn-active {
  border-color: var(--ferrari-primary) !important;
  background: var(--ferrari-primary) !important;
  color: #ffffff !important;
}

.date-rail-day-name {
  font-size: 0.65rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
  line-height: 1; margin-bottom: 0.25rem;
}
.date-rail-day-num { font-size: 1.25rem; font-weight: 700; line-height: 1; }
.date-rail-month {
  font-size: 0.6rem; font-weight: 500;
  text-transform: uppercase; margin-top: 0.125rem; opacity: 0.8;
}

.date-rail-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 10;
  display: flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem;
  border: none; background: var(--ferrari-canvas-elevated); color: var(--ferrari-ink);
  cursor: pointer; transition: all 0.2s ease;
}
.date-rail-arrow:hover {
  background: var(--ferrari-primary); color: #ffffff;
}
.date-rail-arrow-left { left: -0.25rem; }
.date-rail-arrow-right { right: -0.25rem; }

/* ========================================================================
   FASE 10 - Show Time Buttons
   ======================================================================== */

.show-time-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 3.5rem; padding: 0.5rem 0.75rem;
  border: 1px solid var(--ferrari-hairline);
  background: var(--ferrari-canvas); color: var(--ferrari-ink);
  font-weight: 600; font-size: 0.875rem;
  cursor: pointer; transition: all 0.2s ease;
}
.show-time-btn:hover {
  border-color: var(--ferrari-primary);
  color: var(--ferrari-primary);
}
.show-time-btn .sala-badge {
  font-size: 0.6rem; font-weight: 500;
  background: var(--ferrari-canvas-elevated); color: var(--ferrari-body);
  padding: 0.125rem 0.375rem; margin-left: 0.375rem;
}

/* Intestazioni tipologia sala: raggruppano badge e metadati delle sale. */
/* Intestazioni tipo sala: raggruppano badge e metadata. */
/* ========================================================================
   FASE 10 - Tipo Sala Group Headers
   ======================================================================== */

.tipo-sala-header {
  display: flex; align-items: center; gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.tipo-sala-badge {
  display: inline-flex; align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
}

.tipo-sala-badge-2d {
  background: rgba(16, 185, 129, 0.15);
  color: var(--ferrari-semantic-success);
}
.tipo-sala-badge-3d {
  background: rgba(76, 152, 185, 0.15);
  color: var(--ferrari-semantic-info);
}
.tipo-sala-badge-isense {
  background: rgba(218, 41, 28, 0.15);
  color: var(--ferrari-primary);
}
.tipo-sala-badge-xl {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
}

/* ========================================================================
   FASE 10 - Film Schedule Card
   ======================================================================== */

.film-schedule-card {
  display: flex; gap: 1rem; padding: 1rem;
  background: var(--ferrari-canvas);
  border: 1px solid var(--ferrari-hairline);
  transition: all 0.2s ease;
}
.film-schedule-card:hover {
  border-color: var(--ferrari-primary);
}

.film-schedule-cover {
  width: 4rem; height: 6rem;
  object-fit: cover; flex-shrink: 0;
}

/* Mappa posti: gestisce layout, stati dei posti e controlli di zoom. */
/* Mappa posti: gestisce layout, stato e zoom dei posti. */
/* ========================================================================
   FASE 11 - Seat Map
   ======================================================================== */

.acquista-page { min-height: calc(100vh - 7rem); }

@media (min-width: 1024px) {
  .acquista-page {
    max-width: min(96vw, 1800px);
    min-height: calc(100vh - 6.5rem);
  }
  .acquista-layout { align-items: stretch; min-height: calc(100vh - 11rem); }
  .acquista-sidebar {
    align-self: stretch; position: sticky; top: 5.75rem;
    max-height: calc(100vh - 7rem); overflow-y: auto; padding-right: 0.15rem;
  }
}

.seat-map-wrapper { 
  overflow-x: auto; padding: 0.1rem; 
  --seat-map-zoom: 1;
  background: radial-gradient(ellipse at center, rgba(218,41,28,0.04) 0%, transparent 70%);
}
.seat-map-screen {
  text-align: center; padding: 0.25rem 0; margin: 0 auto 0.7rem;
  width: min(55%, 18rem);
  background: linear-gradient(180deg, var(--ferrari-primary) 0%, #8b0000 100%);
  color: rgba(255,255,255,0.9); font-size: 0.52rem; font-weight: 700;
  letter-spacing: 0.25em; text-transform: uppercase;
  clip-path: polygon(8% 0, 92% 0, 100% 100%, 0% 100%);
  box-shadow: 0 2px 20px rgba(218,41,28,0.25), 0 0 40px rgba(218,41,28,0.08);
}
.seat-map-grid { display: block; }
.seat-map-layout {
  display: flex; flex-direction: column; gap: 0.5rem;
  min-width: max-content; transform-origin: top center;
  width: fit-content; margin-inline: auto;
}
.seat-level-block { display: flex; flex-direction: column; gap: 0.3rem; }
.seat-level-header { display: flex; align-items: center; justify-content: center; }
.seat-level-title {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.1rem 0.45rem;
  background: rgba(255,255,255,0.04); color: var(--ferrari-body);
  font-size: 0.5rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.06);
}
.seat-level-sectors { display: grid; gap: 0.35rem; justify-content: center; }
.seat-level-cols-1 { grid-template-columns: max-content; }
.seat-level-cols-2 { grid-template-columns: repeat(2, max-content); }
.seat-level-cols-3 { grid-template-columns: repeat(3, max-content); }
.seat-sector-card {
  display: flex; flex-direction: column; gap: 0.15rem;
  padding: 0.3rem 0.35rem;
  border: 1px solid rgba(255,255,255,0.04);
  background: rgba(255,255,255,0.015);
}
.seat-sector-card-compact { padding-inline: 0.5rem; }
.seat-sector-name {
  text-align: center; font-size: 0.48rem; font-weight: 600;
  color: var(--ferrari-body); opacity: 0.7;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.seat-sector-grid { display: flex; flex-direction: column; gap: 0.06rem; }
.seat-row { display: flex; align-items: center; gap: 0.06rem; }
.seat-row-numbers { margin-bottom: 0.04rem; }
.seat-btn {
  width: 1.2rem; height: 1.2rem;
  border: 1.5px solid transparent; cursor: pointer;
  transition: all 0.12s ease; font-size: 0; padding: 0;
  position: relative; border-radius: 3px;
}
@media (min-width: 640px) { .seat-btn { width: 1.3rem; height: 1.3rem; } }
@media (min-width: 1280px) {
  .seat-btn { width: 1.4rem; height: 1.4rem; }
  .seat-placeholder, .seat-num-label { width: 1.4rem; }
  .fila-label { width: 1.2rem; font-size: 0.5rem; }
}
/* ---- Disponibile ---- */
.seat-available { background: #252525; border-color: #3d3d3d; }
.seat-available:hover {
  border-color: var(--ferrari-primary);
  background: rgba(218,41,28,0.15);
  transform: scale(1.18);
  box-shadow: 0 0 8px rgba(218,41,28,0.35);
  z-index: 2;
}
/* ---- Selezionato ---- */
.seat-selected {
  background: var(--ferrari-primary) !important;
  border-color: #ff4433 !important;
  transform: scale(1.12);
  box-shadow: 0 0 10px rgba(218,41,28,0.55);
  z-index: 2;
}
.seat-held-other {
  background: repeating-linear-gradient(45deg, #161000, #161000 2px, #3a2c00 2px, #3a2c00 4px);
  border-color: #7a5f00; cursor: not-allowed;
}
.seat-held-me {
  background: var(--ferrari-primary); border-color: #ff4433;
  opacity: 0.6; cursor: not-allowed;
}
.seat-sold {
  background: #141414; border-color: #2a2a2a; cursor: not-allowed; opacity: 0.5;
}
.seat-sold::after {
  content: '\00d7'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #ff6b6b; font-size: 0.75rem; font-weight: 700; line-height: 1;
}
.seat-wheelchair { background: #0e1a28; border-color: #2e5680; }
.seat-wheelchair::after {
  font-family: "Font Awesome 6 Free"; font-weight: 900; content: "\f193";
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #5ea0e8; font-size: 0.62rem;
}
.seat-wheelchair.seat-selected::after { color: #ffffff; }
.seat-placeholder { width: 1.2rem; height: 1.2rem; display: inline-block; }
/* ---- Legenda ---- */
.seat-legend {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.2rem; height: 1.2rem; border: 1.5px solid transparent;
  position: relative; font-size: 0.6rem; flex-shrink: 0; border-radius: 3px;
}
.seat-legend.seat-available { background: #252525; border-color: #3d3d3d; }
.seat-legend.seat-selected { background: var(--ferrari-primary); border-color: #ff4433; }
.seat-legend.seat-held-other {
  background: repeating-linear-gradient(45deg, #161000, #161000 2px, #3a2c00 2px, #3a2c00 4px);
  border-color: #7a5f00;
}
.seat-legend.seat-sold { background: #141414; border-color: #2a2a2a; opacity: 0.5; }
.seat-legend.seat-sold::after {
  content: '\00d7'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #ff6b6b; font-size: 0.75rem; font-weight: 700; line-height: 1;
}
.seat-legend.seat-wheelchair { background: #0e1a28; border-color: #2e5680; }
.seat-legend.seat-wheelchair::after {
  font-family: "Font Awesome 6 Free"; font-weight: 900; content: "\f193";
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #5ea0e8; font-size: 0.62rem;
}
.fila-label {
  width: 1.15rem; text-align: right; font-size: 0.45rem;
  font-weight: 500; color: var(--ferrari-body); opacity: 0.6;
  margin-right: 0.1rem; flex-shrink: 0;
}
.fila-label-header { opacity: 0; }
.seat-num-label {
  width: 1.2rem; text-align: center;
  font-size: 0.38rem; color: var(--ferrari-body); opacity: 0.5; flex-shrink: 0;
}
@media (min-width: 640px) {
  .fila-label { width: 1.25rem; font-size: 0.48rem; }
  .seat-num-label { width: 1.3rem; }
  .seat-level-cols-2 { grid-template-columns: repeat(2, max-content); }
  .seat-level-cols-3 { grid-template-columns: repeat(3, max-content); }
}
@media (max-width: 900px) {
  .seat-level-cols-2, .seat-level-cols-3 { grid-template-columns: max-content; }
}

.seat-zoom-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.8rem; height: 1.8rem;
  border: 1px solid var(--ferrari-hairline);
  background: var(--ferrari-canvas); color: var(--ferrari-ink);
  transition: all 0.15s ease;
}
.seat-zoom-btn:hover:not(:disabled) {
  border-color: var(--ferrari-primary); color: var(--ferrari-primary);
}
.seat-zoom-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.seat-zoom-btn-reset { width: 2rem; }

.seat-zoom-label {
  min-width: 3rem; text-align: center;
  font-size: 0.72rem; font-weight: 700; color: var(--ferrari-body);
}

.seat-map-screen {
  text-align: center; padding: 0.35rem 0;
  margin-left: auto; margin-right: auto;
  width: min(58%, 22rem);
  background: var(--ferrari-primary); color: #ffffff;
  font-size: 0.58rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
}

.seat-map-grid { display: block; }

.seat-map-layout {
  display: flex; flex-direction: column; gap: 0.8rem;
  min-width: max-content; transform-origin: top center;
  width: fit-content; margin-inline: auto;
}

.seat-level-block { display: flex; flex-direction: column; gap: 0.45rem; }
.seat-level-header { display: flex; align-items: center; justify-content: center; }

.seat-level-title {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.16rem 0.55rem;
  background: var(--ferrari-canvas-elevated); color: var(--ferrari-body);
  font-size: 0.56rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
}

.seat-level-sectors { display: grid; gap: 0.55rem; justify-content: center; }
.seat-level-cols-1 { grid-template-columns: max-content; }
.seat-level-cols-2 { grid-template-columns: repeat(2, max-content); }
.seat-level-cols-3 { grid-template-columns: repeat(3, max-content); }

.seat-sector-card {
  display: flex; flex-direction: column; gap: 0.25rem;
  padding: 0.42rem 0.48rem;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(255, 255, 255, 0.02);
}

.seat-sector-card-compact { padding-inline: 0.7rem; }

.seat-sector-name {
  text-align: center; font-size: 0.56rem; font-weight: 700;
  color: var(--ferrari-body);
  text-transform: uppercase; letter-spacing: 0.08em;
}

.seat-sector-grid { display: flex; flex-direction: column; gap: 0.1rem; }

.seat-row { display: flex; align-items: center; gap: 0.12rem; }
.seat-row-numbers { margin-bottom: 0.08rem; }

.seat-btn {
  width: 1.28rem; height: 1.28rem;
  border: 1.5px solid transparent; cursor: pointer;
  transition: all 0.15s ease; font-size: 0; padding: 0;
  position: relative;
}

@media (min-width: 640px) {
  .seat-btn { width: 1.4rem; height: 1.4rem; }
}

@media (min-width: 1280px) {
  .seat-btn { width: 1.5rem; height: 1.5rem; }
  .seat-placeholder, .seat-num-label { width: 1.5rem; }
  .fila-label { width: 1.3rem; font-size: 0.55rem; }
}

/* ---- Disponibile ---- */
.seat-available {
  background: #2a2a2a;
  border-color: #4a4a4a;
}
.seat-available:hover {
  border-color: var(--ferrari-primary);
  background: rgba(218, 41, 28, 0.12);
  transform: scale(1.15);
  box-shadow: 0 0 6px rgba(218, 41, 28, 0.3);
}

/* ---- Selezionato ---- */
.seat-selected {
  background: var(--ferrari-primary) !important;
  border-color: #ff4433 !important;
  transform: scale(1.08);
  box-shadow: 0 0 8px rgba(218, 41, 28, 0.5);
}

/* ---- Riservato (tenuto da altri) - strisce diagonali ambra ---- */
.seat-held-other {
  background: repeating-linear-gradient(
    45deg,
    #1a1400,
    #1a1400 2.5px,
    #4a3800 2.5px,
    #4a3800 5px
  );
  border-color: #8b6f00;
  cursor: not-allowed;
}

/* ---- In attesa (tenuto da me in sessione precedente) ---- */
.seat-held-me {
  background: var(--ferrari-primary);
  border-color: #ff4433;
  opacity: 0.65;
  cursor: not-allowed;
}

/* ---- Venduto ---- */
.seat-sold {
  background: #181818;
  border-color: #3a3a3a;
  cursor: not-allowed;
  opacity: 0.6;
}
.seat-sold::after {
  content: '×';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #ff6b6b;
  font-size: 0.85rem; font-weight: 700;
  line-height: 1;
}

/* ---- Posto disabile ---- */
.seat-wheelchair {
  background: #14202e;
  border-color: #3a6a9e;
}
.seat-wheelchair::after {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  content: "\f193";  /* fa-wheelchair */
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #6ab0f7;
  font-size: 0.7rem;
}
.seat-wheelchair.seat-selected::after {
  color: #ffffff;
}

.seat-placeholder {
  width: 1.28rem; height: 1.28rem; display: inline-block;
}

/* ---- Legenda ---- */
.seat-legend {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.35rem; height: 1.35rem;
  border: 1.5px solid transparent; position: relative;
  font-size: 0.65rem; flex-shrink: 0;
}
.seat-legend.seat-available {
  background: #2a2a2a;
  border-color: #4a4a4a;
}
.seat-legend.seat-selected {
  background: var(--ferrari-primary);
  border-color: #ff4433;
}
.seat-legend.seat-held-other {
  background: repeating-linear-gradient(
    45deg,
    #1a1400,
    #1a1400 2.5px,
    #4a3800 2.5px,
    #4a3800 5px
  );
  border-color: #8b6f00;
}
.seat-legend.seat-sold {
  background: #181818;
  border-color: #3a3a3a;
  opacity: 0.6;
}
.seat-legend.seat-sold::after {
  content: '×';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #ff6b6b;
  font-size: 0.85rem; font-weight: 700;
  line-height: 1;
}
.seat-legend.seat-wheelchair {
  background: #14202e;
  border-color: #3a6a9e;
}
.seat-legend.seat-wheelchair::after {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  content: "\f193";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #6ab0f7;
  font-size: 0.7rem;
}

.fila-label {
  width: 1.35rem; text-align: right; font-size: 0.5rem;
  font-weight: 600; color: var(--ferrari-body);
  margin-right: 0.15rem; flex-shrink: 0;
}
.fila-label-header { opacity: 0; }

.seat-num-label {
  width: 1.28rem; text-align: center;
  font-size: 0.42rem; color: var(--ferrari-body); flex-shrink: 0;
}

@media (min-width: 640px) {
  .fila-label { width: 1.45rem; font-size: 0.52rem; }
  .seat-num-label { width: 1.4rem; }
  .seat-level-cols-2 { grid-template-columns: repeat(2, max-content); }
  .seat-level-cols-3 { grid-template-columns: repeat(3, max-content); }
}

@media (max-width: 900px) {
  .seat-level-cols-2, .seat-level-cols-3 { grid-template-columns: max-content; }
}

/* Opzioni di pagamento: definisce card selezionabili e stato pagamento. */
/* Opzioni di pagamento: gestiscono scelta metodo e stato. */
/* ========================================================================
   FASE 11 - Payment Options
   ======================================================================== */

.payment-option-card {
  display: flex; align-items: center; padding: 1rem;
  border: 2px solid var(--ferrari-hairline);
  background: var(--ferrari-canvas);
  cursor: pointer; transition: all 0.2s ease;
}
.payment-option-card:hover {
  border-color: var(--ferrari-primary);
}
.payment-option-card:has(input:checked) {
  border-color: var(--ferrari-primary);
  background: rgba(218, 41, 28, 0.05);
  box-shadow: 0 0 0 1px var(--ferrari-primary);
}
.payment-option-card:has(input:disabled) {
  cursor: not-allowed; opacity: 0.5;
}
.payment-option-card:has(input:disabled):hover {
  border-color: var(--ferrari-hairline);
  background: var(--ferrari-canvas);
}

#stripe-card-element .StripeElement { padding: 0.75rem; }
#stripe-card-element .StripeElement--focus {
  box-shadow: 0 0 0 2px rgba(218, 41, 28, 0.15);
}

input[type="range"] {
  height: 0.375rem;
  background: var(--ferrari-canvas-elevated);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 1.25rem; height: 1.25rem;
  background: var(--ferrari-primary); cursor: pointer;
  border: 2px solid var(--ferrari-primary-active);
}

/* Admin sidebar navigation */
.admin-nav-link {
  color: var(--ferrari-body);
  border-radius: 6px;
  transition: all 0.15s ease;
}
.admin-nav-link:hover {
  color: var(--ferrari-ink);
  background: rgba(255,255,255,0.05);
}
.admin-nav-link.active {
  color: var(--ferrari-ink);
  background: rgba(218, 41, 28, 0.15);
  font-weight: 600;
}
.admin-nav-link i {
  text-align: center;
}

/* ========================================================================
   Ferrari Light-Mode Component Variants
   ======================================================================== */

/* Button Outline — Light Canvas */
.btn-outline-light {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: transparent; color: var(--ferrari-body-on-light);
  border: 1px solid var(--ferrari-body-on-light);
  font-family: var(--ferrari-font); font-size: 14px; font-weight: 700;
  line-height: 1.0; letter-spacing: 1.4px; text-transform: uppercase;
  padding: 13px 31px; height: 48px; cursor: pointer;
  border-radius: 0; transition: background 0.2s ease;
}
.btn-outline-light:hover { background: rgba(24,24,24,0.08); }

/* Text Input — Light Canvas */
.input-ferrari-light {
  background: var(--ferrari-canvas-light) !important; color: var(--ferrari-body-on-light) !important;
  border: 1px solid var(--ferrari-hairline-on-light);
  border-radius: 4px; padding: 14px 16px; height: 48px;
  font-family: var(--ferrari-font); font-size: 14px;
  outline: none; transition: border-color 0.2s ease;
  -webkit-text-fill-color: var(--ferrari-body-on-light);
}
.input-ferrari-light:focus { border-color: var(--ferrari-primary); }
.input-ferrari-light::placeholder { color: var(--ferrari-muted); opacity: 0.7; }

/* Top Nav — Light Canvas */
.navbar-ferrari-light {
  background: var(--ferrari-canvas-light); height: 64px;
  border-bottom: 1px solid var(--ferrari-hairline-on-light);
}
.nav-link-ferrari-light {
  font-family: var(--ferrari-font); font-size: 13px; font-weight: 600;
  line-height: 1.4; letter-spacing: 0.65px; text-transform: uppercase;
  color: var(--ferrari-body-on-light); transition: opacity 0.2s ease;
}
.nav-link-ferrari-light:hover { opacity: 0.8; }

/* ========================================================================
   Hero Band — Light Canvas Variant
   ======================================================================== */

.hero-cinema-light {
  position: relative; min-height: 480px;
  background: var(--ferrari-canvas-light);
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 96px 0;
}

.hero-cinema-light-content {
  max-width: 900px; margin: 0 auto; padding: 0 48px;
}

.hero-cinema-light-title {
  font-family: var(--ferrari-font); font-size: 56px; font-weight: 500;
  line-height: 1.1; letter-spacing: -1.12px; color: var(--ferrari-body-on-light);
}

.hero-cinema-light-subtitle {
  font-family: var(--ferrari-font); font-size: 16px; font-weight: 400;
  line-height: 1.5; color: var(--ferrari-body); margin-top: 16px;
}

@media (max-width: 640px) {
  .hero-cinema-light { padding: 64px 0; min-height: 360px; }
  .hero-cinema-light-title { font-size: 32px; }
  .hero-cinema-light-content { padding: 0 16px; }
}

/* ========================================================================
   Ferrari Feature Card — Light Canvas
   ======================================================================== */

.card-ferrari-light-feature {
  background: var(--ferrari-canvas-light);
  color: var(--ferrari-body-on-light);
  border: 1px solid var(--ferrari-hairline-on-light);
  border-radius: 0; padding: 32px;
  transition: all 0.2s ease;
}
.card-ferrari-light-feature:hover {
  border-color: var(--ferrari-primary);
}

/* ========================================================================
   Ferrari Spec Cell — Technical Spec Callout
   ======================================================================== */

.spec-cell {
  background: transparent; color: var(--ferrari-ink);
  padding: 24px 0; text-align: center;
}

.spec-cell-value {
  font-family: var(--ferrari-font); font-size: 80px; font-weight: 700;
  line-height: 1.0; letter-spacing: -1.6px;
}

.spec-cell-label {
  font-family: var(--ferrari-font); font-size: 11px; font-weight: 600;
  line-height: 1.4; letter-spacing: 1.1px; text-transform: uppercase;
  color: var(--ferrari-body); margin-top: 8px;
}

/* Race Position variant */
.spec-cell-race { color: var(--ferrari-primary); }

/* ========================================================================
   Ferrari Race Calendar Row
   ======================================================================== */

.race-calendar-row {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--ferrari-hairline);
  font-family: var(--ferrari-font); font-size: 14px;
  color: var(--ferrari-ink);
}

.race-calendar-row:last-child { border-bottom: none; }

.race-calendar-date {
  font-weight: 600; color: var(--ferrari-body);
  min-width: 100px;
}

/* ========================================================================
   Ferrari Preowned Listing Card
   ======================================================================== */

.card-preowned-listing {
  background: var(--ferrari-canvas-light);
  color: var(--ferrari-body-on-light);
  border: 1px solid var(--ferrari-hairline-on-light);
  border-radius: 0; padding: 24px;
  transition: all 0.2s ease;
}
.card-preowned-listing:hover {
  border-color: var(--ferrari-primary);
}

/* ========================================================================
   Ferrari Driver Card — F1 Portrait
   ======================================================================== */

.card-driver {
  background: var(--ferrari-canvas-elevated);
  color: var(--ferrari-ink);
  border-radius: 0; padding: 24px;
  transition: all 0.2s ease;
}
.card-driver:hover {
  background: #3a3a3a;
}

.card-driver-number {
  font-family: var(--ferrari-font); font-size: 48px; font-weight: 700;
  line-height: 1.0; color: var(--ferrari-primary);
}

/* ========================================================================
   Ferrari CTA Band — Pre-footer Dark
   ======================================================================== */

.cta-band-dark {
  background: var(--ferrari-canvas);
  color: var(--ferrari-ink);
  text-align: center; padding: 96px 0;
}

.cta-band-dark-title {
  font-family: var(--ferrari-font); font-size: 36px; font-weight: 500;
  line-height: 1.2; letter-spacing: -0.36px;
  margin-bottom: 32px;
}

@media (max-width: 640px) {
  .cta-band-dark { padding: 64px 0; }
  .cta-band-dark-title { font-size: 26px; }
}

/* ========================================================================
   Ferrari Newsletter Input Band
   ======================================================================== */

.newsletter-input-band {
  background: var(--ferrari-canvas-elevated);
  color: var(--ferrari-ink);
  border-radius: 4px; padding: 32px;
}

.newsletter-input-band .input-ferrari {
  background: var(--ferrari-canvas) !important;
}

/* ========================================================================
   Ferrari Cinematic Animations
   ======================================================================== */

/* Hero parallax reveal */
@keyframes heroReveal {
  from { opacity: 0; transform: scale(1.05); }
  to { opacity: 1; transform: scale(1); }
}

.hero-cinema img,
.hero-cinema [style*="background"] {
  animation: heroReveal 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Livery band entrance */
@keyframes liveryEntrance {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.livery-band {
  animation: liveryEntrance 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Card hover elevation */
.card-ferrari,
.card-ferrari-light,
.card-driver {
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.2s ease,
              background-color 0.2s ease;
}
.card-ferrari:hover,
.card-ferrari-light:hover,
.card-driver:hover {
  transform: translateY(-2px);
}

/* Page transition */
@keyframes pageIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

main {
  animation: pageIn 0.35s ease-out forwards;
}

/* ========================================================================
   CINEMATIC ELEVATION — Shared page-level enhancements
   ======================================================================== */

/* --- Cinematic page entry (all pages) --- */
@keyframes cinematicPageIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.cinematic-enter-page {
  animation: cinematicPageIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* --- Page header pattern — Ferrari display typography --- */
.page-header-eyebrow {
  font-family: var(--ferrari-font); font-size: 11px; font-weight: 600;
  line-height: 1.4; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--ferrari-primary);
}
.page-header-title {
  font-family: var(--ferrari-font); font-size: clamp(28px, 5vw, 56px);
  font-weight: 500; line-height: 1.1; letter-spacing: -1.12px;
  color: var(--ferrari-ink);
}
.page-header-subtitle {
  font-family: var(--ferrari-font); font-size: 16px; font-weight: 400;
  line-height: 1.6; color: var(--ferrari-body); max-width: 640px;
}

/* --- Offer cards — cinematic elevation, Ferrari palette --- */
.offer-card {
  border: 1px solid var(--ferrari-hairline);
  transition: border-color 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.offer-card:hover {
  border-color: var(--ferrari-primary);
  transform: translateY(-2px);
}
.offer-card.highlight-card {
  border-color: var(--ferrari-primary);
  box-shadow: inset 0 0 0 1px rgba(218, 41, 28, 0.2);
}

/* --- Offer badge — Ferrari accent (replaces gold) --- */
.offer-badge-accent {
  background: rgba(218, 41, 28, 0.15);
  color: var(--ferrari-primary);
  border: 1px solid rgba(218, 41, 28, 0.25);
  font-family: var(--ferrari-font); font-size: 11px; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
  border-radius: 9999px; padding: 3px 10px;
}
.offer-discount-badge {
  background: var(--ferrari-primary);
  color: var(--ferrari-on-primary);
  font-size: 11px; font-weight: 700;
  border-radius: 9999px; padding: 3px 10px;
}

/* --- Offer card image header — cinema atmosphere gradient --- */
.offer-image-header {
  min-height: 9rem;
  background-size: cover; background-position: center;
  position: relative;
}
.offer-image-header::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(24,24,24,0.1), rgba(24,24,24,0.7));
}

/* --- Cinema filter — Ferrari input style --- */
.cinema-filter {
  background: var(--ferrari-canvas-elevated);
  border: 1px solid var(--ferrari-hairline);
  color: var(--ferrari-ink);
  border-radius: 4px;
  font-family: var(--ferrari-font); font-size: 14px;
  transition: border-color 0.2s ease;
}
.cinema-filter:focus {
  border-color: var(--ferrari-primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(218, 41, 28, 0.15);
}

/* --- Show picker — cinematic overlay --- */
.show-picker-overlay {
  backdrop-filter: blur(12px);
  background: rgba(24, 24, 24, 0.85);
}
.show-picker-btn {
  transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.show-picker-btn:hover {
  transform: translateY(-1px);
  border-color: var(--ferrari-primary);
}

/* --- Payment & status cards — semantic color fixes --- */
.status-icon-success {
  background: rgba(3, 144, 74, 0.12);
  color: var(--ferrari-semantic-success);
}
.status-icon-pending {
  background: rgba(218, 41, 28, 0.08);
  color: var(--ferrari-primary);
}
.status-icon-failed {
  background: rgba(241, 58, 44, 0.12);
  color: var(--ferrari-semantic-warning);
}

/* --- Countdown card — Ferrari style (replaces amber) --- */
.countdown-card {
  border-left: 4px solid var(--ferrari-primary);
}
.countdown-card .countdown-timer {
  color: var(--ferrari-primary);
}

/* --- Pagamento banner offerta/abbonamento — unified --- */
.promo-banner-accent {
  background: rgba(218, 41, 28, 0.08);
  border: 1px solid rgba(218, 41, 28, 0.25);
}

/* --- Border token fix — unify hairline variants --- */
.border-hairline-soft  { border-color: var(--ferrari-hairline); }

/* --- Subscription cards — elevated --- */
.subscription-card {
  border: 1px solid var(--ferrari-hairline);
  background: var(--ferrari-canvas-elevated);
  transition: border-color 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.subscription-card:hover {
  border-color: var(--ferrari-primary);
  transform: translateY(-2px);
}

/* --- Scheda film — poster spotlight frame --- */
.film-poster-frame {
  position: relative;
  overflow: hidden;
}
.film-poster-frame::after {
  content: '';
  position: absolute; inset: 0;
  border: 1px solid rgba(255,255,255,0.06);
  pointer-events: none;
}

/* --- Esito acquisto — success card frame --- */
.esito-icon-circle {
  width: 80px; height: 80px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 0;
}

/* --- Skeleton loading pulse (cinematic upgrade over spinner) --- */
@keyframes skeletonPulse {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 0.6; }
}
.skeleton-pulse {
  animation: skeletonPulse 2s ease-in-out infinite;
  background: var(--ferrari-canvas-elevated);
}

@media (prefers-reduced-motion: reduce) {
  .skeleton-pulse { animation: none; }
}

/* ========================================================================
   Ferrari Accessibility — Reduced Motion
   ======================================================================== */

@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;
  }

  .hero-cinema img,
  .hero-cinema [style*="background"] {
    animation: none;
  }

  .card-ferrari:hover,
  .card-ferrari-light:hover,
  .card-driver:hover,
  .card-preowned-listing:hover {
    transform: none;
  }
}

/* ========================================================================
   Ferrari Accessibility — Focus States
   ======================================================================== */

.btn-primary:focus-visible,
.btn-outline:focus-visible,
.btn-outline-light:focus-visible,
.btn-tertiary:focus-visible {
  outline: 2px solid var(--ferrari-primary);
  outline-offset: 2px;
}

.input-ferrari:focus-visible,
.input-ferrari-light:focus-visible {
  outline: none;
  border-color: var(--ferrari-primary);
  box-shadow: 0 0 0 2px rgba(218, 41, 28, 0.2);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ferrari-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

.card-ferrari:focus-within,
.card-ferrari-light:focus-within,
.card-driver:focus-within {
  border-color: var(--ferrari-primary);
  box-shadow: 0 0 0 1px rgba(218, 41, 28, 0.3);
}

/* ========================================================================
   Ferrari Light Theme — CSS Variable Overrides
   ======================================================================== */

html.light {
  --ferrari-canvas: #ffffff;
  --ferrari-canvas-elevated: #f7f7f7;
  --ferrari-ink: #181818;
  --ferrari-body: #666666;
  --ferrari-body-strong: #181818;
  --ferrari-muted: #8f8f8f;
  --ferrari-hairline: #d2d2d2;
}

html.light body {
  background-color: var(--ferrari-canvas);
  color: var(--ferrari-ink);
}

html.light .card-ferrari {
  background: var(--ferrari-canvas-elevated);
}

html.light .navbar-ferrari {
  background: var(--ferrari-canvas);
  border-bottom-color: var(--ferrari-hairline);
}

html.light .footer-ferrari {
  background: var(--ferrari-canvas-elevated);
}

/* ========================================================================
   THEME TOGGLE
   ======================================================================== */

#theme-toggle i {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
#theme-toggle:hover i {
  transform: rotate(-20deg) scale(1.1);
}

/* Smooth theme transitions on key properties */
html {
  transition: background-color 0.4s ease;
}
html.light body,
html body {
  transition: background-color 0.4s ease, color 0.4s ease;
}
html.light .card-ferrari,
.card-ferrari {
  transition: background-color 0.4s ease;
}
html.light .navbar-fluid-island {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03) inset,
              0 4px 24px rgba(0, 0, 0, 0.08);
}
html.light .navbar-fluid-island.scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}
html.light .hamburger-line {
  background: var(--ferrari-body-on-light);
}

/* Light theme — offer cards & subscriptions */
html.light .offer-card {
  background: #ffffff;
}
html.light .subscription-card {
  background: #ffffff;
}
html.light .offer-image-header::after {
  background: linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0.7));
}
html.light .show-picker-overlay {
  background: rgba(255, 255, 255, 0.85);
}
html.light .footer-ferrari {
  background: var(--ferrari-canvas-elevated);
  color: var(--ferrari-body);
}
html.light .footer-link-ferrari {
  color: var(--ferrari-body);
}
html.light .footer-link-ferrari:hover {
  color: var(--ferrari-ink);
}

/* Light theme — new premium footer */
html.light footer.bg-\[\#0a0a0a\] {
  background: #f5f5f5 !important;
  color: #181818;
}
html.light footer .bg-\[\#141414\] {
  background: #e8e8e8 !important;
}
html.light footer .border-\[\#1a1a1a\] {
  border-color: #ddd !important;
}
html.light footer .border-\[\#252525\] {
  border-color: #ddd !important;
}
html.light footer .text-\[\#888\],
html.light footer .text-\[\#bbb\] {
  color: #555 !important;
}
html.light footer .text-\[\#555\] {
  color: #888 !important;
}
html.light footer .hover\:text-white:hover {
  color: #da291c !important;
}

/* ========================================================================
   Light Theme — Hero retains cinematic dark overlay
   Text stays white (identical to dark mode)
   ======================================================================== */

html.light .hero-cinema-title {
  color: #ffffff;
}

html.light .shimmer-text {
  --ferrari-ink: #ffffff;
}

html.light .hero-cinema-subtitle {
  color: #969696;
}

/* ========================================================================
   21st.dev INSPIRED EFFECTS
   ======================================================================== */

/* --- Floating Gradient Orbs Background --- */
.orb-bg {
  position: relative; overflow: hidden;
}
.orb-bg::before,
.orb-bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none; z-index: 1;
  opacity: 0.12;
}
.orb-bg::before {
  width: 450px; height: 450px;
  background: var(--ferrari-primary);
  top: 20%; left: 50%;
  transform: translate(-50%, -50%);
  animation: orbFloat1 18s ease-in-out infinite alternate;
}
.orb-bg::after {
  width: 350px; height: 350px;
  background: var(--ferrari-primary);
  bottom: 30%; right: 40%;
  animation: orbFloat2 22s ease-in-out infinite alternate;
  opacity: 0.06;
}
@keyframes orbFloat1 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(80px, 60px) scale(1.15); }
  100% { transform: translate(-20px, -30px) scale(0.9); }
}
@keyframes orbFloat2 {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(-50px, -40px) scale(1.2); }
  66%  { transform: translate(30px, 20px) scale(0.85); }
  100% { transform: translate(-10px, 10px) scale(1.05); }
}
@media (prefers-reduced-motion: reduce) {
  .orb-bg::before, .orb-bg::after { animation: none; opacity: 0.08; }
}
/* Real element overlay that sits above cards */
.orb-overlay {
  position: absolute; inset: 0; z-index: 1;
  pointer-events: none; overflow: hidden;
}
.orb-overlay::before,
.orb-overlay::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.1;
}
.orb-overlay::before {
  width: 450px; height: 450px;
  background: var(--ferrari-primary);
  top: 20%; left: 50%;
  transform: translate(-50%, -50%);
  animation: orbFloat1 18s ease-in-out infinite alternate;
}
.orb-overlay::after {
  width: 350px; height: 350px;
  background: var(--ferrari-primary);
  bottom: 30%; right: 40%;
  animation: orbFloat2 22s ease-in-out infinite alternate;
  opacity: 0.06;
}
@media (prefers-reduced-motion: reduce) {
  .orb-overlay::before, .orb-overlay::after { animation: none; opacity: 0.05; }
}

/* --- 3D Tilt Card Effect --- */
.tilt-card {
  perspective: 1000px;
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out;
}
.tilt-card-inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
}
.tilt-card-inner > * {
  backface-visibility: hidden;
}
.tilt-card-shine {
  position: absolute; inset: 0; z-index: 2;
  pointer-events: none;
  background: radial-gradient(
    circle at var(--tilt-x, 50%) var(--tilt-y, 50%),
    rgba(255, 255, 255, 0.06) 0%,
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}
.tilt-card:hover .tilt-card-shine {
  opacity: 1;
}

/* --- Shimmer Text Effect --- */
/* --- Shimmer Text (21st.dev stock pattern) --- */
@keyframes shimmerSwipe {
  from { background-position: 100% center; }
  to   { background-position: 0% center; }
}

.shimmer-text {
  display: inline-block; white-space: nowrap;
  background-size: 250% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  background-image: linear-gradient(
    90deg,
    var(--ferrari-ink) 0%,
    var(--ferrari-ink) 40%,
    var(--ferrari-primary) 50%,
    var(--ferrari-ink) 60%,
    var(--ferrari-ink) 100%
  );
  background-repeat: no-repeat;
  animation: shimmerSwipe 3s linear infinite;
}

/* --- Animated Gradient Section Divider --- */
.section-divider-glow {
  position: relative; height: 1px;
  background: var(--ferrari-hairline);
  overflow: visible;
  margin: 0;
}
.section-divider-glow::after {
  content: '';
  position: absolute; top: 0; left: 0; height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--ferrari-primary) 20%,
    var(--ferrari-primary) 80%,
    transparent 100%
  );
  animation: dividerPulse 3s ease-in-out infinite alternate;
}
@keyframes dividerPulse {
  0%   { width: 30%; left: 35%; opacity: 0.4; }
  100% { width: 50%; left: 25%; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .section-divider-glow::after {
    animation: none; width: 40%; left: 30%; opacity: 0.6;
  }
}

/* --- Pulse Glow CTA --- */
.btn-primary-glow {
  position: relative;
  overflow: visible;
}
.btn-primary-glow::after {
  content: '';
  position: absolute; inset: -2px; z-index: -1;
  border-radius: inherit;
  background: var(--ferrari-primary);
  opacity: 0;
  animation: ctaPulse 2.5s ease-in-out infinite;
}
@keyframes ctaPulse {
  0%, 100% { opacity: 0; transform: scale(1); }
  50%      { opacity: 0.25; transform: scale(1.03); }
}
@media (prefers-reduced-motion: reduce) {
  .btn-primary-glow::after { animation: none; }
}

/* --- Cinematic Light Beams (projector rays) --- */
.light-beams {
  position: relative; overflow: hidden;
}
.light-beams::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    linear-gradient(15deg, transparent 20%, rgba(218,41,28,0.12) 35%, transparent 50%),
    linear-gradient(5deg, transparent 40%, rgba(218,41,28,0.08) 50%, transparent 60%),
    linear-gradient(25deg, transparent 10%, rgba(255,255,255,0.04) 30%, transparent 45%);
  background-size: 300% 200%;
  animation: beamSweep 12s ease-in-out infinite alternate;
}
@keyframes beamSweep {
  0%   { opacity: 0.4; background-position: 0% 0%; }
  50%  { opacity: 0.9; }
  100% { opacity: 0.4; background-position: 100% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .light-beams::before { animation: none; opacity: 0.5; }
}

/* --- Floating Dust Particles (projector motes) --- */
.dust-particles {
  position: relative; overflow: hidden;
}
.dust-particle {
  position: absolute; z-index: 1; pointer-events: none;
  border-radius: 50%;
  background: rgba(218, 41, 28, 0.25);
  animation: dustFloat linear infinite;
}
@keyframes dustFloat {
  0%   { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
  10%  { opacity: 0.8; }
  90%  { opacity: 0.8; }
  100% { transform: translateY(-300px) translateX(60px) scale(0.2); opacity: 0; }
}

/* --- Animated Ring Glow Card --- */
.ring-glow-card {
  position: relative;
  transition: box-shadow 0.4s ease;
}
.ring-glow-card:hover {
  box-shadow:
    0 0 0 2px rgba(218, 41, 28, 0.5),
    0 0 30px rgba(218, 41, 28, 0.15),
    inset 0 0 30px rgba(218, 41, 28, 0.05);
}

/* --- Glitch Effect on hover (film posters) --- */
.glitch-hover {
  position: relative; overflow: hidden;
}
.glitch-hover::before,
.glitch-hover::after {
  content: ''; position: absolute; inset: 0;
  background: inherit;
  background-size: cover;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none; z-index: 1;
}
.glitch-hover::before {
  clip-path: inset(20% 0 40% 0);
  transform: translate(-3px, 0);
}
.glitch-hover::after {
  clip-path: inset(60% 0 20% 0);
  transform: translate(3px, 0);
}
.glitch-hover:hover::before {
  opacity: 0.6;
  animation: glitchShift1 0.3s steps(2) infinite;
}
.glitch-hover:hover::after {
  opacity: 0.6;
  animation: glitchShift2 0.3s steps(2) infinite;
}
@keyframes glitchShift1 {
  0%, 100% { transform: translate(-3px, 0); }
  50%      { transform: translate(2px, -1px); }
}
@keyframes glitchShift2 {
  0%, 100% { transform: translate(3px, 0); }
  50%      { transform: translate(-2px, 1px); }
}
@media (prefers-reduced-motion: reduce) {
  .glitch-hover:hover::before,
  .glitch-hover:hover::after { animation: none; opacity: 0; }
}

/* --- Marquee scroller (cinema scroll text) --- */
.marquee-wrapper {
  overflow: hidden; width: 100%;
  background: var(--ferrari-canvas-elevated);
  border-top: 1px solid var(--ferrari-hairline);
  border-bottom: 1px solid var(--ferrari-hairline);
  padding: 12px 0;
}
.marquee-track {
  display: flex; width: max-content;
  gap: 0;
  will-change: transform;
}
.marquee-group {
  display: flex; flex-shrink: 0;
  gap: 3.5rem;
  white-space: nowrap;
  margin-right: 3.5rem;
}
.marquee-group a,
.marquee-group span {
  white-space: nowrap;
}
.marquee-item {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--ferrari-font); font-size: 14px; font-weight: 500;
  color: var(--ferrari-body); white-space: nowrap;
  text-decoration: none; flex-shrink: 0;
  transition: color 0.2s ease;
}
.marquee-item:hover { color: var(--ferrari-primary); }
.marquee-item i { color: var(--ferrari-primary); }
.marquee-item strong { color: var(--ferrari-ink); }

/* --- Animated Dot Grid Background --- */
.dot-grid-bg {
  position: relative;
}
.dot-grid-bg::before {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none; z-index: 0;
  background-image: radial-gradient(
    circle at center,
    rgba(218, 41, 28, 0.06) 1px,
    transparent 1px
  );
  background-size: 32px 32px;
  opacity: 0.5;
  mask-image: radial-gradient(
    ellipse 80% 60% at 50% 40%,
    black 30%,
    transparent 70%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 80% 60% at 50% 40%,
    black 30%,
    transparent 70%
  );
}
@media (prefers-reduced-motion: reduce) {
  .dot-grid-bg::before { opacity: 0.3; }
}
/* Subtle movement on the dot grid via parent scroll — handled by JS if needed */

/* --- Gradient Border Glow Card --- */
.card-glow-border {
  position: relative;
  transition: border-color 0.4s ease;
}
.card-glow-border::before {
  content: '';
  position: absolute; inset: -1px; z-index: -1;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    transparent 30%,
    rgba(218, 41, 28, 0) 50%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
}
.card-glow-border:hover::before {
  background: linear-gradient(
    135deg,
    rgba(218, 41, 28, 0.3) 0%,
    rgba(218, 41, 28, 0.08) 50%,
    rgba(218, 41, 28, 0.3) 100%
  );
  opacity: 1;
}
.card-glow-border:hover {
  border-color: rgba(218, 41, 28, 0.4);
}

/* --- Counter Animation --- */
.counter-animate {
  display: inline-block;
}
@keyframes countUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.counter-animate.counted {
  animation: countUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ========================================================================
   SKELETON SHIMMER — Premium loading state (replaces spinner)
   ======================================================================== */

@keyframes shimmerSlide {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  position: relative; overflow: hidden;
  background: var(--ferrari-canvas-elevated);
}
.skeleton::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.03) 35%,
    rgba(255,255,255,0.06) 50%,
    rgba(255,255,255,0.03) 65%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmerSlide 2.5s ease-in-out infinite;
}
.skeleton-rounded { border-radius: 4px; }
.skeleton-text   { height: 14px; width: 70%; border-radius: 4px; }
.skeleton-title  { height: 22px; width: 55%; border-radius: 4px; }
.skeleton-poster { aspect-ratio: 2/3; border-radius: 0; }
.skeleton-circle { border-radius: 50%; }

@media (prefers-reduced-motion: reduce) {
  .skeleton::after { animation: none; }
}

/* ========================================================================
   RIPPLE CLICK EFFECT — Material-like wave from click point
   ======================================================================== */

.ripple-container {
  position: relative; overflow: hidden;
}
.ripple-effect {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transform: scale(0);
  animation: rippleBurst 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  pointer-events: none;
}
@keyframes rippleBurst {
  to { transform: scale(4); opacity: 0; }
}

/* ========================================================================
   MAGNETIC HOVER — Button follows cursor slightly
   ======================================================================== */

.magnetic-btn {
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
}

/* ========================================================================
   ENHANCED SPOTLIGHT — Card borders illuminate on cursor proximity
   ======================================================================== */

.card-spotlight-enhanced {
  position: relative; overflow: hidden;
  --spot-x: 50%; --spot-y: 50%;
  transition: border-color 0.3s ease;
}
.card-spotlight-enhanced::before {
  content: '';
  position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(
    700px circle at var(--spot-x) var(--spot-y),
    rgba(218, 41, 28, 0.08),
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.card-spotlight-enhanced:hover::before {
  opacity: 1;
}

/* ========================================================================
   FLUID ISLAND NAVBAR — Floating glass pill detached from top
   ======================================================================== */

.navbar-fluid-island {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  z-index: 50;
  background: rgba(24, 24, 24, 0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset,
              0 4px 24px rgba(0, 0, 0, 0.3);
  width: 100%;
  padding: 0 1.5rem;
  height: 52px;
  display: flex; align-items: center;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
/* Glass effect intensifies on scroll */
.navbar-fluid-island.scrolled {
  background: rgba(24, 24, 24, 0.95);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

/* Hamburger morph lines */
.hamburger-line {
  display: block; width: 20px; height: 1.5px;
  background: var(--ferrari-ink);
  border-radius: 1px;
  transition: all 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  transform-origin: center;
}
.hamburger-open .hamburger-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.hamburger-open .hamburger-line:nth-child(2) {
  opacity: 0; transform: scaleX(0);
}
.hamburger-open .hamburger-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile menu — sidebar slide-in with semi-transparent backdrop */
.mobile-menu-backdrop {
  position: fixed; inset: 0; z-index: 54;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0; visibility: hidden;
  transition: opacity 0.35s cubic-bezier(0.32, 0.72, 0, 1),
              visibility 0.35s;
}
.mobile-menu-backdrop.open {
  opacity: 1; visibility: visible;
}

.mobile-menu-overlay {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 55;
  width: min(82vw, 340px);
  background: var(--ferrari-canvas);
  border-right: 1px solid var(--ferrari-hairline);
  display: flex; flex-direction: column;
  padding: 5rem 1.75rem 2rem;
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  overflow-y: auto;
}
.mobile-menu-overlay.open {
  transform: translateX(0);
}
.mobile-menu-link {
  display: block;
  font-family: var(--ferrari-font); font-size: 20px;
  font-weight: 500; line-height: 1.3; letter-spacing: -0.3px;
  color: var(--ferrari-ink);
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--ferrari-hairline);
  opacity: 0; transform: translateX(-12px);
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  text-decoration: none;
}
.mobile-menu-overlay.open .mobile-menu-link {
  opacity: 1; transform: translateX(0);
}
.mobile-menu-link:nth-child(1) { transition-delay: 0.06s; }
.mobile-menu-link:nth-child(2) { transition-delay: 0.12s; }
.mobile-menu-link:nth-child(3) { transition-delay: 0.18s; }
.mobile-menu-link:nth-child(4) { transition-delay: 0.24s; }
.mobile-menu-link:nth-child(5) { transition-delay: 0.30s; }
.mobile-menu-link:nth-child(6) { transition-delay: 0.36s; }
.mobile-menu-link:nth-child(7) { transition-delay: 0.42s; }

@media (min-width: 1024px) {
  .navbar-fluid-island {
    max-width: 720px;
  }
}

/* ========================================================================
   SCROLL REVEAL ENHANCED — Blur + fade + slide via IntersectionObserver
   ======================================================================== */

.reveal-cinematic {
  opacity: 0;
  transform: translateY(32px);
  filter: blur(8px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              filter 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-cinematic.revealed {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
.reveal-cinematic-delay-1 { transition-delay: 0.1s; }
.reveal-cinematic-delay-2 { transition-delay: 0.2s; }
.reveal-cinematic-delay-3 { transition-delay: 0.3s; }
.reveal-cinematic-delay-4 { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  .reveal-cinematic {
    opacity: 1; transform: none; filter: none; transition: none;
  }
}

/* ========================================================================
   ACETERNITY EFFECTS — Cinematic Micro-Interactions
   Ferrari-adapted: premium, restrained, dark-canvas optimized
   ======================================================================== */

/* --- 1. Hero Parallax --- */
.hero-parallax {
  position: relative; overflow: hidden;
}

.hero-parallax [data-parallax-speed] {
  will-change: transform, opacity;
  transition: none;
}

.hero-parallax-layer {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}

/* --- 2. Card Spotlight --- */
.card-spotlight {
  position: relative; overflow: hidden;
  --spot-x: 50%; --spot-y: 50%;
}

.card-spotlight::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(
    600px circle at var(--spot-x) var(--spot-y),
    rgba(218, 41, 28, 0.12),
    transparent 40%
  );
  opacity: 0; transition: opacity 0.3s ease;
  pointer-events: none;
}

.card-spotlight-active::after {
  opacity: 1;
}

.card-spotlight:hover {
  border-color: var(--ferrari-primary);
}

.card-spotlight img {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.card-spotlight:hover img {
  transform: scale(1.03);
}

/* --- 3. Focus Cards --- */
.focus-cards-container {
  display: grid;
}

.focus-card {
  transition: filter 0.4s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}

.focus-card-blur {
  filter: blur(2px) brightness(0.85);
  opacity: 0.8;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.focus-card-active {
  filter: blur(0) brightness(1);
  opacity: 1;
  transform: scale(1.02);
  z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  .focus-card-blur,
  .focus-card-active {
    filter: none; opacity: 1; transform: none;
  }
}

/* --- 4. Animated Tabs --- */
.animated-tabs {
  position: relative; display: inline-flex;
  background: var(--ferrari-canvas);
  border-bottom: 1px solid var(--ferrari-hairline);
}

.animated-tab {
  position: relative; z-index: 2;
  padding: 12px 24px;
  font-family: var(--ferrari-font); font-size: 13px; font-weight: 600;
  line-height: 1.4; letter-spacing: 0.65px; text-transform: uppercase;
  color: var(--ferrari-body);
  background: transparent; border: none; cursor: pointer;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.animated-tab:hover {
  color: var(--ferrari-ink);
}

.animated-tab.active {
  color: var(--ferrari-ink);
}

.animated-tab-indicator {
  position: absolute; bottom: 0; left: 0; z-index: 1;
  height: 2px;
  background: var(--ferrari-primary);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  opacity: 0;
}

/* --- 5. Sticky Scroll Reveal --- */
.sticky-reveal-container {
  display: grid; grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

@media (max-width: 768px) {
  .sticky-reveal-container {
    grid-template-columns: 1fr;
  }
}

.sticky-reveal-image {
  position: sticky; top: 80px;
  height: calc(100vh - 80px);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}

.sticky-reveal-image img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.sticky-reveal-text {
  padding: 96px 48px;
}

.reveal-on-scroll {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal-on-scroll.revealed {
  opacity: 1; transform: translateY(0);
}

/* --- 6. Text Generate --- */
.text-generate {
  visibility: hidden;
}

/* --- 7. Aurora Background --- */
.aurora-bg {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

/* --- 8. Floating Navbar --- */
.floating-navbar {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

/* --- 9. Hero Highlight --- */
.hero-highlight-text {
  position: relative; display: inline;
}

.hero-highlight-text::after {
  content: ''; position: absolute;
  left: -4px; right: -4px; bottom: 4px; height: 30%;
  background: linear-gradient(180deg, transparent, rgba(218, 41, 28, 0.25));
  z-index: -1;
  animation: highlightPulse 3s ease-in-out infinite;
}

@keyframes highlightPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.hero-highlight-active {
  animation: highlightGlow 2s ease-out forwards;
}

@keyframes highlightGlow {
  from { text-shadow: 0 0 0 rgba(218, 41, 28, 0); }
  40% { text-shadow: 0 0 20px rgba(218, 41, 28, 0.4); }
  to { text-shadow: 0 0 0 rgba(218, 41, 28, 0); }
}

/* --- 10. Apple Cards Carousel --- */
.apple-carousel {
  position: relative; overflow: hidden;
}

.apple-carousel-track {
  display: flex; gap: 1rem;
  overflow-x: auto; scroll-behavior: smooth;
  padding: 2rem 0;
  -ms-overflow-style: none; scrollbar-width: none;
}

.apple-carousel-track::-webkit-scrollbar { display: none; }

.apple-carousel-card {
  flex-shrink: 0; width: 280px;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}

@media (min-width: 640px) {
  .apple-carousel-card { width: 320px; }
}

@media (min-width: 1024px) {
  .apple-carousel-card { width: 380px; }
}

/* --- 11. Lamp Effect --- */
.lamp-header {
  position: relative; text-align: center;
}

.lamp-text {
  transition: color 0.8s ease, text-shadow 0.8s ease;
  color: var(--ferrari-muted);
}

.lamp-text.lamp-lit {
  color: var(--ferrari-ink);
}

/* --- 12. Expandable Cards --- */
.expandable-cards-container {
  display: grid; gap: 1rem;
}

.expandable-card {
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.expandable-preview { display: block; }

.expandable-detail {
  max-height: 0; overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.3s ease,
              padding 0.3s ease;
  opacity: 0;
}

.expandable-card.expanded .expandable-detail {
  max-height: 1000px;
  opacity: 1;
  padding-top: 16px;
}

.expandable-card.expanded {
  border-color: var(--ferrari-primary);
}

/* --- 13. Glare Card --- */
.glare-card {
  position: relative; overflow: hidden;
  --glare-x: 50%; --glare-y: 50%;
}

.glare-card::before {
  content: ''; position: absolute; inset: 0; z-index: 2;
  background: radial-gradient(
    400px circle at var(--glare-x) var(--glare-y),
    rgba(255, 255, 255, 0.06),
    transparent 50%
  );
  pointer-events: none;
  opacity: 0; transition: opacity 0.3s ease;
}

.glare-card:hover::before {
  opacity: 1;
}

/* --- 14. Cinematic Page Transition (enhanced) --- */
@keyframes pageInCinematic {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cinematic-enter {
  animation: pageInCinematic 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* --- 15. Film Poster Reveal --- */
@keyframes posterReveal {
  from { opacity: 0; transform: scale(1.08); filter: brightness(0.4); }
  to { opacity: 1; transform: scale(1); filter: brightness(1); }
}

.poster-reveal {
  animation: posterReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ========================================================================
   21st.dev TRAVELCARD — Adapted for CineBase film/offer cards
   ======================================================================== */

.cine-card {
  position: relative; overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.cine-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.cine-card img {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.cine-card:hover img {
  transform: scale(1.08);
}
.cine-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.35) 50%, transparent 100%);
  pointer-events: none;
}
.cine-card-body {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.cine-card:hover .cine-card-body {
  transform: translateY(-3.5rem);
}
.cine-card-action {
  position: absolute; bottom: -4rem; left: 0; right: 0; padding: 0 1.5rem 1.5rem;
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.cine-card:hover .cine-card-action {
  bottom: 0; opacity: 1;
}

/* ========================================================================
   21st.dev ALERT DIALOG — Modal confirm
   ======================================================================== */

.alert-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  animation: alertFadeIn 0.2s ease;
}
@keyframes alertFadeIn { from { opacity: 0; } to { opacity: 1; } }

.alert-dialog {
  background: var(--ferrari-canvas-elevated, #303030);
  border: 1px solid var(--ferrari-hairline, #404040);
  padding: 1.5rem; max-width: 28rem; width: 90%;
  animation: alertZoomIn 0.25s cubic-bezier(0.22,1,0.36,1);
}
@keyframes alertZoomIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.alert-dialog-title {
  font-size: 1.1rem; font-weight: 600; color: var(--ferrari-ink);
  display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem;
}
.alert-dialog-desc {
  font-size: 0.875rem; color: var(--ferrari-body); margin-bottom: 1.25rem; line-height: 1.5;
}
.alert-dialog-actions {
  display: flex; justify-content: flex-end; gap: 0.75rem;
}

/* ========================================================================
   21st.dev PROGRESS SPINNER — Animated circle
   ======================================================================== */

.progress-spinner {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
}
.progress-spinner svg {
  width: 100%; height: 100%;
  animation: spin 0.8s linear infinite;
}
.progress-spinner circle {
  fill: none;
  stroke: var(--ferrari-primary);
  stroke-width: 3;
  stroke-dasharray: 60;
  stroke-dashoffset: 45;
  stroke-linecap: round;
}

.progress-spinner-sm { width: 20px; height: 20px; }
.progress-spinner-sm circle { stroke-width: 2.5; stroke-dasharray: 40; stroke-dashoffset: 30; }
.progress-spinner-lg { width: 48px; height: 48px; }
.progress-spinner-lg circle { stroke-width: 3.5; stroke-dasharray: 80; stroke-dashoffset: 60; }

/* ========================================================================
   Details / Summary Accordion
   ======================================================================== */

details.card-ferrari[open] {
  border-color: var(--ferrari-primary);
}
details.card-ferrari summary::-webkit-details-marker {
  display: none;
}
details.card-ferrari[open] summary i.fa-chevron-down {
  transform: rotate(180deg);
}

/* ========================================================================
   Notifications Popover
   ======================================================================== */

.notif-popover {
  animation: notifPopIn 0.18s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: top right;
}
@keyframes notifPopIn {
  from { opacity: 0; transform: scale(0.92) translateY(-4px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Bell shake animation */
@keyframes bellShake {
  0%   { transform: rotate(0deg); }
  15%  { transform: rotate(14deg); }
  30%  { transform: rotate(-12deg); }
  45%  { transform: rotate(10deg); }
  60%  { transform: rotate(-8deg); }
  75%  { transform: rotate(4deg); }
  90%  { transform: rotate(-2deg); }
  100% { transform: rotate(0deg); }
}

@keyframes bellPulse {
  0%, 100% { transform: rotate(0deg) scale(1); color: inherit; }
  25%  { transform: rotate(6deg) scale(1.05); }
  50%  { transform: rotate(-4deg) scale(1.08); color: var(--ferrari-primary); }
  75%  { transform: rotate(2deg) scale(1.05); }
}

.bell-shake {
  animation: bellShake 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.bell-new-notif {
  animation: bellPulse 0.7s cubic-bezier(0.22, 1, 0.36, 1) 3;
  color: var(--ferrari-primary) !important;
}

.bell-new-notif .fa-bell {
  animation: bellShake 0.6s cubic-bezier(0.22, 1, 0.36, 1) 2;
}

#notif-toggle:hover i {
  animation: bellShake 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.notif-popover-inner {
  background: var(--ferrari-canvas-elevated, #303030);
  border: 1px solid var(--ferrari-hairline, #303030);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

/* Carousel transition */
.notif-carousel-enter {
  animation: notifSlideIn 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes notifSlideIn {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Notification dot indicator */
.notif-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ferrari-hairline);
  transition: background 0.2s;
}
.notif-dot.active {
  background: var(--ferrari-primary);
}

/* Scrollbar for notification list */
#notif-list::-webkit-scrollbar { width: 3px; }
#notif-list::-webkit-scrollbar-track { background: transparent; }
#notif-list::-webkit-scrollbar-thumb {
  background: var(--ferrari-hairline);
  border-radius: 10px;
}

/* ─── Accessibility Badges ─────────────────────────────── */
.a11y-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  margin-left: 3px;
  vertical-align: middle;
}
.a11y-subs {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}
.a11y-ad {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
}
.show-time-btn.hidden {
  display: none !important;
}

/* ─── Admin Shell Theme Overrides ──────────────────────── */
/* Dark mode (default) — override the inline light styles */
#admin-shell-root {
  background: var(--ferrari-canvas) !important;
}
#admin-shell-content {
  background: var(--ferrari-canvas) !important;
}
#admin-sidebar {
  background: #1a1a1a !important;
  border-color: #2a2a2a !important;
}
#admin-sidebar .border-\[\#e5e5e5\] {
  border-color: #2a2a2a !important;
}
#admin-sidebar .text-\[\#111\] {
  color: #ffffff !important;
}
#admin-sidebar .text-\[\#888\],
#admin-sidebar .text-\[\#999\] {
  color: #aaa !important;
}
/* Admin sidebar links — dark mode text on dark bg */
.admin-link {
  color: #ddd !important;
}
.admin-link:hover {
  color: var(--ferrari-primary) !important;
  background: rgba(218,41,28,0.08) !important;
}
.admin-link.active {
  color: var(--ferrari-primary) !important;
  background: rgba(218,41,28,0.12) !important;
}
/* Admin header top bar */
#admin-shell-root header {
  background: var(--ferrari-canvas-elevated) !important;
  border-color: #2a2a2a !important;
}
#admin-shell-root header .text-\[\#111\] {
  color: #ffffff !important;
}
#admin-shell-root header .text-\[\#555\],
#admin-shell-root header .text-\[\#333\] {
  color: #ccc !important;
}
#admin-shell-root header .text-\[\#555\]:hover,
#admin-shell-root header .text-\[\#333\]:hover {
  color: #fff !important;
}
#admin-shell-root header .border-\[\#e5e5e5\] {
  border-color: #2a2a2a !important;
}
/* Admin user menu — dark mode */
#admin-user-menu {
  background: #1a1a1a !important;
  border-color: #2a2a2a !important;
}
#admin-user-menu .text-\[\#aaa\] {
  color: #bbb !important;
}
#admin-user-menu .border-\[\#2a2a2a\] {
  border-color: #333 !important;
}

/* Light mode */
html.light #admin-shell-root {
  background: #f5f5f5 !important;
}
html.light #admin-shell-content {
  background: #f5f5f5 !important;
}
html.light #admin-sidebar {
  background: #ffffff !important;
  border-color: #e5e5e5 !important;
}
html.light #admin-sidebar .border-\[\#e5e5e5\] {
  border-color: #e5e5e5 !important;
}
html.light #admin-sidebar .text-\[\#111\] {
  color: #111 !important;
}
html.light #admin-sidebar .text-\[\#888\],
html.light #admin-sidebar .text-\[\#999\] {
  color: #888 !important;
}
html.light .admin-link {
  color: #333 !important;
}
html.light .admin-link:hover {
  color: var(--ferrari-primary) !important;
  background: rgba(218,41,28,0.06) !important;
}
html.light .admin-link.active {
  color: var(--ferrari-primary) !important;
  background: rgba(218,41,28,0.06) !important;
}
html.light #admin-shell-root header {
  background: rgba(255, 255, 255, 0.9) !important;
  border-color: #e5e5e5 !important;
}
html.light #admin-shell-root header .text-\[\#111\] {
  color: #111 !important;
}
html.light #admin-shell-root header .text-\[\#555\],
html.light #admin-shell-root header .text-\[\#333\] {
  color: #555 !important;
}
html.light #admin-shell-root header .text-\[\#555\]:hover,
html.light #admin-shell-root header .text-\[\#333\]:hover {
  color: #111 !important;
}
html.light #admin-shell-root header .border-\[\#e5e5e5\] {
  border-color: #e5e5e5 !important;
}
html.light #admin-user-menu {
  background: #fff !important;
  border-color: #e5e5e5 !important;
}
html.light #admin-user-menu .text-\[\#aaa\] {
  color: #666 !important;
}
html.light #admin-user-menu .border-\[\#2a2a2a\] {
  border-color: #e5e5e5 !important;
}

