/* =========================================================
   Maximus Taxi — заставка (splash)
   ВАЖНО: этот файл НЕ объявляет CSS-переменные и не трогает
   глобальные стили — только анимации заставки.
   ========================================================= */

.splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  background: radial-gradient(120% 90% at 50% 0%, #1c2130 0%, #0d0f14 55%, #08090c 100%);
  overflow: hidden;
  transition: opacity 0.55s var(--ease), visibility 0.55s;
  color: #f4f6fa;
}

.splash.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-glow {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 204, 0, 0.16) 0%, transparent 62%);
  filter: blur(12px);
  animation: glow-pulse 3.6s var(--ease-in-out) infinite;
}

.splash[data-role="driver"] .splash-glow {
  background: radial-gradient(circle, rgba(53, 224, 161, 0.18) 0%, transparent 62%);
}

.splash[data-role="admin"] .splash-glow {
  background: radial-gradient(circle, rgba(139, 157, 255, 0.18) 0%, transparent 62%);
}

@keyframes glow-pulse {
  0%, 100% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 1; }
}

.splash-stage {
  position: relative;
  width: 260px;
  height: 180px;
  display: grid;
  place-items: center;
}

.scene {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
  pointer-events: none;
}

.splash[data-role="passenger"] .scene[data-scene="passenger"],
.splash[data-role="driver"] .scene[data-scene="driver"],
.splash[data-role="admin"] .scene[data-scene="admin"] {
  opacity: 1;
  transform: scale(1);
}

