/* ========================================================
   Supercar Headlights Dynamic Lighting System
   مؤسسة النور - نظام إضاءة المصابيح التفاعلي مع الحركة والتمرير
   Optimized for Desktop & Mobile Users (CSS Grid 3-Column Architecture)
   ======================================================== */

:root {
  --car-lamp-glow-color: #00d2ff;
  --car-lamp-core-color: #ffffff;
  --car-amber-accent: #ff7700;
}

/* --------------------------------------------------------
   1. FIXED AMBIENT SIDE FLANKS (Left & Right Viewport Wings on Scroll)
   -------------------------------------------------------- */
.supercar-flank {
  position: fixed !important;
  top: 105px !important; /* Positioned safely below Header 1 + Header 2 */
  bottom: 0 !important;
  width: clamp(100px, 9.5vw, 175px) !important;
  z-index: 1010 !important; /* Below Header 1 (1055) and Header 2 (1050) */
  pointer-events: none !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: opacity 0.5s ease, width 0.3s ease, right 0.3s ease, top 0.3s ease !important;
  user-select: none !important;
}

/* Sidebar mode: Header 1 is docked as a vertical bar, Header 2 is at top (height ~46px) */
body.side-drawer-active .supercar-flank {
  top: 48px !important;
}

/* Sidebar mode in RTL: offset right flank so it doesn't touch or overlap the sidebar */
html[dir="rtl"] body.side-drawer-active.sidebar-collapsed .supercar-flank-right,
body.side-drawer-active.sidebar-collapsed[dir="rtl"] .supercar-flank-right {
  right: 76px !important;
}
html[dir="rtl"] body.side-drawer-active:not(.sidebar-collapsed) .supercar-flank-right,
body.side-drawer-active:not(.sidebar-collapsed)[dir="rtl"] .supercar-flank-right {
  right: 258px !important;
}

.supercar-flank-left {
  left: 0 !important;
  -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.85) 60%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.85) 60%, rgba(0, 0, 0, 0) 100%);
}

.supercar-flank-right {
  right: 0 !important;
  -webkit-mask-image: linear-gradient(to left, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.85) 60%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(to left, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.85) 60%, rgba(0, 0, 0, 0) 100%);
}



.supercar-flank-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

.supercar-flank .car-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
  pointer-events: none;
}

.supercar-flank .car-img-base {
  opacity: 0.95;
  filter: contrast(1.05) brightness(0.95);
  transition: filter 0.4s ease;
}

.supercar-flank .car-img-lit {
  opacity: 0.12;
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), filter 0.85s ease;
  will-change: opacity, filter;
}

/* Light beam cones emanating from the side lamps */
.supercar-beam-cone {
  position: absolute;
  top: 38%;
  width: 280px;
  height: 220px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease-out;
  mix-blend-mode: screen;
  will-change: opacity;
}

.beam-left {
  left: 35%;
  background: radial-gradient(ellipse at 15% 45%, rgba(255, 255, 255, 0.9) 0%, rgba(0, 210, 255, 0.65) 25%, rgba(0, 150, 255, 0.2) 55%, transparent 75%);
  clip-path: polygon(10% 45%, 100% 0%, 100% 100%);
}

.beam-right {
  right: 35%;
  background: radial-gradient(ellipse at 85% 45%, rgba(255, 255, 255, 0.9) 0%, rgba(0, 210, 255, 0.65) 25%, rgba(0, 150, 255, 0.2) 55%, transparent 75%);
  clip-path: polygon(90% 45%, 0% 0%, 0% 100%);
}

/* Core Starburst Flare */
.supercar-lamp-glow {
  position: absolute;
  top: 50%;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease-out, transform 0.3s ease;
  mix-blend-mode: screen;
  filter: blur(4px);
}

.glow-left {
  left: 45%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, #ffffff 0%, rgba(130, 230, 255, 0.95) 25%, rgba(0, 180, 255, 0.4) 55%, transparent 75%);
}

