/* =============================================
   ETS2 CINEMATIC SCENE — NightRider
   Volledig CSS animatie, geen afbeeldingen
   ============================================= */

/* ─── CONTAINER ─────────────────────────────── */
.ets2-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

/* ─── LUCHT ─────────────────────────────────── */
.ets2-sky {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 62%;
  background: linear-gradient(
    180deg,
    #0a0518 0%,
    #1a0a35 15%,
    #2d1458 30%,
    #7a3520 55%,
    #d4621a 72%,
    #e8923a 82%,
    #f5c57a 92%,
    #fde8b0 100%
  );
  animation: skyShift 30s ease-in-out infinite alternate;
}

@keyframes skyShift {
  0%   { filter: hue-rotate(0deg) brightness(0.9); }
  50%  { filter: hue-rotate(15deg) brightness(1.05); }
  100% { filter: hue-rotate(-10deg) brightness(0.85); }
}

/* Zon */
.sky-sun {
  position: absolute;
  bottom: 18%;
  left: 62%;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff9e0 0%, #ffd56b 40%, #ff8c2a 70%, transparent 100%);
  box-shadow:
    0 0 60px 30px rgba(255, 200, 80, 0.5),
    0 0 120px 60px rgba(255, 140, 40, 0.25),
    0 0 200px 100px rgba(255, 100, 20, 0.1);
  animation: sunPulse 8s ease-in-out infinite;
}

@keyframes sunPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 60px 30px rgba(255,200,80,0.5), 0 0 120px 60px rgba(255,140,40,0.25); }
  50%       { transform: scale(1.05); box-shadow: 0 0 80px 40px rgba(255,200,80,0.6), 0 0 150px 80px rgba(255,140,40,0.3); }
}

/* Horizon gloed */
.sky-horizon {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 35%;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 120, 30, 0.3) 60%, rgba(255, 80, 10, 0.5) 100%);
  filter: blur(8px);
}

/* Wolken */
.sky-clouds { position: absolute; inset: 0; }

.cloud {
  position: absolute;
  border-radius: 50px;
  background: linear-gradient(180deg, rgba(255,220,180,0.25) 0%, rgba(255,180,120,0.1) 100%);
  filter: blur(3px);
  animation: cloudDrift linear infinite;
}

.cloud::before, .cloud::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: inherit;
}

.c1 { width: 280px; height: 50px; top: 20%; left: -300px; animation-duration: 60s; animation-delay: 0s; opacity: 0.6; }
.c1::before { width: 100px; height: 70px; top: -30px; left: 40px; }
.c1::after  { width: 140px; height: 60px; top: -20px; left: 110px; }

.c2 { width: 200px; height: 35px; top: 35%; left: -220px; animation-duration: 80s; animation-delay: -25s; opacity: 0.4; }
.c2::before { width: 80px; height: 55px; top: -25px; left: 30px; }
.c2::after  { width: 100px; height: 45px; top: -15px; left: 80px; }

.c3 { width: 350px; height: 60px; top: 12%; left: -380px; animation-duration: 95s; animation-delay: -50s; opacity: 0.35; }
.c3::before { width: 120px; height: 80px; top: -35px; left: 60px; }
.c3::after  { width: 160px; height: 70px; top: -25px; left: 150px; }

.c4 { width: 160px; height: 30px; top: 45%; left: -180px; animation-duration: 70s; animation-delay: -35s; opacity: 0.3; }

@keyframes cloudDrift {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(100vw + 400px)); }
}

/* ─── BERGEN ─────────────────────────────────── */
.ets2-mountains {
  position: absolute;
  bottom: 36%;
  left: 0; right: 0;
  height: 25%;
  z-index: 1;
}