/* Локальные цвета сцены — только внутри .splash */
.splash[data-role="passenger"] { --sp-accent: #ffcc00; --sp-accent-2: #ffb800; }
.splash[data-role="driver"] { --sp-accent: #35e0a1; --sp-accent-2: #14b87d; }

/* ============ ПАССАЖИР: такси едет по городу ============ */
.skyline {
  position: absolute;
  bottom: 44px;
  left: 0;
  right: 0;
  height: 74px;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  opacity: 0.34;
}

.skyline i {
  display: block;
  width: 15%;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, rgba(255, 204, 0, 0.55), rgba(255, 204, 0, 0.08));
  animation: sky-rise 1.1s var(--ease) backwards;
}

.skyline i:nth-child(1) { height: 46%; animation-delay: 0.05s; }
.skyline i:nth-child(2) { height: 74%; animation-delay: 0.12s; }
.skyline i:nth-child(3) { height: 38%; animation-delay: 0.19s; }
.skyline i:nth-child(4) { height: 92%; animation-delay: 0.26s; }
.skyline i:nth-child(5) { height: 56%; animation-delay: 0.33s; }
.skyline i:nth-child(6) { height: 80%; animation-delay: 0.4s; }
.skyline i:nth-child(7) { height: 44%; animation-delay: 0.47s; }

@keyframes sky-rise {
  from { transform: scaleY(0); opacity: 0; }
  to { transform: scaleY(1); opacity: 1; }
}

.road {
  position: absolute;
  bottom: 26px;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.road-line {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, var(--sp-accent) 0 18px, transparent 18px 38px);
  animation: road-run 0.85s linear infinite;
  opacity: 0.7;
}

@keyframes road-run {
  from { transform: translateX(0); }
  to { transform: translateX(-38px); }
}

.cab {
  position: relative;
  width: 96px;
  height: 54px;
  border-radius: 12px 16px 8px 8px;
  background: linear-gradient(160deg, var(--sp-accent) 0%, var(--sp-accent-2) 100%);
  box-shadow: 0 12px 30px rgba(255, 204, 0, 0.3);
  animation: cab-bob 1.5s var(--ease-in-out) infinite;
  margin-bottom: 18px;
}

@keyframes cab-bob {
  0%, 100% { transform: translateY(0) rotate(-0.6deg); }
  50% { transform: translateY(-4px) rotate(0.6deg); }
}

.cab-roof {
  position: absolute;
  top: -9px;
  left: 24px;
  width: 40px;
  height: 10px;
  border-radius: 6px 6px 0 0;
  background: var(--sp-accent);
}

.cab-checker {
  position: absolute;
  top: 12px;
  left: 8px;
  right: 8px;
  height: 6px;
  border-radius: 2px;
  background-image:
    linear-gradient(90deg, #14161c 50%, transparent 50%),
    linear-gradient(90deg, transparent 50%, #14161c 50%);
  background-size: 12px 6px, 12px 6px;
  opacity: 0.85;
}

.cab-window {
  position: absolute;
  top: 22px;
  left: 10px;
  right: 10px;
  height: 16px;
  border-radius: 4px;
  background: rgba(15, 17, 21, 0.82);
}

.wheel {
  position: absolute;
  bottom: -7px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #0b0d11;
  border: 3px solid rgba(255, 255, 255, 0.16);
  animation: wheel-spin 0.6s linear infinite;
}

.wheel.left { left: 14px; }
.wheel.right { right: 14px; }

@keyframes wheel-spin { to { transform: rotate(360deg); } }


/* ============ ВОДИТЕЛЬ: маршрут + руль ============ */
.orbit {
  position: absolute;
  width: 148px;
  height: 148px;
  border-radius: 50%;
  border: 2px dashed rgba(53, 224, 161, 0.3);
  animation: orbit-spin 7s linear infinite;
}

@keyframes orbit-spin { to { transform: rotate(360deg); } }

.orbit-dot {
  position: absolute;
  top: -6px;
  left: 50%;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border-radius: 50%;
  background: var(--sp-accent);
  box-shadow: 0 0 18px 4px rgba(53, 224, 161, 0.65);
}

.wheel-hub {
  position: relative;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  border: 7px solid var(--sp-accent);
  box-shadow: 0 0 32px rgba(53, 224, 161, 0.28), inset 0 0 22px rgba(53, 224, 161, 0.16);
  animation: hub-spin 2.6s var(--ease-in-out) infinite;
}

@keyframes hub-spin {
  0%, 100% { transform: rotate(-14deg); }
  50% { transform: rotate(14deg); }
}

.wheel-hub i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 4px;
  margin: -2px 0 0 -17px;
  border-radius: 99px;
  background: var(--sp-accent);
  transform-origin: center;
}

.wheel-hub i:nth-child(1) { transform: rotate(0deg); }
.wheel-hub i:nth-child(2) { transform: rotate(60deg); }
.wheel-hub i:nth-child(3) { transform: rotate(120deg); }

.route-line {
  position: absolute;
  bottom: 6px;
  width: 168px;
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.route-line i {
  position: absolute;
  top: 0;
  width: 46px;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, var(--sp-accent), transparent);
  animation: route-run 1.7s var(--ease-in-out) infinite;
}

.route-line i:nth-child(1) { animation-delay: 0s; }
.route-line i:nth-child(2) { animation-delay: 0.55s; }
.route-line i:nth-child(3) { animation-delay: 1.1s; }

@keyframes route-run {
  0% { left: -46px; opacity: 0; }
  30% { opacity: 1; }
  100% { left: 168px; opacity: 0; }
}

/* ============ АДМИН: панели + график ============ */
.panel {
  position: absolute;
  border-radius: 12px;
  background: rgba(139, 157, 255, 0.1);
  border: 1px solid rgba(139, 157, 255, 0.34);
  animation: panel-in 0.6s var(--ease) backwards;
}

.panel.p1 { width: 76px; height: 44px; top: 22px; left: 34px; animation-delay: 0.05s; }
.panel.p2 { width: 62px; height: 62px; top: 18px; right: 40px; animation-delay: 0.16s; }
.panel.p3 { width: 108px; height: 34px; bottom: 52px; left: 28px; animation-delay: 0.27s; }
.panel.p4 { width: 54px; height: 48px; bottom: 46px; right: 34px; animation-delay: 0.38s; }

@keyframes panel-in {
  from { transform: translateY(10px) scale(0.86); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.bars {
  position: absolute;
  bottom: 20px;
  display: flex;
  align-items: flex-end;
  gap: 7px;
  height: 46px;
}

.bars i {
  display: block;
  width: 12px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, var(--sp-accent), rgba(139, 157, 255, 0.25));
  animation: bar-bounce 1.3s var(--ease-in-out) infinite;
}

.bars i:nth-child(1) { height: 40%; animation-delay: 0s; }
.bars i:nth-child(2) { height: 78%; animation-delay: 0.16s; }
.bars i:nth-child(3) { height: 55%; animation-delay: 0.32s; }
.bars i:nth-child(4) { height: 95%; animation-delay: 0.48s; }

@keyframes bar-bounce {
  0%, 100% { transform: scaleY(0.55); opacity: 0.55; }
  50% { transform: scaleY(1); opacity: 1; }
}


/* ============ ТЕКСТЫ ЗАСТАВКИ ============ */
.splash-copy {
  position: relative;
  text-align: center;
  animation: copy-in 0.7s var(--ease) 0.1s backwards;
}

@keyframes copy-in {
  from { transform: translateY(14px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.splash-mark {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--sp-accent);
  box-shadow: 0 12px 32px rgba(255, 204, 0, 0.28);
  animation: mark-pop 0.8s var(--ease) backwards;
}

.splash-mark img { width: 100%; height: 100%; object-fit: cover; }

@keyframes mark-pop {
  0% { transform: scale(0.5) rotate(-12deg); opacity: 0; }
  60% { transform: scale(1.08) rotate(3deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.splash-title {
  margin: 0;
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  color: #ffffff;
}

.splash-title span {
  display: block;
  margin-top: 7px;
  font-family: Manrope, sans-serif;
  font-size: 11px;
  letter-spacing: 0.42em;
  color: var(--sp-accent);
  font-weight: 800;
}

.splash-sub {
  margin: 16px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: #a8b0c0;
  min-height: 18px;
  transition: opacity 0.3s var(--ease);
}

.splash-progress {
  position: absolute;
  bottom: 46px;
  width: 148px;
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.splash-progress i {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, var(--sp-accent), transparent);
  animation: progress-run 1.25s var(--ease-in-out) infinite;
}

@keyframes progress-run {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(370%); }
}

@media (prefers-reduced-motion: reduce) {
  .splash *, .splash *::before, .splash *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

.splash[data-role="admin"] { --sp-accent: #8b9dff; --sp-accent-2: #6274e8; }
