/* =====================================================================
   Raylı Sistem Sürücü Eğitim Simülasyonu — Sinematik Tema
   Mobil-öncelikli, dvh tabanlı, safe-area duyarlı.
   ===================================================================== */

:root {
  --bg-app: #050810;
  --bg-surface: #0a1220;
  --bg-surface-2: #121e35;
  --bg-surface-3: #1d2c4d;
  --border-subtle: rgba(148, 163, 184, 0.12);
  --border: rgba(148, 163, 184, 0.22);
  --border-strong: rgba(56, 189, 248, 0.5);
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --accent-soft: rgba(56, 189, 248, 0.10);
  --success: #22c55e;
  --success-soft: rgba(34, 197, 94, 0.14);
  --warn: #f59e0b;
  --warn-soft: rgba(245, 158, 11, 0.14);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.14);
  --text-primary: #e6edf7;
  --text-secondary: #93a3b8;
  --text-muted: #5a6a82;
  --shadow-panel: 0 -20px 60px -10px rgba(0, 0, 0, 0.55);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

/* =================== Reset =================== */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
html { height: 100%; }
body {
  min-height: 100vh;
  min-height: 100dvh;
}
button, input, select { font-family: inherit; }
img { display: block; max-width: 100%; }

/* iç scroll */
.scroll-y { overflow-y: auto; min-height: 0; -webkit-overflow-scrolling: touch; }
.scroll-y::-webkit-scrollbar { width: 5px; height: 5px; }
.scroll-y::-webkit-scrollbar-track { background: transparent; }
.scroll-y::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.22); border-radius: 3px; }
.scroll-y::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,0.4); }

/* =================== LANDING ===================
   Mobil: tek kolon, sayfa scroll'u OK.
   Masaüstü: viewport içinde, scroll grid içinde.
*/
body.landing {
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(14,165,233,0.08), transparent 70%),
    radial-gradient(1000px 500px at -10% 110%, rgba(56,189,248,0.06), transparent 70%),
    var(--bg-app);
}

.landing-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  padding-top: calc(10px + var(--safe-top));
  padding-left: calc(14px + var(--safe-left));
  padding-right: calc(14px + var(--safe-right));
  background: rgba(5, 8, 16, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex-shrink: 0; }
.brand-logo {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0ea5e9, #1e40af);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px -4px rgba(14,165,233,0.6), inset 0 1px 0 rgba(255,255,255,0.15);
}
.brand-logo svg { width: 18px; height: 18px; color: white; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.brand-text-main {
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.brand-text-sub {
  color: var(--text-muted);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.topbar-spacer { flex: 1; min-width: 8px; }

.filter-group {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 1;
  min-width: 0;
}
.filter-group::-webkit-scrollbar { display: none; }
.filter-pill {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.14s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.filter-pill:hover { color: var(--text-primary); border-color: var(--border); }
.filter-pill.is-active {
  background: var(--accent);
  color: #001624;
  border-color: var(--accent);
}

.landing-main {
  padding: 14px;
  padding-left: calc(14px + var(--safe-left));
  padding-right: calc(14px + var(--safe-right));
  padding-bottom: calc(14px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.landing-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}
.landing-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0;
}
.landing-title strong { color: var(--accent); font-weight: 800; }
.landing-meta { font-size: 0.7rem; color: var(--text-muted); }

.scenario-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.landing-footer {
  text-align: center;
  padding: 14px;
  padding-bottom: calc(14px + var(--safe-bottom));
  font-size: 0.66rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* Tablet+ */
@media (min-width: 640px) {
  .scenario-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .landing-main { padding: 18px 20px; gap: 14px; }
}

/* Desktop */
@media (min-width: 1024px) {
  body.landing { overflow: hidden; height: 100dvh; }
  .landing-main { flex: 1; min-height: 0; overflow: hidden; }
  .scenario-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    overflow-y: auto;
    padding: 4px;
    align-content: start;
    flex: 1;
    min-height: 0;
  }
  .landing-topbar { position: relative; }
}

/* =================== KART =================== */
.sim-card {
  background: linear-gradient(180deg, rgba(18, 30, 53, 0.85), rgba(10, 18, 32, 0.85));
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  position: relative;
}
.sim-card:hover, .sim-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: 0 12px 28px -10px rgba(0,0,0,0.5), 0 0 22px -2px rgba(56, 189, 248, 0.25);
  outline: none;
}
.sim-card-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
  overflow: hidden;
}
.sim-card-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.sim-card:hover .sim-card-cover img { transform: scale(1.05); }
.sim-card-cover::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(2,6,23,0.85) 100%);
}