.mountain {
  position: absolute;
  bottom: 0;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.m1 { width: 380px; height: 200px; left: -5%;  background: linear-gradient(180deg, #1a1535 0%, #2d2050 100%); opacity: 0.9; }
.m2 { width: 500px; height: 260px; left: 20%;  background: linear-gradient(180deg, #150f2a 0%, #251840 100%); opacity: 0.85; }
.m3 { width: 420px; height: 220px; left: 55%;  background: linear-gradient(180deg, #1a1535 0%, #2a1c45 100%); opacity: 0.9; }
.m4 { width: 320px; height: 170px; left: 78%;  background: linear-gradient(180deg, #201545 0%, #301f55 100%); opacity: 0.8; }

/* Sneeuw op bergtoppen */
.m1::after, .m2::after, .m3::after {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 35%; height: 30%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.3) 0%, transparent 70%);
  clip-path: polygon(50% 0%, 20% 100%, 80% 100%);
}

/* ─── BOMEN (ver) ────────────────────────────── */
.tree-layer { position: absolute; left: 0; right: 0; pointer-events: none; overflow: hidden; }

.tree-layer.far {
  bottom: 36%;
  height: 12%;
  z-index: 2;
}

.far-strip {
  position: absolute;
  bottom: 0; left: -100%;
  width: 300%;
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    transparent 0px,
    transparent 18px,
    #1a2a1a 18px,
    #1a2a1a 22px,
    transparent 22px,
    transparent 28px,
    #152015 28px,
    #152015 30px
  );
  animation: treeFar 35s linear infinite;
  filter: blur(1px);
  opacity: 0.85;
}

@keyframes treeFar {
  from { transform: translateX(0); }
  to   { transform: translateX(33.33%); }
}

/* ─── BOMEN (midden) ─────────────────────────── */
.tree-layer.mid {
  bottom: 32%;
  height: 16%;
  z-index: 3;
}

.mid-row {
  position: absolute;
  bottom: 0; left: -50%;
  width: 200%;
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    transparent 0px,
    transparent 35px,
    #0d1f0d 35px,
    #0d1f0d 44px,
    transparent 44px,
    transparent 55px,
    #0a180a 55px,
    #0a180a 61px,
    transparent 61px,
    transparent 75px
  );
  animation: treeMid 18s linear infinite;
}

@keyframes treeMid {
  from { transform: translateX(0); }
  to   { transform: translateX(50%); }
}

/* ─── WEGDEK ─────────────────────────────────── */
.ets2-road {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 38%;
  perspective: 600px;
  z-index: 4;
}

.road-asphalt {
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    #1a1a1e 0%,
    #222226 30%,
    #2a2a2f 60%,
    #303035 100%
  );
  clip-path: polygon(30% 0%, 70% 0%, 100% 100%, 0% 100%);
}

/* Asfalttextuur */
.road-asphalt::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 40px,
    rgba(255,255,255,0.015) 40px,
    rgba(255,255,255,0.015) 41px
  );
}

/* Bermen */
.road-shoulder {
  position: absolute;
  bottom: 0;
  height: 100%;
  width: 20%;
  background: linear-gradient(180deg, #2a2018 0%, #3a2e20 100%);
}
.road-shoulder.left  { left: 10%; clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%); }
.road-shoulder.right { right: 10%; clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%); }

/* Gras */
.road-grass {
  position: absolute;
  bottom: 0;
  height: 100%;
  background: linear-gradient(180deg, #1a2e10 0%, #243818 100%);
}
.road-grass.left  { left: 0; width: 10%; }
.road-grass.right { right: 0; width: 10%; }

/* Vangrails */
.guardrail {
  position: absolute;
  bottom: 0;
  width: 2%;
  height: 60%;
  background: repeating-linear-gradient(
    180deg,
    #8a8a8a 0px, #8a8a8a 8px,
    #555 8px, #555 10px
  );
  opacity: 0.7;
}
.guardrail.left  { left: 10%; }
.guardrail.right { right: 10%; }

/* Rijstrookmarkeringen */
.road-marking {
  position: absolute;
  bottom: 0;
  height: 100%;
}

.road-marking.center {
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0;
  overflow: hidden;
}

.dash {
  width: 4px;
  height: 80px;
  background: linear-gradient(180deg, rgba(255,220,0,0.9), rgba(255,220,0,0.5));
  flex-shrink: 0;
  margin-bottom: 50px;
  animation: dashMove 1.4s linear infinite;
  border-radius: 2px;
}

.d1 { animation-delay: 0s; }
.d2 { animation-delay: -0.175s; }
.d3 { animation-delay: -0.35s; }
.d4 { animation-delay: -0.525s; }
.d5 { animation-delay: -0.7s; }
.d6 { animation-delay: -0.875s; }
.d7 { animation-delay: -1.05s; }
.d8 { animation-delay: -1.225s; }

@keyframes dashMove {
  0%   { transform: translateY(-800px) scaleY(0.2); opacity: 0; }
  10%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(200px) scaleY(1.5); opacity: 0; }
}

.road-marking.lane-left,
.road-marking.lane-right {
  width: 3px;
  height: 100%;
}

.road-marking.lane-left  { left: 40%; }
.road-marking.lane-right { right: 40%; }

.solid-line {
  position: absolute;
  bottom: 0; top: 0;
  width: 3px;
  background: linear-gradient(180deg, rgba(255,255,255,0.0) 0%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0.9) 100%);
  clip-path: polygon(0 20%, 100% 20%, 100% 100%, 0% 100%);
}