.glow-right {
  right: 45%;
  transform: translate(50%, -50%);
  background: radial-gradient(circle, #ffffff 0%, rgba(130, 230, 255, 0.95) 25%, rgba(0, 180, 255, 0.4) 55%, transparent 75%);
}

/* --------------------------------------------------------
   2. HERO SHOWCASE STAGE (Grid 3-Column Architecture)
   -------------------------------------------------------- */
.supercar-hero-stage {
  direction: ltr !important; /* Force physical Left = Col 1, Center = Col 2, Right = Col 3 */
  display: grid !important;
  grid-template-columns: clamp(65px, 20vw, 240px) minmax(0, 1fr) clamp(65px, 20vw, 240px) !important;
  align-items: stretch !important;
  justify-content: space-between !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  position: relative;
  background: linear-gradient(135deg, #090e17 0%, #0f172a 45%, #181d28 100%);
  border: 1px solid rgba(255, 120, 0, 0.35);
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  border-radius: 0 0 16px 16px !important;
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.5), 0 0 25px rgba(255, 120, 0, 0.15);
  min-height: 170px;
  margin-top: 0 !important;
}

[data-bs-theme="light"] .supercar-hero-stage {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  color: #ffffff;
}

.supercar-hero-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 120%, rgba(255, 115, 0, 0.18) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
}

/* Hero Wings (Left & Right Car Cards in Grid) */
.supercar-hero-wing {
  position: relative;
  width: 100% !important;
  height: 100% !important;
  min-height: 180px;
  z-index: 2;
  cursor: pointer;
  overflow: hidden;
  user-select: none;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.hero-wing-left {
  grid-column: 1 !important; /* Left car is strictly Column 1 */
  border-top-left-radius: inherit;
  border-bottom-left-radius: inherit;
}

.supercar-hero-center {
  grid-column: 2 !important; /* Center content is strictly Column 2 */
  direction: rtl !important; /* Arabic content stays readable RTL */
  position: relative;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  z-index: 3;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  padding: 0.75rem 0.35rem !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.hero-wing-right {
  grid-column: 3 !important; /* Right car is strictly Column 3 */
  border-top-right-radius: inherit;
  border-bottom-right-radius: inherit;
}

.supercar-hero-wing:hover {
  transform: scale(1.02);
}

.supercar-hero-wing:active {
  transform: scale(0.98);
}

.supercar-wing-card {
  position: relative;
  width: 100% !important;
  height: 100% !important;
  min-height: 180px;
  overflow: hidden;
}

.supercar-wing-card .car-img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  object-position: center 48%;
  pointer-events: none;
}

.supercar-wing-card .car-img-base {
  opacity: 0.95;
}

.supercar-wing-card .car-img-lit {
  opacity: 0.12;
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity;
}

/* Wing Edge Glow Accents */
.hero-wing-left::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 3px;
  background: linear-gradient(to bottom, transparent, rgba(255, 120, 0, 0.6), transparent);
  z-index: 3;
}

.hero-wing-right::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: linear-gradient(to bottom, transparent, rgba(255, 120, 0, 0.6), transparent);
  z-index: 3;
}

/* Wing Badges */
.wing-side-badge {
  position: absolute;
  bottom: 8px;
  padding: 2px 8px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 140, 0, 0.4);
  color: #ff9d00;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 3px;
}

.badge-left {
  left: 6px;
}

.badge-right {
  right: 6px;
}

/* Hero Lamp Flares & Beams */
.hero-lamp-flare {
  position: absolute;
  top: 50%;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  mix-blend-mode: screen;
  filter: blur(3px);
  z-index: 3;
}

.hero-lamp-flare.flare-left {
  left: 45%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, #ffffff 0%, rgba(130, 230, 255, 0.95) 25%, rgba(0, 180, 255, 0.4) 55%, transparent 75%);
}