.card-badges {
  position: absolute;
  top: 10px; left: 10px; right: 10px;
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 6px;
  z-index: 2;
}

.sim-card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.sim-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  margin: 0;
}
.sim-card-desc {
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}
.sim-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-top: 10px;
  margin-top: 2px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.7rem;
  color: var(--text-muted);
}
.foot-meta { display: inline-flex; align-items: center; gap: 4px; }
.foot-meta svg { width: 12px; height: 12px; opacity: 0.85; }
.start-arrow {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
  transition: transform 0.15s ease;
}
.sim-card:hover .start-arrow { transform: translateX(3px); }

/* =================== CHIPLER =================== */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 4px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(5,8,16,0.78);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  backdrop-filter: blur(6px);
  white-space: nowrap;
  line-height: 1;
}
.chip-accent { color: var(--accent); border-color: rgba(56,189,248,0.4); background: rgba(14,165,233,0.16); }
.chip-easy   { color: #86efac; border-color: rgba(34,197,94,0.4); background: var(--success-soft); }
.chip-medium { color: #fcd34d; border-color: rgba(245,158,11,0.4); background: var(--warn-soft); }
.chip-hard   { color: #fca5a5; border-color: rgba(239,68,68,0.4); background: var(--danger-soft); }
.chip-success { color: #86efac; border-color: rgba(34,197,94,0.4); background: var(--success-soft); }
.chip-warn    { color: #fcd34d; border-color: rgba(245,158,11,0.4); background: var(--warn-soft); }
.chip-danger  { color: #fca5a5; border-color: rgba(239,68,68,0.4); background: var(--danger-soft); }

/* =================== BUTONLAR =================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.14s ease;
  background: var(--bg-surface-2);
  color: var(--text-primary);
  line-height: 1;
  user-select: none;
}
.btn:hover { background: var(--bg-surface-3); }
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn svg { width: 14px; height: 14px; }
.btn-sm { padding: 6px 10px; font-size: 0.7rem; gap: 5px; }
.btn-sm svg { width: 12px; height: 12px; }
.btn-primary {
  background: linear-gradient(180deg, #0ea5e9, #0369a1);
  color: white;
  box-shadow: 0 4px 14px -4px rgba(14,165,233,0.55), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-primary:hover { background: linear-gradient(180deg, #38bdf8, #0ea5e9); }
.btn-success { background: linear-gradient(180deg, #16a34a, #15803d); color: white; }
.btn-danger  { background: linear-gradient(180deg, #dc2626, #b91c1c); color: white; }
.btn-ghost {
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  border-color: var(--border);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { color: var(--text-primary); border-color: var(--accent); background: rgba(56,189,248,0.1); }
.btn-block { width: 100%; padding: 12px 18px; font-size: 0.88rem; }

/* =================== SİNEMATİK OYNATICI ===================
   Tam ekran arka plan + üst HUD + alttan slide-up panel.
*/
body.player {
  height: 100vh;
  height: 100dvh;
  background: var(--bg-app);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Üst çubuk — sabit, transparent değil (klasik) */
.player-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  padding-top: calc(8px + var(--safe-top));
  padding-left: calc(12px + var(--safe-left));
  padding-right: calc(12px + var(--safe-right));
  background: linear-gradient(180deg, rgba(12,20,36,0.95), rgba(6,10,20,0.92));
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  min-height: 48px;
}
.topbar-title {
  flex: 1;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-primary);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 6px;
}

/* Ana oynatıcı layout — mobil dikey stack, masaüstü yan yana */
.player-layout {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 10px;
  padding-left: calc(10px + var(--safe-left));
  padding-right: calc(10px + var(--safe-right));
  padding-bottom: calc(10px + var(--safe-bottom));
  gap: 10px;
}

/* GÖRSEL KARTI — fotoğraf burada tam görünür, çerçevesinde sığar */
.player-image {
  position: relative;
  width: 100%;
  background: #000;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  /* Mobil: 16:9 oranında otomatik yükseklik (genişliğe göre).
     Bu sayede fotoğraf daima TAM görünür, kırpılmaz. */
  aspect-ratio: 16 / 9;
  max-height: 42dvh;     /* mobilde görselin viewport'un en fazla %42'sini kaplaması */
}
.player-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;   /* fotoğrafın TAMAMI görünür — yapısı bozulmaz */
  display: block;
}

/* Tehlike rozeti — görselin sol üst köşesinde overlay */
.player-image .danger-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
}

.score-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(5, 8, 16, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  white-space: nowrap;
  line-height: 1;
}
.score-pill .score-num { color: var(--accent); font-variant-numeric: tabular-nums; }
.score-pill .timer-num { color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.score-pill svg { width: 12px; height: 12px; opacity: 0.85; }

/* Tehlike rozeti — görsel kartının köşesinde overlay */
.danger-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 6px;
  background: var(--danger);
  color: white;
  font-weight: 800;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 0 3px 14px -2px rgba(239,68,68,0.55);
  animation: pulseDanger 1.4s ease-in-out infinite;
  line-height: 1;
}
.danger-badge svg { width: 12px; height: 12px; }
@keyframes pulseDanger {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.55), 0 4px 18px -2px rgba(239,68,68,0.6); }
  50%      { box-shadow: 0 0 0 12px rgba(239,68,68,0), 0 4px 18px -2px rgba(239,68,68,0.6); }
}

/* Step progress — panel meta içinde */
.step-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.35);
  transition: all 0.2s ease;
}
.step-dot.is-current { width: 18px; border-radius: 999px; background: var(--accent); }
.step-dot.is-correct  { background: var(--success); }
.step-dot.is-wrong    { background: var(--danger); }
.step-dot.is-neutral  { background: rgba(148, 163, 184, 0.6); }

