/* Geçen Sezon Özeti paneli (seasonRecap.js) — AGENTS.md §4.2: absolute + inset 0 inside #gameViewport, no vh/vw.
   Sayfalı: her sayfa bir kupa (kürsü + kupa görseli) ya da Oyunun Enleri; kartın rengi sayfanın temasından gelir. */
.sre-overlay {
  position: absolute;
  inset: 0;
  z-index: 9996; /* above the floating Kupa Ligi / Not Defteri / Genel Sohbet buttons (9995) */
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3%, 40px);
  background: rgba(2, 6, 23, 0.72);
}
.sre-card {
  --sre-a: #064e3b;
  --sre-b: #059669;
  --sre-glow: rgba(52, 211, 153, 0.45);
  --sre-accent: #6ee7b7;
  position: relative;
  width: 100%;
  max-width: 1320px;
  height: 100%;
  max-height: 880px;
  display: flex;
  flex-direction: column;
  border-radius: 28px;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(255, 255, 255, 0.16), transparent 60%),
    linear-gradient(160deg, var(--sre-a), var(--sre-b));
  color: #ffffff;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), inset 0 0 0 2px rgba(255, 255, 255, 0.12);
  transition: background 0.35s ease;
}
.sre-card[data-theme="league"] { --sre-a: #064e3b; --sre-b: #059669; --sre-glow: rgba(52, 211, 153, 0.5); --sre-accent: #a7f3d0; }
.sre-card[data-theme="champions"] { --sre-a: #0b1440; --sre-b: #1e40af; --sre-glow: rgba(96, 165, 250, 0.55); --sre-accent: #fde68a; }
.sre-card[data-theme="europa"] { --sre-a: #6b1d0a; --sre-b: #ea580c; --sre-glow: rgba(251, 146, 60, 0.55); --sre-accent: #fed7aa; }
.sre-card[data-theme="conference"] { --sre-a: #083d3a; --sre-b: #0d9488; --sre-glow: rgba(45, 212, 191, 0.5); --sre-accent: #99f6e4; }
.sre-card[data-theme="cup"] { --sre-a: #5f0f16; --sre-b: #dc2626; --sre-glow: rgba(248, 113, 113, 0.55); --sre-accent: #fecaca; }
.sre-card[data-theme="bests"] { --sre-a: #2e0a5c; --sre-b: #7c3aed; --sre-glow: rgba(196, 181, 253, 0.5); --sre-accent: #ddd6fe; }

.sre-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: clamp(14px, 2%, 24px) clamp(18px, 3%, 34px) 0;
  min-height: 56px;
}
.sre-eyebrow {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--sre-accent);
  padding-right: 60px;
}
.sre-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.25);
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  z-index: 2;
}

/* pages slide sideways inside the viewport */
.sre-viewport { flex: 1; min-height: 0; overflow: hidden; touch-action: pan-y; }
.sre-track { display: flex; height: 100%; transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.sre-page {
  flex: 0 0 100%;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 4px clamp(18px, 3%, 40px) 8px;
  overflow-y: auto;
}
.sre-page-head { text-align: center; }
.sre-title {
  margin: 0;
  font-size: 46px;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
}

.sre-stage {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr);
  align-items: center;
  gap: clamp(12px, 3%, 40px);
}
.sre-trophy-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 0;
}
.sre-trophy-wrap::before {
  content: "";
  position: absolute;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--sre-glow), transparent 68%);
}
.sre-trophy {
  position: relative;
  max-width: 100%;
  max-height: 420px;
  height: auto;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.45));
}