/* ─── DICHTBIJE BOMEN (links & rechts) ───────── */
.tree-layer.near {
  bottom: 28%;
  height: 25%;
  z-index: 5;
}

.tree-row {
  position: absolute;
  bottom: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
}

.tree-row.left  { left: 0; }
.tree-row.right { right: 0; }

.near-row-l {
  background: repeating-linear-gradient(
    90deg,
    #050e05 0px, #050e05 30px,
    transparent 30px, transparent 50px,
    #030a03 50px, #030a03 75px,
    transparent 75px, transparent 95px,
    #040c04 95px, #040c04 115px,
    transparent 115px, transparent 140px
  );
  animation: treeNearL 4s linear infinite;
}

.near-row-r {
  background: repeating-linear-gradient(
    90deg,
    transparent 0px, transparent 20px,
    #040c04 20px, #040c04 50px,
    transparent 50px, transparent 65px,
    #050e05 65px, #050e05 90px,
    transparent 90px, transparent 110px,
    #030a03 110px, #030a03 135px,
    transparent 135px, transparent 155px
  );
  animation: treeNearR 4s linear infinite;
}

@keyframes treeNearL {
  from { transform: translateX(0); }
  to   { transform: translateX(155px); }
}

@keyframes treeNearR {
  from { transform: translateX(0); }
  to   { transform: translateX(155px); }
}

/* ─── TRUCK DASHBOARD ────────────────────────── */
.ets2-dashboard {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 30%;
  z-index: 10;
}

.dash-body {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 100%;
  background: linear-gradient(180deg, #0d0d10 0%, #1a1a1f 40%, #222228 100%);
  display: flex;
  align-items: flex-end;
  border-top: 1px solid rgba(0,229,255,0.08);
  box-shadow: 0 -20px 60px rgba(0,0,0,0.9), inset 0 1px 0 rgba(255,255,255,0.05);
}

.dash-left-panel,
.dash-right-panel {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.dash-center {
  flex: 2;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 0.5rem;
  position: relative;
}

/* Stuurwiel */
.steering-wheel {
  width: 130px; height: 130px;
  position: relative;
  animation: steerAnim 8s ease-in-out infinite;
  transform-origin: center;
}

@keyframes steerAnim {
  0%   { transform: rotate(-4deg); }
  25%  { transform: rotate(6deg); }
  50%  { transform: rotate(-3deg); }
  75%  { transform: rotate(5deg); }
  100% { transform: rotate(-4deg); }
}

.sw-ring {
  position: absolute;
  inset: 0;
  border: 14px solid #2a2a2a;
  border-radius: 50%;
  background: transparent;
  box-shadow:
    inset 0 2px 4px rgba(255,255,255,0.1),
    0 0 0 2px #333,
    0 0 20px rgba(0,0,0,0.8);
}

.sw-ring::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 2px solid #444;
  border-radius: 50%;
}

.sw-spoke {
  position: absolute;
  top: 50%; left: 50%;
  width: 10px; height: 38px;
  background: linear-gradient(180deg, #3a3a3a, #222);
  border-radius: 4px;
  transform-origin: top center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.s1 { transform: translate(-50%, -100%) rotate(0deg); }
.s2 { transform: translate(-50%, -100%) rotate(120deg); }
.s3 { transform: translate(-50%, -100%) rotate(240deg); }

.sw-hub {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 22px; height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle, #555 0%, #222 100%);
  border: 2px solid #444;
}

/* Tellers */
.gauge {
  position: relative;
  width: 100px; height: 100px;
}

.gauge-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid #2a2a2a;
  background: radial-gradient(circle, #0d0d10 60%, #1a1a1f 100%);
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.8), 0 0 0 1px #333;
}

.gauge-ring::before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px solid rgba(0,229,255,0.15);
}

.gauge-needle {
  position: absolute;
  bottom: 50%; left: 50%;
  width: 2px; height: 38px;
  background: linear-gradient(180deg, #ff4444, #cc0000);
  transform-origin: bottom center;
  border-radius: 2px 2px 0 0;
  box-shadow: 0 0 6px rgba(255,50,50,0.6);
}

.speed-needle { transform: translateX(-50%) rotate(-50deg); animation: speedNeedle 8s ease-in-out infinite; }
.rpm-needle   { transform: translateX(-50%) rotate(-60deg); animation: rpmNeedle 8s ease-in-out infinite; }

@keyframes speedNeedle {
  0%   { transform: translateX(-50%) rotate(-50deg); }
  30%  { transform: translateX(-50%) rotate(20deg); }
  60%  { transform: translateX(-50%) rotate(10deg); }
  80%  { transform: translateX(-50%) rotate(25deg); }
  100% { transform: translateX(-50%) rotate(-50deg); }
}

@keyframes rpmNeedle {
  0%   { transform: translateX(-50%) rotate(-60deg); }
  30%  { transform: translateX(-50%) rotate(30deg); }
  60%  { transform: translateX(-50%) rotate(15deg); }
  80%  { transform: translateX(-50%) rotate(35deg); }
  100% { transform: translateX(-50%) rotate(-60deg); }
}

.gauge-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #cc3333;
  box-shadow: 0 0 6px rgba(200,50,50,0.8);
}

.gauge-label {
  position: absolute;
  bottom: 18px; left: 50%;
  transform: translateX(-50%);
  font-family: 'Orbitron', monospace;
  font-size: 0.45rem;
  letter-spacing: 0.1em;
  color: rgba(0,229,255,0.5);
}

.gauge-value {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  font-family: 'Orbitron', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent);
}