.hero-lamp-flare.flare-right {
  right: 45%;
  transform: translate(50%, -50%);
  background: radial-gradient(circle, #ffffff 0%, rgba(130, 230, 255, 0.95) 25%, rgba(0, 180, 255, 0.4) 55%, transparent 75%);
}

.hero-beam-cone {
  position: absolute;
  top: 36%;
  width: 180px;
  height: 150px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease-out;
  mix-blend-mode: screen;
  z-index: 3;
}

.hero-beam-left {
  left: 40%;
  background: radial-gradient(ellipse at 15% 45%, rgba(255, 255, 255, 0.95) 0%, rgba(0, 210, 255, 0.7) 25%, rgba(0, 150, 255, 0.25) 55%, transparent 75%);
  clip-path: polygon(10% 45%, 100% 0%, 100% 100%);
}

.hero-beam-right {
  right: 40%;
  background: radial-gradient(ellipse at 85% 45%, rgba(255, 255, 255, 0.95) 0%, rgba(0, 210, 255, 0.7) 25%, rgba(0, 150, 255, 0.25) 55%, transparent 75%);
  clip-path: polygon(90% 45%, 0% 0%, 0% 100%);
}

/* Center Content Styling */
.hero-brand-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 50px;
  background: rgba(255, 120, 0, 0.15);
  border: 1px solid rgba(255, 120, 0, 0.4);
  color: #ff9d2e;
  box-shadow: 0 2px 8px rgba(255, 120, 0, 0.2);
  white-space: nowrap;
}

.hero-main-title {
  font-size: clamp(1rem, 2.4vw, 1.8rem);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.hero-sub-text {
  font-size: clamp(0.7rem, 1.1vw, 0.88rem);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.35;
}

/* Interactive Controls & Telemetry Status */
.headlight-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(0, 210, 255, 0.35);
  color: #a5f3fc;
  white-space: nowrap;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* --------------------------------------------------------
   3. ILLUMINATION ACTIVE STATES ("when scrolling or moving")
   -------------------------------------------------------- */

/* Main Active Trigger State */
body.car-lamps-lit .supercar-flank .car-img-lit,
body.car-lamps-lit .supercar-hero-wing .car-img-lit,
.supercar-hero-stage.lights-forced .supercar-hero-wing .car-img-lit {
  opacity: 1 !important;
  filter: drop-shadow(0 0 25px rgba(0, 210, 255, 0.75)) brightness(1.1);
  transition: opacity 0.12s cubic-bezier(0.16, 1, 0.3, 1), filter 0.2s ease;
}

body.car-lamps-lit .supercar-beam-cone,
body.car-lamps-lit .hero-beam-cone,
.supercar-hero-stage.lights-forced .hero-beam-cone {
  opacity: 0.9 !important;
  transition: opacity 0.15s ease-out;
}

body.car-lamps-lit .supercar-lamp-glow,
body.car-lamps-lit .hero-lamp-flare,
.supercar-hero-stage.lights-forced .hero-lamp-flare {
  opacity: 1 !important;
  animation: lampCorePulse 1.8s infinite ease-in-out;
  transition: opacity 0.12s ease-out;
}

body.car-lamps-lit .pulse-dot,
.supercar-hero-stage.lights-forced .pulse-dot {
  background-color: #00e5ff;
  box-shadow: 0 0 12px #00e5ff, 0 0 20px #00e5ff;
  animation: dotFlash 0.9s infinite alternate;
}

/* High Beam Extra Burst (on fast scrolling or clicks) */
body.car-high-beam .supercar-flank .car-img-lit,
body.car-high-beam .supercar-hero-wing .car-img-lit {
  filter: drop-shadow(0 0 35px rgba(0, 229, 255, 0.95)) brightness(1.25) contrast(1.1);
}

body.car-high-beam .supercar-beam-cone,
body.car-high-beam .hero-beam-cone {
  opacity: 1 !important;
  transform: scale(1.08);
}

/* Ambient Stage Rim Glow when lamps are lit */
body.car-lamps-lit .supercar-hero-stage,
.supercar-hero-stage.lights-forced {
  border-color: rgba(0, 210, 255, 0.55);
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.5), 0 0 35px rgba(0, 210, 255, 0.25), inset 0 0 25px rgba(0, 210, 255, 0.1);
}