.sre-podium-wrap { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.sre-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 14px;
}
.sre-col { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; text-align: center; }
.sre-teams { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; }
.sre-teams.is-pair { flex-direction: row; justify-content: center; align-items: flex-start; gap: 10px; }
.sre-team { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; flex: 1 1 0; }
.sre-crest { filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35)); line-height: 0; }
.sre-name {
  font-size: 24px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.15;
  max-width: 100%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
}
.sre-col-1 .sre-name { font-size: 28px; }
.sre-teams.is-pair .sre-name { font-size: 19px; }
.sre-line { font-size: 18px; font-weight: 800; color: var(--sre-accent); }
.sre-step {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10px;
  border-radius: 18px 18px 6px 6px;
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.18), 0 10px 22px rgba(0, 0, 0, 0.3);
}
.sre-step span { font-size: 48px; font-weight: 900; line-height: 1; }
.sre-col-1 .sre-step { height: 150px; background: linear-gradient(180deg, #fde68a, #f59e0b); color: #78350f; }
.sre-col-2 .sre-step { height: 110px; background: linear-gradient(180deg, #f1f5f9, #94a3b8); color: #1e293b; }
.sre-col-3 .sre-step { height: 80px; background: linear-gradient(180deg, #fed7aa, #c2410c); color: #431407; }
.sre-col.is-empty { opacity: 0.4; }
.sre-team.is-me .sre-name { color: #bbf7d0; }

.sre-me {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: #16a34a;
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6);
}

.sre-final {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 12px 18px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.28);
  font-size: 20px;
  font-weight: 800;
}
.sre-final-tag {
  padding: 3px 10px;
  border-radius: 8px;
  background: var(--sre-accent);
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
}
.sre-final-team { color: #ffffff; }
.sre-final-score { font-size: 26px; font-weight: 900; color: #fde68a; }
.sre-final-pen { font-size: 16px; color: var(--sre-accent); }
.sre-note {
  align-self: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  font-size: 19px;
  font-weight: 800;
  color: #ffffff;
}
.sre-note.is-me { background: #15803d; }

/* Oyunun Enleri */
.sre-bests {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: safe center;
  gap: 14px;
  padding-top: 12px;
}
.sre-bests.is-many { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sre-bests.is-few { grid-template-columns: repeat(auto-fit, minmax(260px, 340px)); justify-content: center; }
.sre-best {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.95);
  color: #1e1b4b;
  text-align: center;
  min-width: 0;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}
.sre-best.is-me { box-shadow: 0 0 0 4px #22c55e, 0 10px 24px rgba(0, 0, 0, 0.25); }
.sre-best-icon {
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ede9fe, #c4b5fd);
  color: #5b21b6;
}
.sre-best-unbeaten .sre-best-icon { background: linear-gradient(135deg, #dcfce7, #86efac); color: #166534; }
.sre-best-goals .sre-best-icon { background: linear-gradient(135deg, #e0f2fe, #7dd3fc); color: #075985; }
.sre-best-wins .sre-best-icon { background: linear-gradient(135deg, #fef9c3, #fde047); color: #854d0e; }
.sre-best-power .sre-best-icon { background: linear-gradient(135deg, #fee2e2, #fca5a5); color: #991b1b; }
.sre-best-cup { width: 52px; height: 52px; object-fit: contain; }
.sre-best-label { font-size: 18px; font-weight: 800; color: #4c1d95; }
.sre-best-team { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.sre-best-crest { line-height: 0; }
.sre-best-name { font-size: 22px; font-weight: 900; color: #0f172a; overflow-wrap: anywhere; }
.sre-best-value { font-size: 26px; font-weight: 900; color: #0f172a; }
.sre-empty { margin: auto; font-size: 22px; font-weight: 700; color: #ffffff; }

/* footer: back, page dots, next */
.sre-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px clamp(18px, 3%, 34px) clamp(14px, 2%, 24px);
}
.sre-nav {
  min-width: 150px;
  padding: 14px 24px;
  border-radius: 16px;
  border: none;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
}
.sre-prev { background: rgba(0, 0, 0, 0.28); color: #ffffff; border: 2px solid rgba(255, 255, 255, 0.3); }
.sre-prev:disabled { opacity: 0.35; cursor: default; }
.sre-next { background: #ffffff; color: #0f172a; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3); }
.sre-nav:active:not(:disabled) { transform: scale(0.97); }
.sre-dots { display: flex; gap: 10px; align-items: center; justify-content: center; flex: 1; }
.sre-dot {
  width: 14px;
  height: 14px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}
.sre-dot.is-on { width: 38px; background: #ffffff; }