/* Brandstofmeter */
.fuel-gauge {
  margin-top: 0.5rem;
  text-align: center;
}

.fuel-label {
  font-family: 'Orbitron', monospace;
  font-size: 0.45rem;
  letter-spacing: 0.15em;
  color: rgba(0,229,255,0.4);
  margin-bottom: 4px;
}

.fuel-bar {
  width: 60px; height: 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(0,229,255,0.2);
  border-radius: 3px;
  overflow: hidden;
}

.fuel-level {
  width: 72%;
  height: 100%;
  background: linear-gradient(90deg, #00e5ff, #00ff88);
  box-shadow: 0 0 6px rgba(0,229,255,0.5);
  border-radius: 3px;
}

/* ─── LENS FLARE ─────────────────────────────── */
.lens-flare {
  position: absolute;
  top: 28%; left: 62%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 8;
  animation: flarePulse 6s ease-in-out infinite;
}

.flare {
  position: absolute;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.f1 { width: 200px; height: 200px; background: radial-gradient(circle, rgba(255,220,100,0.12) 0%, transparent 70%); top: 0; left: 0; }
.f2 { width: 60px;  height: 20px;  background: radial-gradient(ellipse, rgba(255,200,100,0.3) 0%, transparent 70%); top: 40px; left: -80px; border-radius: 50%; }
.f3 { width: 15px;  height: 15px;  background: radial-gradient(circle, rgba(255,255,200,0.5) 0%, transparent 70%); top: -20px; left: 100px; }

@keyframes flarePulse {
  0%, 100% { opacity: 0.7; transform: translate(-50%, -50%) scale(1); }
  50%       { opacity: 1;   transform: translate(-50%, -50%) scale(1.15); }
}

/* ─── ATMOSFERISCHE NEVEL ────────────────────── */
.ets2-haze {
  position: absolute;
  bottom: 30%; left: 0; right: 0;
  height: 15%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(200, 140, 80, 0.08) 40%,
    rgba(255, 160, 60, 0.12) 60%,
    transparent 100%
  );
  filter: blur(12px);
  z-index: 6;
  animation: hazeShift 15s ease-in-out infinite alternate;
}

@keyframes hazeShift {
  from { opacity: 0.6; transform: scaleX(1); }
  to   { opacity: 1;   transform: scaleX(1.05); }
}

/* ─── DONKERE OVERLAY VOOR LEESBAARHEID ──────── */
.cinematic-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 20%, rgba(0,0,0,0.5) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.3) 0%, transparent 30%, transparent 60%, rgba(0,0,0,0.7) 100%);
  z-index: 9;
  pointer-events: none;
}
