:root {
  --navy: #0b1e3d;
  --navy2: #142850;
  --navy3: #1e3a6e;
  --gold: #d4af37;
  --gold-bright: #f0cc60;
  --gold-deep: #9a7b0a;
  --on-navy: #ffffff;
  --on-navy-soft: rgba(255,255,255,0.85);
  --on-navy-faint: rgba(255,255,255,0.5);
  --card-bg: #ffffff;
  --text-dark: #111827;
  --text-1: #374151;
  --text-2: #6b7280;
  --good: #16a34a;
  --bad: #dc2626;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; font-family: var(--font); -webkit-tap-highlight-color: transparent; }

body {
  background: var(--navy);
  color: var(--text-dark);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255,255,255,0.025) 0 80px,
      transparent 80px 160px,
      rgba(212,175,55,0.04) 160px 240px,
      transparent 240px 320px
    ),
    linear-gradient(170deg, #0b1e3d 0%, #0d2446 60%, #091730 100%);
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 24px 16px 52px;
  display: flex;
  flex-direction: column;
}

/* ── SCREENS ── */
.screen { display: none; flex: 1; flex-direction: column; animation: fadeUp 0.28s ease; }
.screen.active { display: flex; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── HOME ── */
.home-wrap {
  margin: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  width: 100%;
  padding: 20px 0;
}

.title-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  gap: 0;
}
.title-destiny {
  font-size: clamp(1.8rem, 8vw, 2.4rem);
  font-weight: 900;
  color: var(--on-navy-soft);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.title-eleven {
  font-size: clamp(3.2rem, 14vw, 4.2rem);
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 0 40px rgba(212,175,55,0.35);
}
.title-soccer {
  font-size: clamp(0.85rem, 3.5vw, 1.05rem);
  font-weight: 700;
  color: var(--on-navy-faint);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  border-top: 1px solid rgba(212,175,55,0.3);
  padding-top: 8px;
  margin-top: 6px;
  width: 100%;
  text-align: center;
}

.tagline {
  color: var(--on-navy-soft);
  font-size: 0.88rem;
  line-height: 1.65;
  max-width: 340px;
  margin: 0;
}

.name-wrap { width: 100%; max-width: 280px; }
.name-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid rgba(212,175,55,0.35);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.06);
  color: var(--on-navy);
  font-size: 1rem;
  font-family: var(--font);
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
}
.name-input::placeholder { color: var(--on-navy-faint); }
.name-input:focus { border-color: var(--gold); background: rgba(255,255,255,0.09); }

.footer-txt { color: var(--on-navy-faint); font-size: 0.72rem; text-align: center; margin: auto 0 0; letter-spacing: 0.05em; }

/* ── BUTTONS ── */
.btn {
  display: block;
  width: 100%;
  max-width: 300px;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: transform 0.1s, background 0.15s;
  text-align: center;
  letter-spacing: 0.01em;
}
.btn:active { transform: scale(0.97); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-bright); }
.btn-secondary {
  background: rgba(255,255,255,0.1);
  color: var(--on-navy);
  border: 1px solid rgba(255,255,255,0.18);
}
.btn-secondary:hover { background: rgba(255,255,255,0.16); }

/* ── SETUP NAV ── */
.setup-top { margin-bottom: 6px; }
.back-btn {
  background: none;
  border: none;
  color: var(--on-navy-soft);
  font-size: 0.88rem;
  cursor: pointer;
  padding: 4px 0;
  font-family: var(--font);
  transition: color 0.15s;
}
.back-btn:hover { color: var(--gold); }

.steps-bar { display: flex; gap: 7px; margin-bottom: 18px; }
.sdot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.18); transition: background 0.3s; }
.sdot.active { background: var(--gold); box-shadow: 0 0 6px rgba(212,175,55,0.5); }
.sdot.done { background: rgba(212,175,55,0.45); }

/* ── SCREEN TITLES ── */
.screen-title {
  font-size: 1.55rem;
  font-weight: 900;
  color: var(--on-navy);
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.screen-sub { color: var(--on-navy-soft); font-size: 0.86rem; margin: 0 0 18px; }

/* ── CARD GRIDS ── */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 10px;
}
.list-cards { display: flex; flex-direction: column; gap: 10px; }

.card-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 14px 10px;
  background: var(--card-bg);
  border: 2px solid transparent;
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font);
  box-shadow: 0 3px 10px rgba(0,0,0,0.35);
  text-align: center;
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
}
.card-btn:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,0.45); border-color: var(--gold); }
.card-btn:active { transform: scale(0.97); }

.card-btn-wide {
  flex-direction: row;
  align-items: flex-start;
  text-align: left;
  gap: 14px;
  padding: 14px 16px;
}
.card-btn-wide .c-emoji { flex-shrink: 0; margin-top: 2px; }