/* --------------------------------------------------------
   4. KEYFRAME ANIMATIONS
   -------------------------------------------------------- */
@keyframes lampCorePulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.92;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.18);
    opacity: 1;
  }
}

.flare-right, .glow-right {
  animation-name: lampCorePulseRight !important;
}

@keyframes lampCorePulseRight {
  0%, 100% {
    transform: translate(50%, -50%) scale(1);
    opacity: 0.92;
  }
  50% {
    transform: translate(50%, -50%) scale(1.18);
    opacity: 1;
  }
}

@keyframes dotFlash {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1.3); opacity: 1; }
}

/* --------------------------------------------------------
   5. RESPONSIVE ADAPTATIONS (Desktop, Tablet, Mobile)
   -------------------------------------------------------- */
@media (max-width: 1199.98px) {
  .supercar-flank {
    width: clamp(80px, 9vw, 120px);
  }
}

@media (max-width: 991.98px) {
  .supercar-hero-stage {
    min-height: 165px;
    grid-template-columns: clamp(55px, 18vw, 150px) minmax(0, 1fr) clamp(55px, 18vw, 150px) !important;
  }
  
  /* Mobile & tablet flank active */
}

/* Mobile Screens (Under 768px: Smartphones & Phablets) */
@media (max-width: 767.98px) {
  .supercar-hero-stage {
    direction: ltr !important;
    display: grid !important;
    grid-template-columns: clamp(50px, 16vw, 75px) minmax(0, 1fr) clamp(50px, 16vw, 75px) !important;
    min-height: 140px !important;
    border-radius: 12px;
    margin-bottom: 0.85rem;
  }

  .hero-wing-left {
    grid-column: 1 !important;
    min-height: 140px !important;
  }

  .supercar-hero-center {
    grid-column: 2 !important;
    padding: 0.4rem 0.15rem !important;
  }

  .hero-wing-right {
    grid-column: 3 !important;
    min-height: 140px !important;
  }

  .supercar-wing-card {
    min-height: 140px !important;
  }

  .hero-brand-pill {
    padding: 1px 6px;
    font-size: 0.6rem;
    margin-bottom: 2px !important;
  }

  .hero-main-title {
    font-size: clamp(0.85rem, 3.2vw, 1.15rem) !important;
    margin-bottom: 2px !important;
    line-height: 1.25;
  }

  .hero-sub-text {
    font-size: 0.62rem;
    line-height: 1.25;
    margin-bottom: 4px !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .btn-flash-headlights,
  .btn-toggle-lights {
    padding: 1px 6px !important;
    font-size: 0.65rem !important;
  }

  .headlight-status-indicator {
    padding: 1px 6px;
    font-size: 0.62rem;
  }

  .wing-side-badge {
    bottom: 3px;
    font-size: 0.52rem;
    padding: 1px 4px;
  }

  .badge-left {
    left: 3px;
  }

  .badge-right {
    right: 3px;
  }

  .hero-beam-cone {
    width: 90px;
    height: 90px;
  }

  .hero-lamp-flare {
    width: 60px;
    height: 60px;
  }

  /* Flanks disabled completely to protect headers and screen content */
  /* Mobile & tablet flank active */
}

/* Accessibility: Respect Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .supercar-flank .car-img-lit,
  .supercar-hero-wing .car-img-lit,
  .supercar-beam-cone,
  .hero-beam-cone,
  .supercar-lamp-glow,
  .hero-lamp-flare {
    transition: none !important;
    animation: none !important;
  }
}


/* --------------------------------------------------------
   Central Protected Content Safezone & Responsive Ambient Flanks
   Guarantees that flanks are beautifully visible on Desktop, Tablet & Mobile,
   while ALL page content remains 100% visible, fully readable & unclipped.
   -------------------------------------------------------- */
.index-content-safezone {
  position: relative !important;
  z-index: 1025 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  transition: padding 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Desktop Screens (>= 992px) */
@media (min-width: 992px) {
  .supercar-flank {
    display: flex !important;
    width: clamp(100px, 9.5vw, 175px) !important;
  }
  .index-content-safezone {
    padding-left: clamp(115px, 11vw, 195px) !important;
    padding-right: clamp(115px, 11vw, 195px) !important;
  }
}

/* Tablet Screens (768px - 991.98px) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .supercar-flank {
    display: flex !important;
    width: clamp(55px, 8vw, 85px) !important;
    top: 50px !important;
    z-index: 1010 !important;
    pointer-events: none !important;
  }
  .index-content-safezone {
    padding-left: clamp(65px, 9vw, 95px) !important;
    padding-right: clamp(65px, 9vw, 95px) !important;
  }
}

/* Mobile Screens (<= 767.98px) */
@media (max-width: 767.98px) {
  .supercar-flank {
    display: flex !important;
    width: clamp(34px, 9vw, 48px) !important;
    top: 46px !important;
    bottom: 0 !important;
    z-index: 1010 !important;
    pointer-events: none !important;
    opacity: 0.9 !important;
  }
  .supercar-flank-left {
    left: 0 !important;
    -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.85) 60%, rgba(0, 0, 0, 0) 100%) !important;
    mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.85) 60%, rgba(0, 0, 0, 0) 100%) !important;
  }
  .supercar-flank-right {
    right: 0 !important;
    -webkit-mask-image: linear-gradient(to left, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.85) 60%, rgba(0, 0, 0, 0) 100%) !important;
    mask-image: linear-gradient(to left, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.85) 60%, rgba(0, 0, 0, 0) 100%) !important;
  }
  .supercar-flank .car-img {
    object-fit: cover !important;
    object-position: center 48% !important;
  }
  .supercar-beam-cone {
    display: none !important;
  }
  .supercar-lamp-glow {
    width: 60px !important;
    height: 60px !important;
  }
  .index-content-safezone {
    padding-left: clamp(32px, 8.5vw, 46px) !important;
    padding-right: clamp(32px, 8.5vw, 46px) !important;
  }
}
}


