/* ── Canlı skor: araç çubuğu ── */
.st-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px; margin-bottom: 12px;
  border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--line);
  position: sticky; top: calc(var(--top-h) + var(--safe-top) + 4px); z-index: 12;
  backdrop-filter: blur(14px);
}
@media (min-width: 900px) { .st-toolbar { top: 8px; } }
.st-sound {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 12px; border-radius: 10px;
  background: var(--surface-2); color: var(--muted); font-size: 13px; font-weight: 600;
}
.st-sound svg { width: 18px; height: 18px; }
.st-sound.on { background: rgba(34, 197, 94, 0.18); color: #86efac; }
.st-filters { display: flex; gap: 4px; flex: 1; min-width: 0; }
.st-filter {
  flex: 1; height: 36px; padding: 0 10px; border-radius: 10px; white-space: nowrap;
  color: var(--muted); font-size: 13px; font-weight: 600;
}
.st-filter b { font-family: var(--font-mono); font-weight: 600; opacity: 0.7; margin-left: 2px; }
.st-filter.active { background: var(--accent); color: #fff; }
.st-conn { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); flex: none; margin-right: 4px; }
.st-conn.on { background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2); }

/* ── Tablo ── */
.st-group { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); margin-bottom: 10px; }
.st-head {
  display: grid; grid-template-columns: 22px 1fr auto 44px; align-items: center; gap: 8px;
  padding: 7px 10px; font-size: 12.5px;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.28), rgba(139, 92, 246, 0.08));
}
.st-flag { width: 20px; height: 14px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15); }
.st-flag.none { background: var(--surface-3); }
.st-league { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-league b { color: #fff; font-weight: 700; }
.st-league span { color: var(--muted); }
.st-count { font-family: var(--font-mono); font-size: 11px; color: var(--muted-2); }
.st-htcol { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); }

.st-row {
  display: grid; grid-template-columns: 26px 44px 34px minmax(0, 1fr) 52px minmax(0, 1fr) 44px;
  align-items: center; gap: 4px;
  min-height: 38px; padding: 0 10px 0 4px;
  font-size: 13.5px; color: var(--text); text-decoration: none;
  border-top: 1px solid var(--line);
  transition: background 0.15s;
}
.st-row:nth-child(odd) { background: rgba(255, 255, 255, 0.025); }
.st-row:hover, .st-row:focus-visible { background: rgba(139, 92, 246, 0.14); text-decoration: none; }
.st-row * { text-decoration: none; }
.st-time { font-family: var(--font-mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.st-min { font-family: var(--font-mono); font-size: 12px; font-weight: 700; text-align: center; color: var(--muted-2); }
.st-row.live .st-min { color: var(--live); animation: st-blink 1.6s ease-in-out infinite; }
.st-row.done .st-time { opacity: 0.55; }
@keyframes st-blink { 50% { opacity: 0.45; } }
.st-team.home { text-align: right; }
.st-team.lead { font-weight: 700; color: #fff; }
.st-score { text-align: center; font-family: var(--font-mono); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); }
.st-row.live .st-score { color: #fff; background: rgba(239, 68, 68, 0.22); border-radius: 6px; padding: 2px 0; }
.st-row.done .st-score { color: #fff; }
.st-ht { text-align: center; font-family: var(--font-mono); font-size: 12px; color: var(--muted-2); }
.st-star { width: 26px; height: 32px; color: var(--surface-3); font-size: 15px; line-height: 1; transition: color 0.15s, transform 0.15s; }
.st-star:hover { color: var(--muted); }
.st-star.on { color: var(--gold); transform: scale(1.15); }

/* Gol vurgusu */
.st-row.goal { animation: st-goal 1.2s ease-in-out 5; }
.st-row.goal-home .st-team.home, .st-row.goal-away .st-team.away { color: #fde047; font-weight: 800; }
@keyframes st-goal { 0%, 100% { background: rgba(250, 204, 21, 0.08); } 50% { background: rgba(250, 204, 21, 0.38); } }

@media (max-width: 599px) {
  .st-row { grid-template-columns: 24px 38px 30px minmax(0, 1fr) 46px minmax(0, 1fr) 34px; font-size: 12.5px; padding-right: 6px; }
  .st-head { grid-template-columns: 22px 1fr auto 34px; }
  .st-sound span { display: none; }
}
@media (prefers-reduced-motion: reduce) { .st-row.live .st-min, .st-row.goal { animation: none; } }

/* ── Maç detayı: skor tabelası ── */
.mh {
  border-radius: var(--radius); padding: 14px 14px 16px;
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.22), rgba(255, 255, 255, 0.03) 60%);
  border: 1px solid var(--line); box-shadow: var(--shadow-card);
  margin-bottom: 12px;
}
.mh.live { border-color: rgba(239, 68, 68, 0.45); }
.mh-top { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; min-width: 0; }
.mh-league { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.mh-league img { width: 20px; height: 14px; object-fit: cover; border-radius: 2px; flex: none; }
.mh-star {
  flex: none; height: 30px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--surface-2); color: var(--muted); white-space: nowrap;
}
.mh-star.on { background: rgba(250, 204, 21, 0.2); color: var(--gold); }
/* Üç sütun: takımlar eşit genişlikte, ortadaki skor içeriği kadar — skor ASLA satır kırmaz */
.mh-board { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; gap: 8px; }
.mh-team { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; min-width: 0; }
.mh-team img, .mh-nologo { width: 56px; height: 56px; object-fit: contain; }
.mh-nologo { border-radius: 50%; background: var(--surface-2); }
.mh-name { font-weight: 600; font-size: 14px; line-height: 1.25; max-width: 100%; overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 359px) { .mh-name { font-size: 12.5px; } .mh-team img, .mh-nologo { width: 46px; height: 46px; } .topbar-logo { font-size: 19px; } }
.mh-team.lead .mh-name { font-weight: 800; color: #fff; }
.mh-mid { display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 4px; }
.mh-score {
  font-family: var(--font-display); font-size: clamp(40px, 13vw, 64px); line-height: 1;
  white-space: nowrap; letter-spacing: 0.02em; color: #fff; font-variant-numeric: tabular-nums;
}
.mh-status { font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.mh.live .mh-status { background: rgba(239, 68, 68, 0.22); color: #fca5a5; animation: st-blink 1.6s ease-in-out infinite; }
.mh-ht { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted-2); }
.mh-date { text-align: center; font-size: 12px; color: var(--muted-2); margin-top: 12px; }
@media (min-width: 900px) { .mh { padding: 20px 28px 22px; } .mh-team img, .mh-nologo { width: 72px; height: 72px; } .mh-name { font-size: 17px; } }

/* ── Saha görünümü (son olay + topla oynama) ── */
.pitch-card { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-card); margin-bottom: 12px; background: #15102a; }
.pitch-card[hidden] { display: none; }
.pitch {
  position: relative; aspect-ratio: 100 / 60; overflow: hidden;
  background: repeating-linear-gradient(90deg, #17701f 0 8.333%, #1a7a23 8.333% 16.666%);
}
.pitch-half { position: absolute; top: 0; bottom: 0; width: 50%; background: rgba(0, 0, 0, 0.001); transition: opacity 0.8s; }
.pitch-half.home { left: 0; background: linear-gradient(90deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.02)); }
.pitch-half.away { right: 0; background: linear-gradient(270deg, rgba(0, 0, 0, 0.30), rgba(0, 0, 0, 0.18)); }
.pitch-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Atak yönü bandı: toptan rakip kaleye doğru */
.pitch-band { position: absolute; top: 12%; bottom: 12%; opacity: 0; transition: left 0.6s var(--ease), width 0.6s var(--ease), opacity 0.4s; pointer-events: none; }
.pitch-band.on { opacity: 1; }
.pitch-band.to-right { background: linear-gradient(90deg, rgba(99, 102, 241, 0.0), rgba(99, 102, 241, 0.42)); clip-path: polygon(0 0, 88% 0, 100% 50%, 88% 100%, 0 100%); }
.pitch-band.to-left { background: linear-gradient(270deg, rgba(99, 102, 241, 0.0), rgba(99, 102, 241, 0.42)); clip-path: polygon(100% 0, 12% 0, 0 50%, 12% 100%, 100% 100%); }
.pitch-band.danger.to-right, .pitch-band.shot.to-right { background: linear-gradient(90deg, rgba(239, 68, 68, 0.0), rgba(239, 68, 68, 0.5)); }
.pitch-band.danger.to-left, .pitch-band.shot.to-left { background: linear-gradient(270deg, rgba(239, 68, 68, 0.0), rgba(239, 68, 68, 0.5)); }
.pitch-dot { transition: left 0.6s var(--ease), top 0.6s var(--ease); }
.pitch-dot.danger, .pitch-dot.shot { background: #ef4444; }
.pitch-dot.attack { background: #6366f1; }
.pitch-dot.safe { background: #e5e7eb; }
.pitch-dot.corner, .pitch-dot.throw, .pitch-dot.foul { background: #f59e0b; }
.pitch-label.danger, .pitch-label.shot { border-color: #ef4444; }
.pitch-label.safe { border-color: #e5e7eb; }
.pitch-label.corner, .pitch-label.throw, .pitch-label.foul { border-color: #f59e0b; }
.pitch-layer { position: absolute; inset: 0; }
.pitch-empty { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, 0.8); font-weight: 600; font-size: 14px; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6); }
.pitch-dot {
  position: absolute; width: 14px; height: 14px; border-radius: 50%; transform: translate(-50%, -50%);
  background: #6366f1; border: 2px solid #fff; box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55);
  animation: pitch-ping 1.8s ease-out infinite;
}
.pitch-dot.goal { background: #facc15; }
.pitch-dot.yellow { background: #fde047; border-radius: 3px; width: 11px; height: 15px; }
.pitch-dot.red, .pitch-dot.miss { background: #ef4444; }
.pitch-dot.red { border-radius: 3px; width: 11px; height: 15px; }
.pitch-dot.subst { background: #22c55e; }
@keyframes pitch-ping { 70% { box-shadow: 0 0 0 16px rgba(255, 255, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); } }
.pitch-label {
  position: absolute; transform: translate(-50%, -50%); max-width: 46%;
  display: flex; flex-direction: column; gap: 1px; padding: 6px 10px;
  border-left: 3px solid #6366f1; background: rgba(8, 20, 10, 0.72); backdrop-filter: blur(4px);
  border-radius: 0 8px 8px 0; color: #fff; text-align: left;
  animation: page-in 0.35s var(--ease) both;
}
.pitch-label.to-left { border-left: 0; border-right: 3px solid #6366f1; border-radius: 8px 0 0 8px; text-align: right; }
.pitch-label.goal { border-color: #facc15; } .pitch-label.red, .pitch-label.miss { border-color: #ef4444; }
.pitch-label.yellow { border-color: #fde047; } .pitch-label.subst { border-color: #22c55e; }
.pitch-label b { font-size: 15px; line-height: 1.15; }
.pitch-label span { font-size: 12.5px; opacity: 0.92; }
.pitch-label small { font-size: 11px; opacity: 0.7; }
.pitch-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; padding: 9px 12px; font-size: 12px; color: var(--muted); }
.pf-team { font-weight: 700; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-team.away { text-align: right; }
.pf-pos { font-family: var(--font-mono); font-size: 11.5px; white-space: nowrap; }
@media (max-width: 420px) { .pitch-label b { font-size: 13px; } .pitch-label span { font-size: 11.5px; } .pf-pos { font-size: 10.5px; } }
@media (prefers-reduced-motion: reduce) { .pitch-dot { animation: none; } }

.event-row.pickable { width: 100%; background: none; color: inherit; text-align: left; cursor: pointer; }
.event-row.pickable:hover { background: rgba(139, 92, 246, 0.12); }
.event-row { align-items: center; }
.event-row.away { flex-direction: row-reverse; text-align: right; }
.event-row .ev-mark { flex: none; }

/* ── Gol bildirimi (her sayfada, yalnızca seçili maçlar) ── */
.goal-banners {
  position: fixed; left: 50%; transform: translateX(-50%);
  top: calc(var(--safe-top) + 10px);
  width: min(460px, calc(100vw - 24px));
  display: flex; flex-direction: column; gap: 8px;
  z-index: 95; pointer-events: none;      /* duyuru penceresinin (80) ve menünün üstünde */
}
.goal-banner {
  pointer-events: auto; position: relative; overflow: hidden;
  border-radius: 18px; color: #fff;
  background: linear-gradient(160deg, #2b1456 0%, #170a30 100%);
  border: 1px solid rgba(250, 204, 21, 0.55);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.6), 0 0 28px rgba(250, 204, 21, 0.18);
  animation: gb-in 0.45s var(--ease) both;
}
.goal-banner.out { animation: gb-out 0.3s ease-in both; }
.gb-card { display: block; padding: 12px 14px 16px; cursor: pointer; outline: none; }
.gb-card:focus-visible { box-shadow: 0 0 0 2px #facc15 inset; border-radius: 18px; }

/* Üst satır: etiket, dakika, lig (× için sağda boşluk) */
.gb-top { display: flex; align-items: center; gap: 8px; min-width: 0; padding-right: 34px; }
.gb-tag {
  flex: none; font-family: var(--font-display); font-size: 15px; line-height: 1; letter-spacing: 0.08em;
  padding: 5px 10px 4px; border-radius: 8px; color: #1c1300;
  background: linear-gradient(120deg, #fde047, #f59e0b);
  animation: gb-pulse 0.9s ease-in-out 4;
}
.gb-min { flex: none; font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: #fde047; }
.gb-league { min-width: 0; font-size: 12px; color: rgba(255, 255, 255, 0.6); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Tabela: ev sahibi – skor – deplasman */
.gb-board { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; margin-top: 12px; }
.gb-team { display: flex; flex-direction: column; gap: 3px; min-width: 0; color: rgba(255, 255, 255, 0.72); }
.gb-team.home { text-align: right; align-items: flex-end; }
.gb-team.away { text-align: left; align-items: flex-start; }
.gb-name {
  max-width: 100%; font-size: 14px; font-weight: 600; line-height: 1.2;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}
.gb-team.scored { color: #fde047; }
.gb-team.scored .gb-name { font-size: 15.5px; font-weight: 800; }
.gb-who { font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(253, 224, 71, 0.75); }
.gb-score {
  display: flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 6px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
}
.gb-score b { font-size: 26px; font-weight: 800; line-height: 1; color: #fff; }
.gb-score b.hit { color: #fde047; }
.gb-score i { font-style: normal; font-size: 18px; color: rgba(255, 255, 255, 0.4); }

.gb-close {
  position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font-size: 20px; line-height: 1;
  color: rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.08);
}
.gb-close:hover { color: #fff; background: rgba(255, 255, 255, 0.18); }
/* Kalan süre çubuğu */
.gb-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: linear-gradient(90deg, #fde047, #f59e0b); transform-origin: left; animation: gb-time linear forwards; }
@keyframes gb-time { to { transform: scaleX(0); } }
@keyframes gb-in { from { opacity: 0; transform: translateY(-120%) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes gb-out { to { opacity: 0; transform: translateY(-40%); } }
@keyframes gb-pulse { 50% { transform: scale(1.1); } }
@media (max-width: 380px) { .gb-score b { font-size: 22px; } .gb-name { font-size: 13px; } .gb-team.scored .gb-name { font-size: 14px; } }
@media (prefers-reduced-motion: reduce) { .goal-banner, .gb-tag { animation: none; } }