.c-flag { font-size: 2rem; }
.c-emoji { font-size: 1.7rem; }
.c-name  { font-size: 0.8rem; font-weight: 700; color: var(--text-dark); }
.c-info  { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.c-info strong { font-size: 0.93rem; color: var(--text-dark); }
.c-info p { margin: 0; font-size: 0.78rem; color: var(--text-2); line-height: 1.45; }

/* ── GAME HEADER ── */
.game-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(0,0,0,0.35);
  border-radius: var(--radius);
  margin-bottom: 10px;
  border: 1px solid rgba(212,175,55,0.12);
}
.hh-name { font-size: 0.82rem; font-weight: 700; color: var(--on-navy); }
.hh-age  { font-size: 0.82rem; font-weight: 800; color: var(--gold); text-align: center; }
.hh-club { font-size: 0.75rem; color: var(--on-navy-soft); text-align: right; }

.game-sub {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.ovr-pill {
  flex-shrink: 0;
  background: var(--gold);
  color: var(--navy);
  padding: 5px 11px;
  border-radius: 8px;
  font-weight: 900;
  font-size: 0.88rem;
  white-space: nowrap;
}
.bars { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.bar-row { display: flex; align-items: center; gap: 8px; }
.bar-lbl { color: var(--on-navy-faint); font-size: 0.7rem; width: 36px; flex-shrink: 0; }
.bar-bg { flex: 1; height: 5px; background: rgba(255,255,255,0.12); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 3px; transition: width 0.4s ease; }
.bar-forma { background: var(--gold); }
.bar-moral { background: #4ade80; }

.age-track { height: 3px; background: rgba(255,255,255,0.1); border-radius: 2px; margin-bottom: 14px; }
.age-track-fill { height: 100%; background: linear-gradient(90deg, var(--gold-deep), var(--gold)); border-radius: 2px; transition: width 0.5s ease; }

/* ── GAME CARD ── */
.card-stage { flex: 1; display: flex; flex-direction: column; }
.game-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px 18px;
  border-top: 4px solid var(--gold);
  box-shadow: 0 4px 22px rgba(0,0,0,0.45);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ev-season {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.ev-text {
  font-size: 0.94rem;
  color: var(--text-1);
  line-height: 1.65;
  margin: 0 0 18px;
  flex: 1;
}
.ev-choices { display: flex; flex-direction: column; gap: 10px; }
.choice-btn {
  width: 100%;
  padding: 12px 15px;
  background: var(--navy);
  color: var(--on-navy);
  border: 1.5px solid rgba(212,175,55,0.25);
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  text-align: left;
  transition: background 0.14s, border-color 0.14s;
  line-height: 1.4;
}
.choice-btn:hover { background: var(--navy3); border-color: var(--gold); }
.choice-btn:active { transform: scale(0.98); }

.ev-outcome { flex: 1; display: flex; flex-direction: column; }
.outcome-box {
  flex: 1;
  font-size: 0.93rem;
  color: var(--text-1);
  line-height: 1.65;
  padding: 14px;
  background: rgba(212,175,55,0.07);
  border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0;
  margin-bottom: 16px;
}
.btn-next {
  align-self: center;
  padding: 12px 30px;
  background: var(--gold);
  color: var(--navy);
  border: none;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 800;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.14s;
}
.btn-next:hover { background: var(--gold-bright); }
.btn-next:active { transform: scale(0.97); }

/* ── FINAL CARD ── */
.final-card {
  background: var(--card-bg);
  border-radius: 18px;
  overflow: hidden;
  border-top: 5px solid var(--gold);
  box-shadow: 0 8px 36px rgba(0,0,0,0.55);
  margin-bottom: 18px;
  padding: 20px;
}
.fc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.fc-flag { font-size: 2.4rem; }
.fc-tier {
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(212,175,55,0.15);
  border: 1px solid rgba(212,175,55,0.4);
  color: var(--gold-deep);
}
.fc-retired { font-size: 0.78rem; color: var(--text-2); }

.fc-main { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.fc-ovr-box {
  background: var(--navy);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 68px;
}
.fc-ovr { font-size: 2.6rem; font-weight: 900; color: var(--gold); line-height: 1; }
.fc-pos { font-size: 0.72rem; font-weight: 700; color: var(--on-navy-soft); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }

.fc-info { flex: 1; }
.fc-name { font-size: 1.45rem; font-weight: 900; color: var(--text-dark); margin-bottom: 4px; line-height: 1.2; }
.fc-stars { font-size: 1.1rem; color: var(--gold); margin-bottom: 4px; }
.fc-intl { font-size: 0.78rem; color: var(--text-2); margin-bottom: 2px; }
.fc-club-last { font-size: 0.78rem; color: var(--text-2); }

.sec-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-2);
  margin: 14px 0 7px;
  padding-bottom: 5px;
  border-bottom: 1px solid #e5e7eb;
}
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin: 3px 3px 0 0;
}
.trophy-badge { background: rgba(212,175,55,0.12); border: 1px solid rgba(212,175,55,0.35); color: var(--text-dark); }
.award-badge  { background: rgba(99,102,241,0.1);  border: 1px solid rgba(99,102,241,0.3);  color: #3730a3; }
.club-badge   { background: #f3f4f6; border: 1px solid #e5e7eb; color: var(--text-1); }

.final-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.final-btns .btn { max-width: none; flex: 1; }
