/* Kelime Yarışı - özel stiller */
* { -webkit-tap-highlight-color: transparent; }

.btn {
  transition: all 0.15s ease;
}
.btn:active { transform: scale(0.96); }

/* ====== PROFESYONEL YARIŞ PİSTİ ====== */
.track {
  position: relative;
  /* asfalt dokusu: koyu gri + ince noise + soft ışık */
  background:
    radial-gradient(ellipse at 30% 0%, rgba(255,255,255,0.06), transparent 60%),
    repeating-linear-gradient(0deg, #1f2530 0px, #1f2530 2px, #232a36 2px, #232a36 4px),
    linear-gradient(180deg, #2b323f 0%, #1b212b 100%);
  border-radius: 14px;
  overflow: hidden;
  padding: 10px 8px;
  /* üst/alt yarış bariyeri (kırmızı-beyaz kerb) */
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-image: repeating-linear-gradient(90deg, #ef4444 0 14px, #f8fafc 14px 28px) 6;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.55);
}

/* başlangıç çizgisi (solda) */
.track::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 14px;
  background-image:
    linear-gradient(45deg, #0b0f17 25%, transparent 25%),
    linear-gradient(-45deg, #0b0f17 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #0b0f17 75%),
    linear-gradient(-45deg, transparent 75%, #0b0f17 75%);
  background-size: 14px 14px;
  background-position: 0 0, 0 7px, 7px -7px, -7px 0px;
  background-color: #e5e7eb;
  z-index: 2;
  opacity: 0.85;
}

.track-lane {
  position: relative;
  height: 84px;
  display: flex;
  align-items: center;
  border-bottom: 2px dashed rgba(255,255,255,0.18);
}
.track-lane:last-child { border-bottom: none; }
/* kendi şeridim hafif vurgulu */
.track-lane.lane-me {
  background: linear-gradient(90deg, rgba(132,204,22,0.10), transparent 70%);
}
/* şerit ortasındaki kesik yol çizgisi */
.lane-stripe {
  position: absolute;
  left: 18px; right: 18px;
  top: 50%;
  height: 3px;
  transform: translateY(-50%);
  background: repeating-linear-gradient(90deg, rgba(250,204,21,0.55) 0 18px, transparent 18px 40px);
  z-index: 1;
}

/* ====== ARABA ÜNİTESİ (SVG + isim etiketi) ====== */
.car-unit {
  position: absolute;
  left: 0;
  z-index: 5;
  transition: left 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}
.car-graphic {
  position: relative;
  width: 84px;
  height: 40px;
  filter: drop-shadow(0 4px 4px rgba(0,0,0,0.5));
}
.car-svg { display: block; }
.car-num {
  position: absolute;
  left: 27%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}
.car-name {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: rgba(0,0,0,0.5);
  border: 1.5px solid var(--c, #84cc16);
  padding: 1px 7px 1px 3px;
  border-radius: 999px;
  margin-bottom: 2px;
  white-space: nowrap;
  box-shadow: 0 0 8px rgba(0,0,0,0.4);
  max-width: 140px;
  overflow: hidden;
}
/* isim etiketindeki numara rozeti */
.car-name-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border-radius: 999px;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  text-shadow: 0 1px 1px rgba(0,0,0,0.5);
  box-shadow: 0 0 0 1.5px rgba(255,255,255,0.5);
}
.car-flag { margin-left: 2px; }
/* kendi arabam biraz öne çıksın */
.car-unit.my-car { z-index: 7; }
.car-unit.my-car .car-graphic { filter: drop-shadow(0 0 8px rgba(132,204,22,0.7)) drop-shadow(0 4px 4px rgba(0,0,0,0.5)); }

/* tablet ve üstü: daha büyük araçlar/şeritler */
@media (min-width: 640px) {
  .track-lane { height: 104px; }
  .car-graphic { width: 108px; height: 52px; }
  .car-num { font-size: 15px; }
  .car-name { font-size: 13px; padding: 2px 9px 2px 3px; }
}

/* ÇOK OYUNCU MODU: şeritler küçülür, pist temiz kalır */
.track.dense .track-lane { height: 58px; }
.track.dense .car-graphic { width: 64px; height: 30px; }
.track.dense .car-name { font-size: 10px; }
.track.very-dense .track-lane { height: 42px; }
.track.very-dense .car-graphic { width: 50px; height: 24px; }
.track.very-dense .car-name { font-size: 9px; padding: 0 5px 0 2px; max-width: 110px; }
.track.very-dense .car-name-num { min-width: 13px; height: 13px; font-size: 8px; }
@media (min-width: 640px) {
  .track.dense .track-lane { height: 70px; }
  .track.dense .car-graphic { width: 84px; height: 40px; }
  .track.very-dense .track-lane { height: 52px; }
  .track.very-dense .car-graphic { width: 64px; height: 30px; }
  .track.very-dense .car-name { font-size: 11px; }
}

/* bitiş çizgisi (sağ kenar dama deseni) */
.finish-line {
  position: absolute;
  right: 4px;
  top: -4px;
  bottom: -4px;
  width: 12px;
  background-image:
    linear-gradient(45deg, #000 25%, transparent 25%),
    linear-gradient(-45deg, #000 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #000 75%),
    linear-gradient(-45deg, transparent 75%, #000 75%);
  background-size: 12px 12px;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0px;
  background-color: #fff;
  z-index: 3;
  border-radius: 2px;
}

/* cevap şıkları */
.option-btn {
  transition: all 0.15s ease;
}
.option-btn:hover { transform: translateY(-2px); }
.option-correct { background-color: #16a34a !important; animation: pop 0.3s; }
.option-wrong { background-color: #dc2626 !important; }

@keyframes pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes vroom {
  0% { transform: translateX(0) scale(1); }
  30% { transform: translateX(8px) scale(1.08); }
  60% { transform: translateX(-2px) scale(1.04); }
  100% { transform: translateX(0) scale(1); }
}
.car-boost .car-graphic { animation: vroom 0.6s cubic-bezier(0.34,1.56,0.64,1); }

/* egzoz alevi titreşimi */
.car-svg .exhaust { animation: exhaustFlick 0.12s steps(2) infinite; transform-origin: left center; }
@keyframes exhaustFlick {
  0% { opacity: 0.95; transform: scaleX(1); }
  100% { opacity: 0.7; transform: scaleX(1.25); }
}

.fade-in { animation: fadeIn 0.3s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* parıltı efekti kazanan için */
.winner-glow {
  animation: glow 1.5s ease-in-out infinite alternate;
}
@keyframes glow {
  from { text-shadow: 0 0 8px #fbbf24, 0 0 16px #fbbf24; }
  to { text-shadow: 0 0 16px #f59e0b, 0 0 32px #f59e0b; }
}

/* 🎉 Motivasyon pop-up (Amazing / Wow / Süper) */
.praise-pop {
  position: fixed;
  top: 28%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.4);
  z-index: 9999;
  pointer-events: none;
  text-align: center;
  font-weight: 900;
  font-size: 2.4rem;
  letter-spacing: 1px;
  text-shadow: 0 4px 16px rgba(0,0,0,0.5), 0 0 24px currentColor;
  animation: praisePop 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  white-space: nowrap;
}
.praise-emoji {
  display: block;
  font-size: 3.6rem;
  line-height: 1;
  margin-bottom: 4px;
  animation: praiseEmoji 1.2s ease forwards;
}
@media (min-width: 640px) {
  .praise-pop { font-size: 3.4rem; }
  .praise-emoji { font-size: 5rem; }
}
@keyframes praisePop {
  0%   { transform: translate(-50%, -50%) scale(0.3); opacity: 0; }
  18%  { transform: translate(-50%, -50%) scale(1.25); opacity: 1; }
  35%  { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  75%  { transform: translate(-50%, -55%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -90%) scale(0.85); opacity: 0; }
}
@keyframes praiseEmoji {
  0%   { transform: scale(0.3) rotate(-12deg); }
  20%  { transform: scale(1.3) rotate(8deg); }
  40%  { transform: scale(1) rotate(0deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* özel seri (streak) için ekstra ışıltı */
.praise-pop.praise-streak {
  animation: praisePopBig 1.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes praisePopBig {
  0%   { transform: translate(-50%, -50%) scale(0.3) rotate(-6deg); opacity: 0; }
  15%  { transform: translate(-50%, -50%) scale(1.5) rotate(4deg); opacity: 1; }
  35%  { transform: translate(-50%, -50%) scale(1.15) rotate(0deg); opacity: 1; }
  78%  { transform: translate(-50%, -58%) scale(1.15); opacity: 1; }
  100% { transform: translate(-50%, -95%) scale(0.9); opacity: 0; }
}