/* ================================================================
   v4.0 ENHANCEMENTS
   ================================================================ */

/* --------------------------------------------------------
   E1. SEQUENTIAL TURN SIGNALS (Amber Hazard Indicators)
   -------------------------------------------------------- */
.supercar-flank .turn-signal-strip {
  position: absolute;
  bottom: 15%;
  width: 100%;
  height: 4px;
  background: transparent;
  z-index: 5;
  pointer-events: none;
  transition: background 0.15s ease;
}

body.car-signal-left .supercar-flank-left .turn-signal-strip {
  animation: sequentialBlink 0.6s ease-in-out 3;
}
body.car-signal-right .supercar-flank-right .turn-signal-strip {
  animation: sequentialBlink 0.6s ease-in-out 3;
}

@keyframes sequentialBlink {
  0% { background: transparent; box-shadow: none; }
  15% { background: #ff8c00; box-shadow: 0 0 15px #ff8c00, 0 0 30px rgba(255,140,0,0.4); }
  40% { background: #ffaa00; box-shadow: 0 0 20px #ffaa00, 0 0 40px rgba(255,170,0,0.5); }
  60% { background: #ffaa00; box-shadow: 0 0 20px #ffaa00, 0 0 40px rgba(255,170,0,0.5); }
  85% { background: #ff8c00; box-shadow: 0 0 15px #ff8c00; }
  100% { background: transparent; box-shadow: none; }
}

/* --------------------------------------------------------
   E2. 3D PARALLAX on Flank & Hero Images
   -------------------------------------------------------- */
.supercar-flank .car-img,
.supercar-wing-card .car-img {
  transform: translate(var(--parallax-x, 0px), var(--parallax-y, 0px));
  transition: transform 0.15s ease-out;
  will-change: transform;
}

/* --------------------------------------------------------
   E3. SCROLL SPEEDOMETER WIDGET
   -------------------------------------------------------- */
.speedo-widget {
  position: fixed;
  bottom: 92px;
  right: 24px;
  left: auto;
  z-index: 1040;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 50px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 210, 255, 0.3);
  color: #a5f3fc;
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  transition: opacity 0.4s ease, transform 0.4s ease, right 0.3s ease, left 0.3s ease;
  pointer-events: none;
  user-select: none;
}
html:not([dir="rtl"]) .speedo-widget {
  right: auto;
  left: 24px;
}
html[dir="rtl"] .speedo-widget {
  right: 24px !important;
  left: auto !important;
}
html[dir="rtl"] body.side-drawer-active.sidebar-collapsed .speedo-widget {
  right: 92px !important;
  left: auto !important;
}
html[dir="rtl"] body.side-drawer-active:not(.sidebar-collapsed) .speedo-widget {
  right: 274px !important;
  left: auto !important;
}
.speedo-widget.speedo-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.speedo-widget .speedo-icon {
  font-size: 1.1rem;
  color: var(--car-lamp-glow-color, #00d2ff);
  transition: color 0.3s ease;
}
.speedo-widget .speedo-value {
  min-width: 36px;
  text-align: center;
}
.speedo-widget .speedo-unit {
  font-size: 0.6rem;
  opacity: 0.7;
  font-weight: 500;
}
.speedo-widget.speedo-redline {
  border-color: rgba(255, 50, 50, 0.6) !important;
  color: #fca5a5 !important;
  animation: speedoRedlinePulse 0.5s infinite alternate;
}
.speedo-widget.speedo-redline .speedo-icon {
  color: #ef4444 !important;
}

@keyframes speedoRedlinePulse {
  0% { box-shadow: 0 0 8px rgba(255,50,50,0.3); }
  100% { box-shadow: 0 0 18px rgba(255,50,50,0.6); }
}

@media (max-width: 767.98px) {
  .speedo-widget {
    bottom: 80px;
    right: 18px;
    left: auto;
    padding: 4px 10px;
    font-size: 0.68rem;
  }
  html:not([dir="rtl"]) .speedo-widget {
    right: auto;
    left: 18px;
  }
  html[dir="rtl"] .speedo-widget {
    right: 18px !important;
    left: auto !important;
  }
}

/* --------------------------------------------------------
   E4. ENGINE START/STOP SCROLL-TO-TOP BUTTON
   -------------------------------------------------------- */
.engine-start-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  left: auto;
  z-index: 1040;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(0, 210, 255, 0.5);
  background: linear-gradient(145deg, #0f172a, #1e293b);
  color: #00e5ff;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.6) translateY(30px);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              box-shadow 0.3s ease,
              right 0.3s ease,
              left 0.3s ease;
  pointer-events: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  -webkit-tap-highlight-color: transparent;
}
html:not([dir="rtl"]) .engine-start-btn {
  right: auto;
  left: 24px;
}
html[dir="rtl"] .engine-start-btn {
  right: 24px !important;
  left: auto !important;
}
html[dir="rtl"] body.side-drawer-active.sidebar-collapsed .engine-start-btn {
  right: 92px !important;
  left: auto !important;
}
html[dir="rtl"] body.side-drawer-active:not(.sidebar-collapsed) .engine-start-btn {
  right: 274px !important;
  left: auto !important;
}
.engine-start-btn.engine-btn-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
  animation: engineNeonPulse 2.5s infinite ease-in-out;
}
.engine-start-btn:hover {
  border-color: var(--car-lamp-glow-color, #00e5ff);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.4), 0 4px 15px rgba(0, 0, 0, 0.3);
  transform: scale(1.08);
}
.engine-start-btn:active {
  transform: scale(0.94);
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.6), inset 0 0 10px rgba(0, 229, 255, 0.2);
}
.engine-start-btn .engine-label {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.55rem;
  font-weight: 700;
  color: rgba(0, 229, 255, 0.7);
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
}
@keyframes engineNeonPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(0, 229, 255, 0.2), 0 4px 12px rgba(0,0,0,0.3); }
  50% { box-shadow: 0 0 18px rgba(0, 229, 255, 0.45), 0 4px 12px rgba(0,0,0,0.3); }
}

@media (max-width: 767.98px) {
  .engine-start-btn {
    width: 48px;
    height: 48px;
    bottom: 18px;
    right: 18px;
    left: auto;
    font-size: 1.1rem;
  }
  html:not([dir="rtl"]) .engine-start-btn {
    right: auto;
    left: 18px;
  }
  html[dir="rtl"] .engine-start-btn {
    right: 18px !important;
    left: auto !important;
  }
}

/* --------------------------------------------------------
   E5. ECO / BATTERY SAVER MODE
   -------------------------------------------------------- */
body.car-eco-mode .supercar-flank .car-img-lit,
body.car-eco-mode .supercar-hero-wing .car-img-lit {
  transition-duration: 0.5s !important;
}
body.car-eco-mode .supercar-beam-cone,
body.car-eco-mode .hero-beam-cone {
  display: none !important;
}
body.car-eco-mode .supercar-lamp-glow,
body.car-eco-mode .hero-lamp-flare {
  animation: none !important;
  opacity: 0.6 !important;
}
body.car-eco-mode .engine-start-btn {
  animation: none !important;
}
body.car-eco-mode .speedo-widget {
  display: none !important;
}

/* --------------------------------------------------------
   E6. SOUND MUTE TOGGLE BUTTON
   -------------------------------------------------------- */
.sound-mute-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #a5f3fc;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.sound-mute-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(0, 210, 255, 0.4);
}
.sound-mute-btn.sound-muted {
  color: #64748b;
  border-color: rgba(255, 255, 255, 0.08);
}
.sound-mute-btn.sound-muted::after {
  content: '';
  position: absolute;
  width: 70%;
  height: 2px;
  background: #ef4444;
  transform: rotate(-45deg);
  border-radius: 2px;
}

