/* Cepte Radar — mobil öncelikli koyu tema arayüz */
:root {
  --bg: #0b1120;
  --card: #121a2b;
  --card-2: #0f1626;
  --line: #1f2a40;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --red: #ef4444;
  --red-2: #dc2626;
  --cyan: #22d3ee;
  --yellow: #eab308;
  --amber: #f59e0b;
  --green: #10b981;
  --blue: #3b82f6;
  --radius: 16px;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  padding-bottom: calc(var(--nav-h) + var(--safe-b));
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, select { font: inherit; color: inherit; }
code { background: #1e293b; padding: 0 4px; border-radius: 4px; color: #fcd34d; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.c-red { color: var(--red); } .c-cyan { color: var(--cyan); } .c-yellow { color: var(--yellow); }
.c-amber { color: var(--amber); } .c-orange { color: #f97316; } .c-blue { color: #60a5fa; }
.bg-red { background: var(--red); } .bg-cyan { background: var(--cyan); }
.bg-blue { background: #2563eb; } .bg-amber { background: var(--amber); }

/* Açılış ekranı */
#splash-screen {
  position: fixed; inset: 0; z-index: 100000;
  display: grid; place-items: center; background: var(--bg);
  transition: opacity .45s ease, visibility .45s ease;
}
#splash-screen.gone { opacity: 0; visibility: hidden; }
#splash-screen img { width: min(80vw, 70vh, 520px); height: auto; animation: splashIn .9s ease-out both; }
@keyframes splashIn { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: scale(1); } }

/* Üst bar */
.appbar {
  position: sticky; top: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + var(--safe-t)) 16px 10px;
  background: rgba(11, 17, 32, .92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 19px; letter-spacing: .3px; }
.brand b { font-weight: 900; }
.brand .c-red { color: #ff4d4d; }
.appbar-actions { display: flex; gap: 8px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: #1e293b; border: 1px solid #334155;
  font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.chip-amber { background: rgba(245, 158, 11, .1); border-color: rgba(245, 158, 11, .35); color: #fbbf24; }

/* Yerleşim */
.layout { max-width: 1280px; margin: 0 auto; padding: 14px; display: grid; gap: 14px; }
.panel { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
}
.eyebrow {
  display: block; margin: 0 0 8px;
  font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted);
}

/* Rota formu */
.route-fields { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: end; }
.field label { display: block; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; margin-bottom: 6px; }
.field select {
  width: 100%; min-height: 48px; padding: 10px 12px;
  background: var(--card-2); border: 1px solid #2c3a55; border-radius: 12px;
  font-size: 15px; outline: none; appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #94a3b8 50%), linear-gradient(135deg, #94a3b8 50%, transparent 50%);
  background-position: calc(100% - 16px) 21px, calc(100% - 11px) 21px;
  background-size: 5px 5px; background-repeat: no-repeat; padding-right: 28px;
  -webkit-user-select: auto; user-select: auto;
}
.field select:focus { border-color: var(--red); }
.swap-btn {
  width: 44px; height: 48px; border-radius: 12px; cursor: pointer;
  background: #1e293b; border: 1px solid #334155; font-size: 20px; font-weight: 700;
}
.swap-btn:active { transform: rotate(180deg); transition: transform .25s; }
.route-actions { display: grid; grid-template-columns: auto 1fr; gap: 8px; margin-top: 12px; }
.btn {
  min-height: 50px; padding: 0 16px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 800; letter-spacing: .5px; cursor: pointer;
}
.btn:disabled { opacity: .6; cursor: progress; }
.btn-primary { background: linear-gradient(135deg, var(--red-2), #f97316); color: #fff; box-shadow: 0 6px 18px rgba(220, 38, 38, .35); }
.btn-primary:active { transform: scale(.98); }
.btn-ghost { background: #1e293b; border-color: #334155; font-weight: 700; }
.recent { display: flex; gap: 6px; overflow-x: auto; margin-top: 10px; scrollbar-width: none; }
.recent:empty { display: none; }
.recent::-webkit-scrollbar { display: none; }

/* Bildirim kutusu */
.notice { padding: 11px 13px; border-radius: 12px; font-size: 13px; border: 1px solid; }
.notice-amber { background: rgba(245, 158, 11, .08); border-color: rgba(245, 158, 11, .35); color: #fde68a; }
.notice-green { background: rgba(16, 185, 129, .08); border-color: rgba(16, 185, 129, .35); color: #a7f3d0; }
.notice-red { background: rgba(127, 29, 29, .35); border-color: rgba(220, 38, 38, .5); color: #fecaca; font-weight: 600; }

/* Risk skoru */
.risk-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.route-title { display: block; font-size: 17px; font-weight: 800; }
.risk-gauge {
  --p: 0; --c: #475569;
  flex: 0 0 auto; width: 92px; height: 92px; border-radius: 50%;
  display: grid; place-items: center; align-content: center; text-align: center;
  background: radial-gradient(closest-side, var(--card) 76%, transparent 77%),
              conic-gradient(var(--c) calc(var(--p) * 1%), #1e293b 0);
}
.risk-gauge span { font-size: 24px; font-weight: 900; line-height: 1; }
.risk-gauge small { font-size: 9px; font-weight: 800; letter-spacing: .3px; color: var(--muted); margin-top: 3px; }
.risk-gauge[data-level="low"] { --c: var(--green); }
.risk-gauge[data-level="mid"] { --c: var(--yellow); }
.risk-gauge[data-level="high"] { --c: var(--red); }
.risk-gauge[data-level="low"] small { color: var(--green); }
.risk-gauge[data-level="mid"] small { color: var(--yellow); }
.risk-gauge[data-level="high"] small { color: var(--red); }

/* İstatistikler */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat { text-align: center; padding: 12px 6px; }
.stat b { display: block; font-size: 28px; font-weight: 900; line-height: 1.1; }
.stat span { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted); }

/* Hava durumu */
.weather { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.weather-box { background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px; min-width: 0; }
.weather-box .eyebrow { margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.weather-temp { font-size: 18px; font-weight: 800; }
.weather-cond { font-size: 12px; color: #fbbf24; }

/* Koridor listesi */
.corridor-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 260px; overflow-y: auto; }
.corridor-list li { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.corridor-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.corridor-name { display: flex; flex-direction: column; font-size: 13px; min-width: 0; }
.speed-limit-sign {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: #000; border: 3px solid var(--red-2);
  font: 800 11px/1 Arial, sans-serif; font-style: normal;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
}
.speed-limit-sign.sm { width: 20px; height: 20px; border-width: 2px; font-size: 8px; }

/* İl dağılımı */
.bar-legend { display: flex; gap: 14px; margin-bottom: 10px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: middle; }
.breakdown { display: grid; gap: 10px; }
.bd-head { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; margin-bottom: 4px; }
.bar { height: 9px; background: #1e293b; border-radius: 99px; overflow: hidden; display: flex; }
.bar i { display: block; height: 100%; }

/* Harita */
.map-card { position: relative; isolation: isolate; padding: 0; overflow: hidden; height: 58vh; min-height: 340px; }
#map { position: absolute; inset: 0; background: #0b0f17; }
.map-card.fullscreen-map {
  position: fixed; inset: 0; z-index: 99999; height: 100%; border-radius: 0; border: 0;
}
.drive-btn {
  position: absolute; z-index: 800; left: 50%; transform: translateX(-50%);
  bottom: 18px; padding: 12px 20px; border-radius: 999px; cursor: pointer;
  background: var(--green); color: #052e1f; border: 0; font-weight: 900; letter-spacing: .3px;
  box-shadow: 0 8px 22px rgba(16, 185, 129, .45);
}
.drive-btn.active { background: var(--red); color: #fff; box-shadow: 0 8px 22px rgba(239, 68, 68, .45); }
.gps-status {
  position: absolute; z-index: 800; top: 10px; left: 10px; max-width: 60%;
  padding: 5px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: rgba(11, 17, 32, .85); border: 1px solid var(--line); color: #6ee7b7;
}
.limit-box {
  position: absolute; z-index: 800; top: 44px; left: 10px;
  display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px;
  background: rgba(11, 17, 32, .9); border: 1px solid var(--line); border-radius: 999px;
}
.limit-box.hidden { display: none; }
.limit-sign {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: #000; border: 6px solid #dc2626; font: 900 20px/1 Arial, sans-serif;
}
.limit-sign.unknown { border-color: #64748b; color: #64748b; }
.limit-meta { display: flex; flex-direction: column; line-height: 1.2; }
.limit-meta span { font-size: 12px; color: var(--muted); }
.limit-meta b { font-size: 20px; color: var(--text); }
.limit-meta small { font-size: 10px; color: var(--muted); max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.limit-box.over { border-color: var(--red); box-shadow: 0 0 0 3px rgba(239, 68, 68, .5); animation: blinkFade 1s ease-in-out infinite; }
.limit-box.over .limit-meta b { color: var(--red); }
.poi-marker {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; border: 2px solid #f59e0b; font-size: 14px; box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
}
.poi-marker.tren { border-color: #dc2626; }
.poi-marker.tehlike { border-color: #f59e0b; }
.alert-list { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; }
.alert-list li[data-i] { display: grid; grid-template-columns: 52px 22px 1fr; align-items: center; gap: 6px; padding: 7px 4px; border-bottom: 1px solid var(--line); font-size: 13px; cursor: pointer; }
.alert-list li[data-i]:hover, .alert-list li[data-i]:focus { background: rgba(255, 255, 255, .04); outline: none; }
.al-km { font-weight: 800; color: var(--muted); font-size: 12px; text-align: right; }
.al-ico { text-align: center; }
.lg-emoji { font-size: 12px; }
/* Lejant: haritadaki işaretlerin küçültülmüş aynısı */
.legend-body { max-width: 260px; }
.legend-body > div { display: flex; align-items: center; gap: 8px; line-height: 1.25; padding: 2px 0; }
.lg-ico { flex: 0 0 40px; height: 26px; display: inline-flex; align-items: center; justify-content: center; gap: 2px; }
.lg-ico > .blink-marker, .lg-ico > .speed-limit-sign, .lg-ico > .poi-marker { transform: scale(.72); flex: 0 0 auto; }
.lg-ico > .pin { transform: scale(.75); }
.lg-ico .lg-line { width: 14px; }
.lg-kgm.hidden { display: none !important; }
.lg-note { font-size: 10px; color: var(--muted); padding-top: 4px !important; }
/* Türkiye geneli kameralar: aynı işaretin küçük, yanıp sönmeyen hali */
.blink-marker.mini { width: 14px; height: 14px; border-width: 2px; border-radius: 4px; animation: none; }
.blink-marker.mini span { display: none; }
.lg-ico, .lg-ico * { animation: none !important; }
.lg-ico > .gps-car-marker { transform: scale(.7); }
/* Hız koridoru tabelası: sarı halkayla hız sınırı tabelasından ayrılır */
.speed-limit-sign.corridor { box-shadow: 0 0 0 3px #facc15, 0 2px 6px rgba(0, 0, 0, .4); }
.map-btn { font-size: 18px; line-height: 30px !important; text-align: center; background: var(--card) !important; color: #fff !important; }
.leaflet-bar a { background: var(--card); color: #fff; border-color: var(--line); }
.leaflet-control-layers { background: var(--card); color: var(--text); border: 1px solid var(--line) !important; border-radius: 12px !important; }
.leaflet-control-layers-expanded { padding: 10px 12px; }
.leaflet-popup-content { font-size: 12px; }
.popup h4 { margin: 0 0 6px; padding-bottom: 4px; color: var(--red-2); border-bottom: 1px solid #cbd5e1; }

.map-legend { background: rgba(18, 26, 43, .95); border: 1px solid var(--line); border-radius: 12px; color: var(--text); font-size: 11px; padding: 6px 10px; margin-bottom: 70px !important; }
.legend-toggle { background: none; border: 0; padding: 2px 0; font-weight: 700; cursor: pointer; }
.map-legend.collapsed .legend-body { display: none; }
.legend-body { max-height: calc(58vh - 110px); overflow-y: auto; }
.lg-line { display: inline-block; width: 18px; height: 4px; border-radius: 2px; }
.lg-dash { background: repeating-linear-gradient(90deg, var(--red) 0 5px, transparent 5px 9px); }
.lg-sq { display: inline-block; width: 11px; height: 11px; border-radius: 3px; box-shadow: 0 0 8px var(--amber); }
.lg-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fff; }
.lg-start, .pin-start { background: var(--green); }
.lg-end, .pin-end { background: var(--red); }
.pin { width: 18px; height: 18px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 4px rgba(0, 0, 0, .25); }

.gps-car-marker {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--blue); border: 3px solid #fff;
  box-shadow: 0 0 0 0 rgba(59, 130, 246, .7);
  animation: gpsPulse 1.6s infinite;
}
@keyframes gpsPulse {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, .7); }
  70% { box-shadow: 0 0 0 16px rgba(59, 130, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

/* Bağlantı kartı ve ipuçları */
.link-card { display: flex; align-items: center; gap: 12px; border-color: rgba(245, 158, 11, .3); }
.link-card > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.link-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: rgba(245, 158, 11, .1); border: 1px solid rgba(245, 158, 11, .3); }
.tips { display: grid; gap: 8px; }
.tip { display: flex; gap: 10px; padding: 10px 12px; font-size: 12px; background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; }

.footer { max-width: 1280px; margin: 0 auto; padding: 8px 16px 20px; text-align: center; }

/* Alt menü */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1500;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: rgba(11, 17, 32, .96); border-top: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.bottom-nav a, .bottom-nav button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: none; border: 0; font-size: 11px; font-weight: 700; color: var(--muted); cursor: pointer;
}
.bottom-nav span { font-size: 20px; line-height: 1; }
.bottom-nav .active { color: #fff; }
.bottom-nav .active span { filter: drop-shadow(0 0 6px rgba(239, 68, 68, .8)); }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 200000; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, .8); backdrop-filter: blur(6px); }
.modal-box {
  width: 100%; max-width: 860px; max-height: 92vh; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px 20px 0 0;
  padding-bottom: var(--safe-b);
}
.modal-head, .modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; }
.modal-head { border-bottom: 1px solid var(--line); }
.modal-foot { border-top: 1px solid var(--line); flex-wrap: wrap; }
.modal-foot .btn { flex: 1 1 260px; }
.modal-head h2 { margin: 0; font-size: 15px; }
.modal-body { overflow-y: auto; padding: 14px 16px; font-size: 13px; color: #cbd5e1; }
.modal-body h3 { color: #fff; font-size: 14px; margin: 16px 0 4px; }
.modal-body p { margin: 0; }
.icon-btn { background: none; border: 0; font-size: 20px; cursor: pointer; color: var(--muted); padding: 4px 8px; }

/* Bildirim (toast) */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 14px); z-index: 300000;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 32px); padding: 11px 16px; border-radius: 12px;
  background: #1e293b; border: 1px solid #334155; font-weight: 600; font-size: 13px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5); transition: all .25s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 420px) {
  .hide-xs { display: none; }
  .route-fields { grid-template-columns: 1fr; }
  .swap-btn { justify-self: center; width: 48px; height: 36px; transform: rotate(0); }
}
@media (max-width: 640px) { .hide-sm { display: none; } }

/* Masaüstü */
@media (min-width: 1024px) {
  body { padding-bottom: 0; }
  .bottom-nav { display: none; }
  .toast { bottom: 24px; }
  .layout {
    grid-template-columns: 5fr 7fr; grid-template-areas: "route map" "details map";
    align-items: start; padding: 22px; gap: 20px;
  }
  #panel-route { grid-area: route; }
  #panel-details { grid-area: details; }
  .panel-map { grid-area: map; position: sticky; top: 76px; }
  .map-card { height: calc(100vh - 290px); min-height: 520px; }
  .map-legend { margin-bottom: 10px !important; }
  .modal { align-items: center; }
  .modal-box { border-radius: 20px; }
  .tips { grid-template-columns: repeat(3, 1fr); }
}

/* Yanıp sönen harita işaretleri: radar, kontrol noktası, hız koridoru */
@keyframes blinkFade { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes blinkPulse {
  0% { box-shadow: 0 0 0 0 var(--glow); }
  70% { box-shadow: 0 0 0 14px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.blink { animation: blinkFade 1s ease-in-out infinite; }
.leaflet-overlay-pane path.blink-line { animation: blinkFade 1.1s ease-in-out infinite; }
.blink-marker {
  --glow: rgba(239, 68, 68, .8);
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  border: 3px solid #fff; color: #fff; font: 800 12px/1 Arial, sans-serif;
  animation: blinkPulse 1.2s infinite, blinkFade 1.2s ease-in-out infinite;
}
.blink-marker.radar { background: var(--red); }
.blink-marker.kontrol { --glow: rgba(34, 211, 238, .8); background: #0891b2; }
.blink-marker.kamera { --glow: rgba(249, 115, 22, .85); background: #f97316; border-radius: 8px; font-size: 11px; }
.blink-marker.kamera.ortalama { --glow: rgba(234, 179, 8, .85); background: #ca8a04; }
.blink-marker.kamera.mobil { --glow: rgba(168, 85, 247, .85); background: #9333ea; }
.lg-blink { width: 12px; height: 12px; border: 2px solid #fff; animation: blinkFade 1s infinite; }
@media (prefers-reduced-motion: reduce) {
  .blink, .blink-marker, .lg-blink, .leaflet-overlay-pane path.blink-line { animation: none; }
}

/* ---------------------------------------------------------------- Sürüş: hız kadranı */
.kadran {
  position: absolute; z-index: 800; left: 10px; bottom: 96px; width: 124px; height: 124px; padding: 0;
  border-radius: 50%; border: 2px solid var(--line); background: rgba(11, 17, 32, .92); color: #fff; cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
  --k: #3b82f6;
}
.kadran.hidden { display: none; }
.kadran svg { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); }
.kadran path { fill: none; stroke-width: 9; stroke-linecap: round; }
.kadran .k-bg { stroke: rgba(148, 163, 184, .25); }
.kadran .k-val { stroke: var(--k); transition: stroke-dashoffset .4s ease, stroke .3s; }
.kadran .k-hiz { position: absolute; top: 30px; font: 900 40px/1 Arial, sans-serif; color: var(--k); transition: color .3s; }
.kadran .k-birim { position: absolute; top: 72px; font-size: 10px; color: var(--muted); }
.kadran .k-sinir { position: absolute; top: 86px; font-size: 11px; font-weight: 800; }
.kadran .k-hud { position: absolute; bottom: -9px; padding: 1px 7px; border-radius: 99px; background: #1e293b; border: 1px solid var(--line); font: 800 9px/1.4 Arial, sans-serif; font-style: normal; color: var(--muted); }
.kadran[data-level="iyi"] { --k: #22c55e; }
.kadran[data-level="dikkat"] { --k: #facc15; }
.kadran[data-level="asim"] { --k: #ef4444; border-color: #ef4444; animation: blinkFade 1s ease-in-out infinite; }

/* Sürüş: ortalama hız koridoru sayacı */
.koridor-panel {
  position: absolute; z-index: 800; left: 10px; right: 10px; top: 112px; max-width: 380px; margin: 0 auto;
  padding: 9px 12px; border-radius: 14px; background: rgba(11, 17, 32, .94); color: #fff;
  border: 2px solid #22c55e; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); font-size: 12px;
}
.koridor-panel.hidden { display: none; }
.koridor-panel[data-level="asim"] { border-color: #ef4444; }
.kp-bas { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.kp-bas b { flex: 1; font-size: 13px; }
.kp-tabela { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #000; border: 3px solid #dc2626; box-shadow: 0 0 0 2px #facc15; font: 900 11px/1 Arial, sans-serif; }
.kp-sure { font: 900 18px/1 Arial, sans-serif; color: #facc15; }
.kp-satir { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); }
.kp-satir b { color: #fff; }

/* Sürüş: uyarı anında ekran kenarı parlaması */
.ekran-flas { position: fixed; inset: 0; z-index: 250000; pointer-events: none; opacity: 0; box-shadow: inset 0 0 0 10px var(--flas, #f97316), inset 0 0 60px 20px var(--flas, #f97316); }
.ekran-flas.on { animation: ekranFlas 1.1s ease-out 2; }
@keyframes ekranFlas { 0% { opacity: 0; } 15% { opacity: .95; } 100% { opacity: 0; } }

/* Sürüş: HUD (ön cama yansıtma) modu */
.hud { position: fixed; inset: 0; z-index: 260000; background: #000; color: #fff; display: flex; flex-direction: column; }
.hud.hidden { display: none; }
.hud-ic { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; }
.hud-ust { display: flex; align-items: center; gap: 18px; }
.hud-sinir { width: 22vmin; height: 22vmin; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #000; border: 3vmin solid #dc2626; font: 900 9vmin/1 Arial, sans-serif; }
.hud-sinir.bos { opacity: .35; }
.hud-sonraki { font: 800 6vmin/1.2 Arial, sans-serif; color: #facc15; max-width: 60vw; }
.hud-hiz { font: 900 38vmin/1 Arial, sans-serif; letter-spacing: -1vmin; color: #22c55e; }
.hud-birim { font: 700 5vmin/1 Arial, sans-serif; color: #94a3b8; }
.hud-koridor { margin-top: 3vmin; font: 800 5vmin/1.2 Arial, sans-serif; color: #facc15; }
.hud[data-level="dikkat"] .hud-hiz { color: #facc15; }
.hud[data-level="asim"] .hud-hiz { color: #ef4444; }
.hud[data-level="yok"] .hud-hiz { color: #e5e7eb; }
.hud-dugmeler { display: flex; gap: 10px; justify-content: center; padding: 10px 10px calc(14px + var(--safe-b)); }
.hud-dugmeler button { padding: 10px 16px; border-radius: 999px; border: 1px solid #334155; background: #0f172a; color: #cbd5e1; font-weight: 800; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .ekran-flas.on { animation-duration: .01s; } .kadran[data-level="asim"] { animation: none; } }

/* Konum kullanımı bilgilendirmesi */
.modal-box.konum-onay { max-width: 460px; padding: 20px; align-self: center; }
.konum-onay h2 { margin: 0 0 8px; font-size: 19px; }
.konum-onay p, .konum-onay li { font-size: 14px; }
.konum-onay ul { padding-left: 20px; margin: 6px 0 10px; }
.konum-onay a { color: #60a5fa; }
.konum-onay-btn { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }

/* ---------------------------------------------------------------- Topluluk bildirimleri */
.bildirim-marker {
  width: 30px; height: 30px; border-radius: 10px 10px 10px 2px; display: grid; place-items: center;
  background: #fff; border: 3px solid #a855f7; font-size: 15px; box-shadow: 0 0 0 4px rgba(168, 85, 247, .3), 0 3px 8px rgba(0, 0, 0, .35);
}
.bildir-btn {
  position: absolute; z-index: 800; right: 10px; bottom: 150px; display: none; align-items: center; gap: 6px;
  padding: 10px 14px; border: 0; border-radius: 999px; cursor: pointer; font-weight: 900; font-size: 14px;
  background: #a855f7; color: #fff; box-shadow: 0 8px 20px rgba(168, 85, 247, .45);
}
.topluluk-acik .bildir-btn { display: inline-flex; }
.bildir-btn span { font-size: 17px; }
.modal-box.bildir-kutu { max-width: 460px; padding: 18px; align-self: center; }
.bildir-kutu h2 { margin: 0 0 4px; }
.bildir-turler { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.bildir-turler button {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; cursor: pointer;
  border-radius: 14px; border: 1px solid var(--line); background: var(--card-2); color: var(--text); font-weight: 800; font-size: 13px;
}
.bildir-turler button span { font-size: 28px; }
.bildir-kutu .bildir-iptal { width: 100%; }
.bld-oy { display: flex; gap: 6px; margin-top: 8px; }
.bld-oy button { flex: 1; padding: 8px 6px; border-radius: 10px; border: 1px solid #cbd5e1; background: #f8fafc; color: #0f172a; font-weight: 800; cursor: pointer; }
.bld-soru {
  position: absolute; z-index: 850; left: 10px; right: 10px; top: 112px; max-width: 380px; margin: 0 auto;
  padding: 12px; border-radius: 14px; background: rgba(11, 17, 32, .96); color: #fff; border: 2px solid #a855f7; text-align: center;
}
.bld-soru.hidden { display: none; }
.bld-soru .bld-oy button { padding: 12px 6px; font-size: 15px; }