/* Kontrol paneli — görselin altında ayrı kart (artık slide-up değil) */
.bottom-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(18,30,53,0.92), rgba(10,18,32,0.96));
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  animation: panelFadeIn 0.3s ease;
}
@keyframes panelFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* panel-handle artık gerek yok — gizli */
.panel-handle { display: none; }

.panel-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.panel-title {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 0;
  color: var(--text-primary);
  flex-shrink: 0;
}

.panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 2px;
}
.panel-body::-webkit-scrollbar { width: 4px; }
.panel-body::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.25); border-radius: 2px; }

.panel-instruction {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.55;
  margin: 0;
}

.panel-foot {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Karar seçenekleri */
.choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  background: rgba(18, 30, 53, 0.7);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.14s ease;
  text-align: left;
  width: 100%;
  color: var(--text-primary);
  font-size: 0.85rem;
  line-height: 1.4;
  font-family: inherit;
  margin-bottom: 6px;
}
.choice:last-child { margin-bottom: 0; }
.choice:hover:not(:disabled) {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56,189,248,0.5);
}
.choice:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice:disabled { cursor: default; }
.choice-letter {
  flex-shrink: 0;
  width: 24px; height: 24px;
  border-radius: 5px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 0.78rem;
  line-height: 1;
}
.choice-text { flex: 1; padding-top: 2px; }
.choice.is-correct {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.55);
}
.choice.is-correct .choice-letter {
  background: rgba(34, 197, 94, 0.25);
  border-color: rgba(34, 197, 94, 0.6);
  color: #86efac;
}
.choice.is-wrong {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.55);
}
.choice.is-wrong .choice-letter {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.6);
  color: #fca5a5;
}
.choice.is-dim { opacity: 0.4; }

/* Geri bildirim */
.feedback {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: rgba(5,8,16,0.7);
  font-size: 0.8rem;
  line-height: 1.5;
}
.feedback.is-correct {
  background: rgba(34,197,94,0.12);
  border-color: rgba(34,197,94,0.4);
  color: #bbf7d0;
}
.feedback.is-wrong {
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.4);
  color: #fecaca;
}
.feedback-label {
  display: block;
  font-weight: 800;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 4px;
  opacity: 0.9;
}

.divider-soft {
  width: 32px; height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), transparent);
  margin: 4px 0 6px;
}