/* --------------------------------------------------------
   E7. COLOR SYNC - Dynamic Glow Color from Theme
   -------------------------------------------------------- */
body.car-lamps-lit .supercar-hero-stage,
.supercar-hero-stage.lights-forced {
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.5),
              0 0 35px color-mix(in srgb, var(--car-lamp-glow-color, #00d2ff) 25%, transparent),
              inset 0 0 25px color-mix(in srgb, var(--car-lamp-glow-color, #00d2ff) 10%, transparent);
}

body.car-lamps-lit .pulse-dot,
.supercar-hero-stage.lights-forced .pulse-dot {
  background-color: var(--car-lamp-glow-color, #00e5ff);
  box-shadow: 0 0 12px var(--car-lamp-glow-color, #00e5ff), 0 0 20px var(--car-lamp-glow-color, #00e5ff);
}


/* --------------------------------------------------------
   O2. WET ASPHALT ROAD REFLECTION
   Cinematic wet pavement mirror reflecting headlights & supercar bumper
   -------------------------------------------------------- */
.supercar-wet-asphalt {
  position: relative;
  width: 100%;
  height: clamp(22px, 3.2vw, 42px);
  margin-top: -6px;
  margin-bottom: 1.25rem;
  overflow: hidden;
  border-radius: 0 0 18px 18px;
  pointer-events: none;
  background: linear-gradient(to bottom, #090e17 0%, rgba(15, 23, 42, 0.75) 45%, transparent 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

[data-bs-theme="light"] .supercar-wet-asphalt {
  background: linear-gradient(to bottom, #0f172a 0%, rgba(30, 41, 59, 0.5) 50%, transparent 100%);
}

.asphalt-surface {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 4px 4px;
  opacity: 0.6;
}

.asphalt-reflection-left {
  position: absolute;
  top: 0;
  left: 2%;
  width: clamp(75px, 20vw, 220px);
  height: 100%;
  background: radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--car-lamp-glow-color, #00d2ff) 50%, white) 0%, rgba(255, 120, 0, 0.28) 45%, transparent 75%);
  filter: blur(6px);
  opacity: 0.35;
  transition: opacity 0.35s ease, transform 0.35s ease;
  mix-blend-mode: screen;
}

.asphalt-reflection-right {
  position: absolute;
  top: 0;
  right: 2%;
  width: clamp(75px, 20vw, 220px);
  height: 100%;
  background: radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--car-lamp-glow-color, #00d2ff) 50%, white) 0%, rgba(255, 120, 0, 0.28) 45%, transparent 75%);
  filter: blur(6px);
  opacity: 0.35;
  transition: opacity 0.35s ease, transform 0.35s ease;
  mix-blend-mode: screen;
}

.asphalt-reflection-center {
  position: absolute;
  top: 0;
  left: 30%;
  right: 30%;
  height: 70%;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 120, 0, 0.2) 0%, transparent 70%);
  filter: blur(8px);
  opacity: 0.3;
  transition: opacity 0.35s ease;
}

.asphalt-road-line {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 2px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.25), transparent);
  border-radius: 2px;
}

/* Wet Asphalt Lighting Active States */
body.car-lamps-lit .asphalt-reflection-left,
body.car-lamps-lit .asphalt-reflection-right,
.supercar-hero-stage.lights-forced + .supercar-wet-asphalt .asphalt-reflection-left,
.supercar-hero-stage.lights-forced + .supercar-wet-asphalt .asphalt-reflection-right {
  opacity: 0.95;
  transform: scaleY(1.2);
  animation: asphaltRipple 2.2s infinite ease-in-out;
}

body.car-high-beam .asphalt-reflection-left,
body.car-high-beam .asphalt-reflection-right {
  opacity: 1 !important;
  transform: scale(1.15, 1.35) !important;
  filter: blur(8px) brightness(1.2);
}

@keyframes asphaltRipple {
  0%, 100% { opacity: 0.88; transform: scaleY(1.15); }
  50% { opacity: 1; transform: scaleY(1.28); }
}

/* --------------------------------------------------------
   O3. SUPERCAR UNDERGLOW NEON KIT
   Vibrant customizable ground & card underglow neon runner
   -------------------------------------------------------- */
.supercar-hero-stage::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 8%;
  right: 8%;
  height: 4px;
  background: var(--car-lamp-glow-color, #00d2ff);
  box-shadow: 0 0 15px var(--car-lamp-glow-color, #00d2ff), 0 0 30px var(--car-lamp-glow-color, #00d2ff);
  border-radius: 4px;
  opacity: 0.45;
  transition: opacity 0.35s ease, box-shadow 0.35s ease, background 0.4s ease;
  pointer-events: none;
  z-index: 3;
}

body.car-lamps-lit .supercar-hero-stage::after,
.supercar-hero-stage.lights-forced::after {
  opacity: 1;
  box-shadow: 0 0 20px var(--car-lamp-glow-color, #00d2ff), 0 0 40px var(--car-lamp-glow-color, #00d2ff);
}

/* Card Underglow Lighting */
.prayer-ribbon-card {
  position: relative;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease !important;
}

.prayer-ribbon-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--car-lamp-glow-color, #00d2ff) 45%, transparent) !important;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.12),
              0 0 25px color-mix(in srgb, var(--car-lamp-glow-color, #00d2ff) 30%, transparent) !important;
}

.quick-action-card,
.catalog-item-link,
.card.border.shadow-xs {
  position: relative;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease !important;
}

.quick-action-card:hover,
.catalog-item-link:hover,
.card.border.shadow-xs:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--car-lamp-glow-color, #00d2ff) 50%, transparent) !important;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12),
              0 0 22px color-mix(in srgb, var(--car-lamp-glow-color, #00d2ff) 35%, transparent) !important;
}
