* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; background: #000; overflow: hidden; }
body { display: flex; align-items: center; justify-content: center; font-family: 'Rubik', system-ui, sans-serif; color: #fff; }

#sahne { position: relative; width: 360px; height: 640px; overflow: hidden; transform-origin: center center; flex: none; }
#tuval { position: absolute; inset: 0; width: 360px; height: 640px; display: block; }
#etiketler, #hud, #rehber { position: absolute; inset: 0; pointer-events: none; }

/* --- isim etiketleri --- */
.etiket {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -100%);
  font: 800 11px/1 'Rubik', sans-serif; padding: 3px 6px 3px; border-radius: 9px;
  background: rgba(20, 20, 28, .78); color: #fff; white-space: nowrap; max-width: 92px;
  overflow: hidden; text-overflow: ellipsis; border: 1.5px solid rgba(255,255,255,.35);
  will-change: transform;
}
.etiket.yeni { animation: etiket-gir .5s ease-out; }
.etiket.kenar { border-color: rgba(255, 120, 90, .7); }
.etiket.bagli { background: #1565c0; border-color: #9fd3ff; }
.etiket.bagli::before { content: '\26D3  '; }
.etiket.halat { background: #b8860b; border-color: #ffe14d; }
.etiket.egik { background: #2e7d32; border-color: #a5ffb0; }
.etiket.egik::after { content: ' \2193'; }
.etiket.dusen { background: #d32f2f; border-color: #ffb4b4; }
.etiket.muavin { background: #e91e63; border-color: #ffc1d9; }
.etiket.muavin::before { content: 'Copiloto · '; font-weight: 500; }
.etiket.bagir, .etiket.yerde, .etiket.muavin { max-width: 160px; }
.etiket.bagir { background: #fff; color: #1b1b1f; border-color: #1b1b1f; }
.etiket.bagir span { color: #c1121f; }
.etiket.kenar.bagir { border-color: #ff4d4d; }
.etiket.yerde { background: #6d4c41; border-color: #ffd23f; text-align: center; }
.etiket small { display: block; font: 700 9px/1.1 'Rubik', sans-serif; color: #ffd23f; margin-top: 2px; }
.etiket .md { display: inline-block; width: 13px; height: 13px; border-radius: 50%; margin-right: 3px; vertical-align: -2px;
  font: 800 9px/13px 'Rubik'; text-align: center; font-style: normal; color: #1b1b1f; }
.etiket .md1 { background: #ffd23f; } .etiket .md2 { background: #d9d9d9; } .etiket .md3 { background: #e0915a; }
.etiket.ekip { background: #37474f; border-color: #90a4ae; }
.etiket .ek { display: inline-block; font: 800 8px/1 'Rubik'; font-style: normal; background: #ffd23f; color: #1b1b1f; padding: 2px 3px; border-radius: 3px; margin-right: 3px; vertical-align: 1px; }
.etiket.sofor { background: #6a1b9a; border-color: #e1b3ff; font-size: 12px; }
@keyframes etiket-gir { from { opacity: 0; } }

/* --- üst bant (90 px altı) --- */
#ust { position: absolute; top: 94px; left: 8px; right: 8px; display: flex; justify-content: space-between; align-items: flex-start; }
#ust-sol { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
#logo {
  font: 400 19px/1 'Bungee', 'Impact', sans-serif; color: #ffd23f; letter-spacing: .5px;
  text-shadow: 2px 2px 0 #c1121f, -1px -1px 0 #1b1b1f, 1px -1px 0 #1b1b1f, -1px 1px 0 #1b1b1f, 3px 3px 0 #1b1b1f;
  transform: rotate(-3deg); transform-origin: left center;
}
#logo span { color: #fff; }
.cip {
  font: 700 11px/1 'Rubik', sans-serif; background: rgba(20,20,28,.78); border: 1.5px solid rgba(255,255,255,.25);
  padding: 4px 7px; border-radius: 10px; white-space: nowrap;
}
.cip b { color: #ffd23f; font-weight: 800; }
.cip.kaptan { background: linear-gradient(90deg, #4a148c, #880e4f); border-color: #e1b3ff; }
.cip.kaptan b { color: #fff; }
#kaptan-sure { color: #e1b3ff; font-weight: 500; }

#hiz { width: 82px; text-align: center; background: rgba(20,20,28,.78); border-radius: 14px; padding: 5px 2px 4px; border: 1.5px solid rgba(255,255,255,.25); }
#hiz svg { width: 74px; height: 44px; display: block; margin: 0 auto; }
#ibre { transform-origin: 40px 44px; transition: transform .15s linear; }
#hiz-sayi { margin-top: -2px; }
#hiz-sayi b { font: 400 18px/1 'Bungee', 'Impact', sans-serif; color: #fff; }
#hiz-sayi small { font: 700 9px/1 'Rubik', sans-serif; color: #bbb; margin-left: 2px; }

#bekleyen { position: absolute; left: 8px; top: 172px; }
#bekleyen.durakta { background: #c1121f; border-color: #ffd23f; }

/* --- olay afişi --- */
#afis { position: absolute; left: 0; right: 0; top: 200px; text-align: center; animation: afis-gir .35s cubic-bezier(.2, 1.6, .5, 1); }
#afis-ust {
  font: 400 34px/1 'Bungee', 'Impact', sans-serif; color: #ffd23f;
  text-shadow: 3px 3px 0 #c1121f, -2px -2px 0 #1b1b1f, 2px -2px 0 #1b1b1f, -2px 2px 0 #1b1b1f, 4px 4px 0 #1b1b1f;
}
#afis-alt { margin-top: 6px; font: 800 14px/1.25 'Rubik', sans-serif; text-shadow: 0 2px 0 #000, 0 0 6px #000; }
#afis-sayac { margin-top: 4px; font: 400 40px/1 'Bungee', 'Impact', sans-serif; color: #fff; text-shadow: 3px 3px 0 #1b1b1f; }
#afis.kirmizi #afis-ust { color: #ff4d4d; text-shadow: 3px 3px 0 #1b1b1f, -2px -2px 0 #1b1b1f; }
#afis.mor #afis-ust { color: #e1b3ff; text-shadow: 3px 3px 0 #4a148c, -2px -2px 0 #1b1b1f, 4px 4px 0 #1b1b1f; }
#afis.yesil #afis-ust { color: #7bff8f; text-shadow: 3px 3px 0 #1b5e20, -2px -2px 0 #1b1b1f, 4px 4px 0 #1b1b1f; }
@keyframes afis-gir { from { transform: scale(.3) rotate(-8deg); opacity: 0; } }

/* --- şoförün konuşma balonu --- */
#balon {
  position: absolute; left: 0; top: 0; max-width: 170px;
  font: 400 15px/1.05 'Bungee', 'Impact', sans-serif; color: #1b1b1f; text-align: center;
  background: #fff; border: 3px solid #1b1b1f; border-radius: 16px; padding: 7px 10px 6px;
  box-shadow: 3px 3px 0 #1b1b1f; will-change: transform;
}
#balon::after {
  content: ''; position: absolute; left: 50%; bottom: -13px; margin-left: -8px;
  border: 8px solid transparent; border-top: 10px solid #1b1b1f; border-bottom: 0;
}
#balon.yeni { animation: balon-gir .3s cubic-bezier(.2, 1.8, .5, 1); }
@keyframes balon-gir { from { opacity: 0; } 60% { opacity: 1; } }

/* --- durak / varış paneli --- */
#panel {
  position: absolute; left: 14px; right: 14px; top: 200px; max-height: 270px; overflow: hidden;
  background: rgba(20, 20, 28, .9); border: 2px solid #ffd23f; border-radius: 16px; padding: 10px 12px;
  animation: afis-gir .35s cubic-bezier(.2, 1.4, .5, 1);
}
.p-baslik { font: 400 20px/1 'Bungee', 'Impact', sans-serif; color: #ffd23f; display: flex; align-items: baseline; gap: 6px; }
.p-baslik small { font: 700 11px 'Rubik', sans-serif; color: #bbb; }
.p-bolum + .p-bolum { margin-top: 8px; padding-top: 8px; border-top: 1px dashed rgba(255,255,255,.25); }
.p-liste { list-style: none; margin-top: 6px; display: flex; flex-direction: column; gap: 3px; }
.p-liste li { display: flex; align-items: center; gap: 6px; font: 700 12px/1.2 'Rubik', sans-serif; }
.p-liste li .ad { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-liste li b { color: #ffd23f; }
.rozet { font: 800 9px/1 'Rubik', sans-serif; padding: 3px 5px; border-radius: 6px; text-transform: uppercase; }
.rozet.takip { background: #ff3b7f; } .rozet.paylasim { background: #2196f3; } .rozet.yorum { background: #555; }
.rozet.eski { background: #e91e63; } .rozet.halat { background: #b8860b; }
.madalya { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font: 800 11px 'Rubik'; color: #1b1b1f; flex: none; border: 2px solid rgba(0,0,0,.35); }
.madalya.m1 { background: #ffd23f; } .madalya.m2 { background: #d9d9d9; } .madalya.m3 { background: #e0915a; } .madalya.m0 { background: #444; color: #ddd; }
.p-sampiyon { margin-top: 6px; font: 800 15px/1.2 'Rubik'; }
.p-sampiyon b { color: #ffd23f; }
.p-kalanlar { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.p-kalanlar span { font: 700 11px 'Rubik'; background: #2e7d32; padding: 3px 6px; border-radius: 8px; }

#panel:not([hidden]) ~ #akis { display: none; }

/* --- akış (yorum alanının hemen üstü) --- */
#akis { position: absolute; left: 8px; right: 8px; bottom: 166px; display: flex; flex-direction: column-reverse; gap: 4px; align-items: flex-start; }
.akis-satir {
  font: 700 11px/1.2 'Rubik', sans-serif; background: rgba(20,20,28,.82); padding: 4px 7px; border-radius: 9px;
  border-left: 4px solid #ffd23f; animation: akis-gir .3s ease-out; max-width: 100%;
}
.akis-satir small { display: block; font-weight: 500; font-size: 10px; color: #bbb; margin-top: 1px; }
.akis-satir.hediye { border-left-color: #ff3b7f; background: rgba(60, 10, 40, .85); }
.akis-satir.dustu { border-left-color: #ff4d4d; }
.akis-satir.cikis { opacity: 0; transform: translateX(-20px); transition: all .4s; }
@keyframes akis-gir { from { opacity: 0; transform: translateX(-30px); } }

/* --- parkur arası ekranı (yayıncı anons yapar) --- */
#hud.ara-modu #ust, #hud.ara-modu #bekleyen, #hud.ara-modu #akis, #hud.ara-modu #balon { display: none !important; }
#ara {
  position: absolute; left: 12px; right: 12px; top: 96px; height: 376px;
  background: rgba(16, 14, 30, .86); border: 2px solid #ffd23f; border-radius: 18px; padding: 9px 12px;
  display: flex; flex-direction: column; align-items: stretch; text-align: center;
  animation: afis-gir .4s cubic-bezier(.2, 1.4, .5, 1);
}
.ara-ust { font: 800 12px/1 'Rubik', sans-serif; color: #bbb; letter-spacing: 1px; }
.ara-ust small { font-weight: 500; }
.ara-parkur { margin-top: 5px; font: 400 25px/1 'Bungee', 'Impact', sans-serif; color: #ffd23f;
  text-shadow: 2px 2px 0 #c1121f, 3px 3px 0 #1b1b1f; }
.ara-parkur-alt { font: 700 11px/1.2 'Rubik', sans-serif; color: #ddd; margin-top: 2px; }
.ara-sayac { margin-top: 4px; font: 400 34px/1 'Bungee', 'Impact', sans-serif; color: #fff; text-shadow: 3px 3px 0 #1b1b1f; }
.ara-sayac.beklet { color: #ff8c1a; font-size: 24px; }
.ara-sampiyon { min-height: 15px; margin-top: 3px; font: 700 11px/1.3 'Rubik'; color: #ddd; }
.ara-sampiyon b { color: #ffd23f; }
.ara-kutu { margin-top: 6px; padding-top: 6px; border-top: 1px dashed rgba(255,255,255,.25); text-align: left; }
.ara-baslik { font: 400 15px/1 'Bungee', 'Impact', sans-serif; color: #ffd23f; }
.ara-baslik small { font: 700 10px 'Rubik'; color: #aaa; }
#ara .p-liste { margin-top: 4px; gap: 2px; }
#ara .p-liste li { font-size: 11px; }
.nasil ul { list-style: none; margin-top: 4px; display: flex; flex-direction: column; gap: 3px; }
.nasil li { font: 600 11px/1.15 'Rubik'; color: #eee; }
.nasil li b { color: #ffd23f; font-weight: 800; }
.nasil li small { font-size: 9px; color: #9a9a9a; margin-left: 3px; }
.ara-bekleyen { margin-top: auto; font: 700 11px 'Rubik'; color: #ddd; }
.ara-bekleyen b { color: #ffd23f; }

/* --- rehber / yardım --- */
#rehber .ortu { position: absolute; left: 0; right: 0; background: rgba(120,120,120,.55); display: flex; align-items: center; justify-content: center; font: 700 12px 'Rubik'; color: #fff; }
#rehber .ust { top: 0; height: 90px; }
#rehber .alt { bottom: 0; height: 160px; }
#yardim { position: absolute; left: 8px; right: 8px; bottom: 170px; background: rgba(0,0,0,.85); font: 500 11px/1.5 'Rubik'; padding: 8px; border-radius: 10px; }
[hidden] { display: none !important; }
