
:root {
  --bg: #07110d;
  --bg-2: #0b1912;
  --panel: rgba(10, 25, 18, 0.88);
  --panel-strong: rgba(15, 36, 27, 0.96);
  --panel-2: #143426;
  --card: rgba(255,255,255,.045);
  --gold: #d6ad57;
  --gold-2: #f1ce7a;
  --cream: #f6ead1;
  --muted: #aab9b0;
  --line: rgba(246,234,209,.14);
  --line-strong: rgba(246,234,209,.24);
  --danger: #be4b4b;
  --green: #1f7a4b;
  --green-2: #2ca864;
  --shadow: 0 24px 80px rgba(0,0,0,.34);
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(circle at top, rgba(63, 120, 82, .24) 0, transparent 28%),
    radial-gradient(circle at 50% -5%, rgba(214,173,87,.16) 0, transparent 18%),
    linear-gradient(180deg, #10251b 0%, var(--bg) 30%, #040907 100%);
  color: var(--cream);
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,.02), rgba(255,255,255,0)),
    repeating-linear-gradient(90deg, transparent 0 79px, rgba(255,255,255,.01) 79px 80px);
  pointer-events: none;
  opacity: .45;
}
.app { position: relative; width: min(1180px, 100%); margin: 0 auto; padding: 18px; }
.screen { display: none; }
.screen.active { display: block; }
.hero {
  position: relative;
  text-align: center;
  padding: 42px 14px 26px;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  width: 320px; height: 320px;
  left: 50%; top: -180px; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(214,173,87,.34) 0%, rgba(214,173,87,.04) 55%, transparent 72%);
  filter: blur(10px);
  pointer-events: none;
}
.eyebrow {
  position: relative;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 12px;
  font-weight: 900;
  margin: 0 0 10px;
}
h1, .topbar h1, .result-card h1 {
  font-family: 'Bebas Neue', Impact, sans-serif;
  letter-spacing: .02em;
}
h1 { position: relative; font-size: clamp(52px, 10vw, 100px); line-height: .92; margin: 0 0 14px; }
h2 { margin: 0 0 14px; font-size: 22px; }
.lead { color: var(--muted); font-size: 17px; max-width: 720px; margin: 0 auto; line-height: 1.55; }
.panel, .pitch-card, .draft-card, .result-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.panel { padding: 24px; max-width: 900px; margin: 0 auto; }
.formation-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0 22px; }
.formation-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  cursor: pointer;
  min-height: 112px;
  transition: .18s ease;
  overflow: hidden;
}
.formation-card::after {
  content: '';
  position: absolute;
  inset: auto -20% -50% -20%;
  height: 70px;
  background: radial-gradient(circle, rgba(214,173,87,.14), transparent 68%);
  opacity: 0;
  transition: .18s ease;
}
.formation-card:hover, .formation-card.selected {
  border-color: rgba(214,173,87,.78);
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(0,0,0,.25);
}
.formation-card:hover::after, .formation-card.selected::after { opacity: 1; }
.formation-card strong { display: block; font-size: 28px; color: var(--cream); font-family: 'Bebas Neue', Impact, sans-serif; letter-spacing: .04em; }
.formation-card span { color: var(--muted); font-size: 12px; line-height: 1.35; }
button {
  font: inherit;
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 900;
  transition: .16s ease;
}
button:hover:not(:disabled) { transform: translateY(-1px); }
button:disabled { opacity: .45; cursor: not-allowed; }
.primary {
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #1c1304;
  box-shadow: 0 12px 30px rgba(214,173,87,.22);
}
.secondary { background: var(--panel-2); color: var(--cream); border: 1px solid var(--line); }
.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.topbar h1 { font-size: 38px; margin: 0; }
.progress {
  background: rgba(214,173,87,.10);
  border: 1px solid rgba(214,173,87,.26);
  color: var(--gold);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 900;
}
.layout { display: grid; grid-template-columns: 1.02fr .98fr; gap: 18px; }
.pitch-card, .draft-card { padding: 18px; }
.pitch-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.pitch {
  margin-top: 12px;
  min-height: 560px;
  border-radius: 22px;
  padding: 18px;
  background:
    radial-gradient(circle at top, rgba(255,255,255,.12), transparent 12%),
    linear-gradient(180deg, #1a7a47 0%, #14673c 50%, #115a34 100%);
  border: 2px solid rgba(255,255,255,.16);
  display: flex; flex-direction: column; justify-content: space-around; gap: 12px;
  position: relative;
  overflow: hidden;
}
.pitch::before {
  content: '';
  position: absolute; inset: 12px;
  border: 2px solid rgba(255,255,255,.16);
  border-radius: 18px;
  pointer-events: none;
}
.pitch::after {
  content: '';
  position: absolute; left: 50%; top: 12px; bottom: 12px; width: 2px;
  background: rgba(255,255,255,.14);
  transform: translateX(-50%);
  pointer-events: none;
}
.pitch-row { display: flex; justify-content: center; gap: 10px; position: relative; z-index: 1; }
.slot {
  width: min(132px, 23vw);
  min-height: 76px;
  border-radius: 18px;
  border: 1px dashed rgba(255,255,255,.44);
  background: rgba(0,0,0,.18);
  padding: 8px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.slot.filled {
  border-style: solid;
  border-color: rgba(214,173,87,.58);
  background: linear-gradient(180deg, rgba(5,18,12,.68), rgba(14,39,27,.56));
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.slot .pos { color: var(--gold); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.slot .name { font-weight: 850; font-size: 13px; line-height: 1.2; }
.slot .era { color: var(--muted); font-size: 11px; }
.era-box {
  padding: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border: 1px solid var(--line);
  border-radius: 20px;
  margin-bottom: 12px;
  text-align: center;
}
.era-box h2 {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 54px;
  letter-spacing: .05em;
  margin-bottom: 8px;
}
#eraHint { color: var(--muted); margin: 0; line-height: 1.45; }
.player-list { display: grid; gap: 12px; max-height: 560px; overflow: auto; padding-right: 4px; }
.player-section {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
}
.player-section-title {
  display: flex; align-items: center; justify-content: space-between;
  margin: 4px 4px 10px; padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.player-section-title span { font-weight: 800; }
.player-section-title small { color: var(--muted); }
.player-card {
  width: 100%; text-align: left;
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.035));
  color: var(--cream);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.player-card:last-child { margin-bottom: 0; }
.player-card:hover { border-color: rgba(214,173,87,.62); }
.player-card.disabled { opacity: .35; cursor: not-allowed; }
.player-card strong { display: block; font-size: 15px; }
.player-card small { color: var(--muted); display: block; margin-top: 5px; line-height: 1.4; }
.player-main { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pos-chip {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; padding: 5px 9px;
  background: rgba(214,173,87,.10); color: var(--gold);
  border: 1px solid rgba(214,173,87,.18);
  font-size: 11px; font-weight: 800; text-transform: uppercase;
}
.slot-picker {
  background: rgba(214,173,87,.08);
  border: 1px solid rgba(214,173,87,.24);
  border-radius: 18px;
  padding: 12px;
  margin-bottom: 12px;
}
.slot-picker h3 { margin: 0 0 10px; font-size: 16px; }
.slot-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.hidden { display: none !important; }
.result-card { max-width: 980px; margin: 20px auto; padding: 26px; }
.result-card h1 { font-size: clamp(42px, 8vw, 78px); margin-bottom: 8px; }
.stadium-card {
  background:
    radial-gradient(circle at top, rgba(214,173,87,.09), transparent 20%),
    rgba(10,25,18,.90);
}
.review-formation {
  display: inline-flex; gap: 8px; align-items: center;
  border-radius: 999px; padding: 10px 16px; margin: 16px 0 20px;
  background: rgba(214,173,87,.10); border: 1px solid rgba(214,173,87,.22); color: var(--gold);
  font-weight: 800;
}
.review-team-list { display: grid; gap: 14px; }
.review-section {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
}
.review-section h2 {
  margin-bottom: 12px;
  font-size: 18px;
  color: var(--gold);
}
.review-player {
  display: grid;
  grid-template-columns: 56px minmax(0,1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid rgba(255,255,255,.06);
}
.review-player:first-of-type { border-top: 0; padding-top: 0; }
.review-pos {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 46px; border-radius: 999px; padding: 5px 8px;
  background: rgba(255,255,255,.06); color: var(--gold); font-size: 11px; font-weight: 800;
}
.stars { color: var(--gold-2); letter-spacing: .06em; white-space: nowrap; }
.review-player small { color: var(--muted); }
.summary-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin: 22px 0; }
.metric { background: rgba(255,255,255,.045); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.metric span { color: var(--muted); font-size: 12px; text-transform: uppercase; font-weight: 800; }
.metric strong { display: block; font-size: 22px; margin-top: 4px; }
.match-log { display: grid; gap: 10px; margin: 18px 0; }
.match {
  padding: 14px 16px; border-radius: 16px;
  background: rgba(0,0,0,.18); border: 1px solid var(--line);
}
.match.reveal.w { border-color: rgba(44,168,100,.38); background: rgba(44,168,100,.08); }
.match.reveal.d { border-color: rgba(214,173,87,.34); background: rgba(214,173,87,.08); }
.match.reveal.l { border-color: rgba(190,75,75,.34); background: rgba(190,75,75,.09); }
.match span { color: var(--muted); }
.analysis-box {
  background: rgba(214,173,87,.07);
  border: 1px solid rgba(214,173,87,.18);
  border-radius: 18px;
  padding: 16px;
  color: var(--cream);
  line-height: 1.55;
}
.cta-box {
  margin-top: 18px;
  display: flex; flex-wrap: wrap; gap: 10px;
  align-items: center; justify-content: space-between;
}
.single-cta { justify-content: flex-start; }
.cta-box h2, .cta-box p { margin: 0; }
.cta-box p { color: var(--muted); width: 100%; line-height: 1.5; }
.feedback-note { font-size: 14px; }
.needs-hint {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
}
#currentEra.spinning { animation: pulseEra .6s linear infinite; }
@keyframes pulseEra { 0%{opacity:.5; transform: scale(.98);} 50%{opacity:1; transform: scale(1.03);} 100%{opacity:.5; transform: scale(.98);} }

@media (max-width: 900px) {
  .app { padding: 12px; }
  .formation-grid, .layout, .summary-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 28px; }
  .pitch { min-height: 460px; padding: 10px; }
  .slot { width: 29vw; min-height: 66px; border-radius: 14px; }
  .slot .name { font-size: 12px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .topbar .progress { align-self: flex-start; }
  .result-card { padding: 18px; }
  .review-player { grid-template-columns: 50px 1fr; }
  .review-player .stars, .review-player small { grid-column: 2; }
  .review-player small { margin-top: -2px; }
  button { width: 100%; }
  .ghost, .secondary, .primary { justify-content: center; }
  .pitch-head { flex-direction: column; align-items: flex-start; }
}


/* V0.11 mobil pályajavítás – csak a draft/pálya oldal kilógását javítja */
html, body {
  overflow-x: hidden;
}

.layout > *,
.pitch-card,
.draft-card {
  min-width: 0;
}

@media (max-width: 900px) {
  .app {
    max-width: 100%;
    overflow-x: hidden;
  }

  .pitch-card,
  .draft-card {
    width: 100%;
    overflow: hidden;
  }

  .pitch {
    width: 100%;
    overflow: hidden;
  }

  .pitch-row {
    width: 100%;
    gap: 6px;
    padding: 0 2px;
  }

  .slot {
    width: calc((100% - 18px) / 4);
    max-width: 132px;
    min-width: 0;
    padding-left: 4px;
    padding-right: 4px;
  }

  .slot .name {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 420px) {
  .app {
    padding-left: 8px;
    padding-right: 8px;
  }

  .pitch-card,
  .draft-card {
    padding-left: 10px;
    padding-right: 10px;
  }

  .pitch {
    padding-left: 8px;
    padding-right: 8px;
  }

  .pitch-row {
    gap: 5px;
  }

  .slot {
    width: calc((100% - 15px) / 4);
    min-height: 62px;
    border-radius: 14px;
  }

  .slot .pos {
    font-size: 10px;
  }

  .slot .name {
    font-size: 10.5px;
    line-height: 1.12;
  }

  .slot .era {
    font-size: 10px;
  }
}


/* V0.12 kezdő intro */
.intro-text {
  color: var(--cream);
  font-size: 16px;
  line-height: 1.6;
  max-width: 760px;
  margin: 12px auto 0;
  opacity: .92;
}

@media (max-width: 600px) {
  .intro-text {
    font-size: 15px;
    line-height: 1.5;
    margin-top: 10px;
  }
}