/* =================== Animasyonlar =================== */
.fade-in { animation: fadeIn 0.28s ease; }
.fade-in-fast { animation: fadeIn 0.15s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.spin {
  width: 32px; height: 32px;
  border: 2px solid rgba(148,163,184,0.18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =================== RAPOR =================== */
.report-overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 14px;
  padding-top: calc(14px + var(--safe-top));
  padding-bottom: calc(14px + var(--safe-bottom));
  background: rgba(2, 4, 16, 0.92);
  backdrop-filter: blur(6px);
}
.report-card {
  background: linear-gradient(180deg, rgba(18,30,53,0.97) 0%, rgba(10,18,32,0.99) 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 720px;
  margin: auto;
  max-height: 100%;
  overflow: hidden;
  box-shadow: 0 24px 60px -12px rgba(0,0,0,0.6);
}
.report-header { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.report-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.report-icon.is-success { background: var(--success-soft); color: #86efac; }
.report-icon.is-fail    { background: var(--danger-soft); color: #fca5a5; }
.report-icon svg { width: 24px; height: 24px; }
.report-eyebrow {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 2px;
}
.report-title { font-size: 1.05rem; font-weight: 800; margin: 0; }
.report-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  flex-shrink: 0;
}
.report-stat {
  background: rgba(5,8,16,0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}
.report-stat-num { font-size: 1.1rem; font-weight: 800; color: var(--text-primary); line-height: 1.1; }
.report-stat-num.is-accent  { color: var(--accent); }
.report-stat-num.is-success { color: #86efac; }
.report-stat-num.is-warn    { color: #fcd34d; }
.report-stat-num.is-danger  { color: #fca5a5; }
.report-stat-label { font-size: 0.6rem; color: var(--text-muted); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 4px; }
.report-history {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}
.report-history-title {
  font-size: 0.62rem; letter-spacing: 0.12em; color: var(--text-muted);
  text-transform: uppercase; margin-bottom: 6px;
}
.report-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  background: rgba(5,8,16,0.55);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  margin-bottom: 6px;
}
.report-item-icon {
  width: 20px; height: 20px;
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 0.72rem;
  flex-shrink: 0;
}
.report-item-icon.is-correct { background: rgba(34,197,94,0.22); color: #86efac; }
.report-item-icon.is-wrong   { background: rgba(239,68,68,0.22); color: #fca5a5; }
.report-item-title { font-size: 0.82rem; color: var(--text-primary); font-weight: 700; line-height: 1.3; }
.report-item-sub { font-size: 0.72rem; color: var(--text-secondary); margin-top: 3px; line-height: 1.45; }
.report-item-points { font-size: 0.74rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.report-item-points.is-pos { color: #86efac; }
.report-item-points.is-neg { color: #fca5a5; }
.report-item-points.is-zero { color: var(--text-muted); }
.report-meta {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-size: 0.72rem; color: var(--text-muted);
}
.report-meta strong { color: var(--text-primary); font-weight: 700; }
.report-meta strong.accent { color: var(--accent); }
.report-actions { display: flex; gap: 8px; flex-shrink: 0; }
.report-actions .btn { flex: 1; }

/* =================== Yardımcılar =================== */
.is-hidden { display: none !important; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-accent { color: var(--accent); }

/* =================== Tablet+ Oynatıcı (yan yana) =================== */
@media (min-width: 1024px) {
  .player-layout {
    flex-direction: row;
    padding: 16px;
    gap: 16px;
    align-items: center;          /* görseli dikey ortalat */
    justify-content: center;
  }
  .player-image {
    /* 16:9 oranı KORUNUR — görselin yapısı bozulmaz */
    aspect-ratio: 16 / 9;
    max-height: 100%;             /* container yüksekliğini aşma */
    max-width: 100%;              /* container genişliğini aşma */
    width: auto;                  /* aspect-ratio karar versin */
    height: auto;
    flex: 1 1 auto;               /* mevcut alana sığ */
    min-width: 0;
    align-self: center;
  }
  .bottom-panel {
    width: 380px;
    height: 100%;                 /* dikey tam */
    max-height: 100%;
    flex-shrink: 0;
    flex: none;
    align-self: stretch;
  }
}

@media (min-width: 1440px) {
  .bottom-panel { width: 440px; }
}

/* =================== Mobil küçük ekran ince ayar =================== */
@media (max-width: 380px) {
  .panel-title { font-size: 0.95rem; }
  .panel-instruction { font-size: 0.8rem; }
  .choice { padding: 10px; font-size: 0.8rem; }
  .choice-letter { width: 22px; height: 22px; font-size: 0.72rem; }
  .score-pill { padding: 5px 8px; font-size: 0.66rem; }
  .danger-badge { padding: 5px 8px; font-size: 0.6rem; }
  .brand-text-sub { display: none; }
}
