/* WM Tippspiel 2026 – Duolingo-inspiriertes Design */

:root {
  --green: #58cc02;
  --green-dark: #46a302;
  --green-light: #d7ffb8;
  --blue: #1cb0f6;
  --blue-dark: #1899d6;
  --blue-light: #ddf4ff;
  --gold: #ffc800;
  --gold-dark: #e6a800;
  --red: #ff4b4b;
  --red-dark: #ea2b2b;
  --purple: #ce82ff;
  --text: #3c3c3c;
  --text-soft: #777777;
  --line: #e5e5e5;
  --bg: #ffffff;
  --bg-soft: #f7f7f7;
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg-soft);
  font-size: 16px;
  line-height: 1.45;
}

button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }

.boot {
  text-align: center;
  padding: 30vh 20px;
  font-weight: 800;
  color: var(--text-soft);
}

svg.lucide { vertical-align: -0.16em; }

/* ---------------------------------------------------------------- Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 14px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 12px 22px;
  color: #fff;
  background: var(--green);
  box-shadow: 0 4px 0 var(--green-dark);
  transition: filter .12s, transform .05s, box-shadow .05s;
  user-select: none;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--green-dark); }
.btn:disabled { background: var(--line); box-shadow: 0 4px 0 #cfcfcf; color: #afafaf; cursor: not-allowed; }
.btn.blue { background: var(--blue); box-shadow: 0 4px 0 var(--blue-dark); }
.btn.blue:active { box-shadow: 0 0 0 var(--blue-dark); }
.btn.red { background: var(--red); box-shadow: 0 4px 0 var(--red-dark); }
.btn.red:active { box-shadow: 0 0 0 var(--red-dark); }
.btn.ghost {
  background: #fff; color: var(--blue);
  border: 2px solid var(--line);
  box-shadow: 0 4px 0 var(--line);
}
.btn.ghost:active { box-shadow: 0 0 0 var(--line); }
.btn.small { padding: 8px 14px; font-size: 13px; border-radius: 12px; }

/* ---------------------------------------------------------------- Header */

header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 2px solid var(--line);
}
.header-inner {
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 19px;
  color: var(--green);
  white-space: nowrap;
}
.logo svg { color: var(--gold); }

.statbar {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 800;
}
.stat {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 15px;
}
.stat.streak { color: #ff9600; }
.stat.points { color: var(--gold-dark); }
.stat.rank { color: var(--blue); }

nav.tabs {
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  gap: 4px;
  padding: 0 12px;
  overflow-x: auto;
}
nav.tabs a {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px 12px;
  text-decoration: none;
  color: var(--text-soft);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  border-radius: 12px 12px 0 0;
  border-bottom: 4px solid transparent;
  white-space: nowrap;
}
nav.tabs a.active { color: var(--blue); border-bottom-color: var(--blue); background: var(--blue-light); }
nav.tabs a:hover:not(.active) { background: var(--bg-soft); }

/* ---------------------------------------------------------------- Layout */

main {
  max-width: 1060px;
  margin: 0 auto;
  padding: 20px 16px 80px;
}

.card {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

h2.section {
  font-size: 22px;
  font-weight: 900;
  margin: 26px 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
h2.section:first-child { margin-top: 0; }
h2.section svg { color: var(--blue); }

.muted { color: var(--text-soft); }
.center { text-align: center; }

/* ---------------------------------------------------------------- Login */

.login-wrap {
  max-width: 430px;
  margin: 8vh auto 0;
  padding: 0 16px;
  text-align: center;
}
.login-hero {
  width: 96px; height: 96px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--green-light);
  display: flex; align-items: center; justify-content: center;
  color: var(--green-dark);
}
.login-lang { text-align: right; margin-bottom: 40px; }
.login-names { display: flex; gap: 10px; }
.login-names input { flex: 1; min-width: 0; }
.login-wrap h1 { font-size: 30px; font-weight: 900; margin-bottom: 6px; }
.login-wrap p.sub { color: var(--text-soft); font-weight: 700; margin-bottom: 26px; }
.login-wrap input {
  width: 100%;
  padding: 14px 16px;
  font-size: 17px;
  font-weight: 700;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--bg-soft);
  margin-bottom: 14px;
  outline: none;
}
.login-wrap input:focus { border-color: var(--blue); background: #fff; }
.login-wrap .btn { width: 100%; padding: 15px; font-size: 16px; }
.login-note {
  margin-top: 22px;
  font-size: 13.5px;
  color: var(--text-soft);
  font-weight: 600;
}
.login-hosted {
  margin-top: 34px;
  font-size: 11.5px;
  color: #b0b0b0;
  font-weight: 600;
}
.login-hosted a { color: #b0b0b0; }

/* ---------------------------------------------------------------- Spiele */

.filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.chip {
  border: 2px solid var(--line);
  background: #fff;
  color: var(--text-soft);
  border-radius: 999px;
  padding: 7px 16px;
  font-weight: 800;
  font-size: 13.5px;
}
.chip.active { border-color: var(--blue); color: var(--blue); background: var(--blue-light); }

.date-head {
  font-weight: 900;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-soft);
  margin: 24px 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.date-head::after { content: ''; flex: 1; height: 2px; background: var(--line); border-radius: 2px; }
.date-head.today { color: var(--green-dark); }

.match-card {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.match-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-soft);
  margin-bottom: 10px;
}
.match-meta .group-chip {
  background: var(--blue-light);
  color: var(--blue-dark);
  border-radius: 999px;
  padding: 2px 10px;
}
.match-meta .live-chip {
  background: #ffe3e3;
  color: var(--red-dark);
  border-radius: 999px;
  padding: 2px 10px;
  display: inline-flex; align-items: center; gap: 5px;
}
.match-meta .done-chip {
  background: var(--green-light);
  color: var(--green-dark);
  border-radius: 999px;
  padding: 2px 10px;
}
.match-meta .venue { margin-left: auto; font-weight: 700; }

.match-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}
.team {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 16px;
  min-width: 0;
}
.team.away { flex-direction: row-reverse; text-align: right; }
.team span.tname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flag {
  width: 34px; height: 26px;
  border-radius: 6px;
  border: 1px solid var(--line);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-soft);
}
.flag.placeholder {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-soft); font-size: 11px; font-weight: 900;
}

.score-mid {
  text-align: center;
  min-width: 92px;
}
.score-mid .big {
  font-size: 24px;
  font-weight: 900;
}
.score-mid .kickoff-time {
  font-size: 17px;
  font-weight: 900;
  color: var(--text);
}

.tip-zone {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 2px dashed var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.tip-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tip-inputs input {
  width: 56px;
  height: 46px;
  text-align: center;
  font-size: 20px;
  font-weight: 900;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
  outline: none;
}
.tip-inputs input:focus { border-color: var(--green); background: #fff; }
.tip-inputs .colon { font-weight: 900; font-size: 20px; color: var(--text-soft); }

.my-tip-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-soft);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 8px 14px;
  font-weight: 900;
  font-size: 15px;
}
.my-tip-chip svg { color: var(--text-soft); }

.points-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 900;
  font-size: 14px;
}
.points-chip.p4 { background: var(--green-light); color: var(--green-dark); }
.points-chip.p3 { background: var(--blue-light); color: var(--blue-dark); }
.points-chip.p2 { background: #fff3d0; color: var(--gold-dark); }
.points-chip.p0 { background: #ffe3e3; color: var(--red-dark); }
.points-chip.open { background: var(--bg-soft); color: var(--text-soft); }

.tip-zone .spacer { flex: 1; }
.all-tips-btn {
  background: none;
  border: none;
  color: var(--blue);
  font-weight: 800;
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.all-tips-list { margin-top: 10px; width: 100%; }
.all-tips-list .tip-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 4px;
  border-bottom: 1px solid var(--bg-soft);
  font-weight: 700;
  font-size: 14.5px;
}
.tip-line .tl-score { margin-left: auto; font-weight: 900; }
.tip-line.clickable { cursor: pointer; border-radius: 10px; transition: background .1s; }
.tip-line.clickable:hover { background: var(--blue-light); }

/* ---------------------------------------------------------------- Avatare */

.avatar {
  position: relative;
  overflow: hidden;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 14px;
  flex-shrink: 0;
  text-transform: uppercase;
}
.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* deckend in Kreisfarbe, damit die Initialen hinter dem transparenten Tier-PNG verschwinden */
  background: inherit;
  padding: 8%;
}
.avatar.small { width: 30px; height: 30px; font-size: 11.5px; }
.avatar.big { width: 84px; height: 84px; font-size: 30px; }

/* ---------------------------------------------------------------- Rangliste */

.podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  margin: 10px 0 28px;
}
.podium .pod {
  text-align: center;
  flex: 1;
  max-width: 160px;
}
.pod .avatar { margin: 0 auto 8px; position: relative; }
.pod .crown { color: var(--gold); margin-bottom: 2px; }
.pod .pname { font-weight: 900; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod .ppoints { font-weight: 800; font-size: 13px; color: var(--text-soft); }
.pod .block {
  margin-top: 8px;
  border-radius: 12px 12px 0 0;
  font-size: 26px;
  font-weight: 900;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pod.p1 .block { height: 86px; background: var(--gold); }
.pod.p2 .block { height: 62px; background: #b9c2cc; }
.pod.p3 .block { height: 46px; background: #d29a68; }

.league-block { margin-bottom: 22px; }
.league-head {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 900;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 8px 4px;
}
.league-head.diamant { color: #3fb6f0; }
.league-head.gold { color: var(--gold-dark); }
.league-head.silber { color: #8a97a5; }
.league-head.bronze { color: #c2793e; }

.lb-table { width: 100%; }
.lb-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 9px 14px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: transform .1s;
}
.lb-row:hover { transform: translateX(3px); border-color: #d0d0d0; }
.lb-row.me { border-color: var(--green); background: #fbfff5; }
.lb-rank { width: 28px; text-align: center; font-weight: 900; font-size: 16px; color: var(--text-soft); }
.lb-delta { width: 20px; display: flex; justify-content: center; }
.lb-delta .up { color: var(--green); }
.lb-delta .down { color: var(--red); }
.lb-delta .same { color: var(--line); }
.lb-name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-sub { font-size: 12px; font-weight: 700; color: var(--text-soft); }
.lb-points { margin-left: auto; font-weight: 900; font-size: 17px; color: var(--gold-dark); white-space: nowrap; }
.lb-streak { display: inline-flex; align-items: center; gap: 3px; color: #ff9600; font-weight: 800; font-size: 13px; }

/* ---------------------------------------------------------------- Profil */

.profile-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}
.profile-head h1 { font-size: 26px; font-weight: 900; }
.league-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 14px;
  font-weight: 900;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.league-tag.diamant { background: #def3ff; color: #1899d6; }
.league-tag.gold { background: #fff3d0; color: var(--gold-dark); }
.league-tag.silber { background: #eef1f4; color: #66727f; }
.league-tag.bronze { background: #f7e3d2; color: #b06a30; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}
.stat-card {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.stat-card .icon-bubble {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-card .val { font-weight: 900; font-size: 19px; line-height: 1.1; }
.stat-card .lbl { font-weight: 700; font-size: 12px; color: var(--text-soft); }

.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.badge-card {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 16px 12px;
  text-align: center;
}
.badge-card .badge-icon {
  width: 54px; height: 54px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold);
  color: #fff;
  box-shadow: 0 3px 0 var(--gold-dark);
}
.badge-card.locked { opacity: 0.55; }
.badge-card.locked .badge-icon { background: var(--line); box-shadow: 0 3px 0 #cfcfcf; color: #9b9b9b; }
.badge-card .bname { font-weight: 900; font-size: 14px; }
.badge-card .bdesc { font-weight: 600; font-size: 12px; color: var(--text-soft); }

.recent-list .tip-line .tl-match { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- Admin */

.admin-grid { display: grid; gap: 14px; }
.admin-match-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 8px;
}
.admin-match-row .amr-info { font-weight: 800; min-width: 220px; flex: 1; }
.admin-match-row .amr-sub { font-size: 12px; color: var(--text-soft); font-weight: 700; }
.admin-match-row input[type=number] {
  width: 52px; height: 40px;
  text-align: center;
  font-weight: 900;
  font-size: 17px;
  border: 2px solid var(--line);
  border-radius: 10px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.form-grid label { font-weight: 800; font-size: 12.5px; color: var(--text-soft); display: block; margin-bottom: 4px; }
.form-grid input, .form-grid select {
  width: 100%;
  padding: 10px 12px;
  font-weight: 700;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
  outline: none;
}
.form-grid input:focus { border-color: var(--blue); background: #fff; }
textarea.import-area {
  width: 100%;
  min-height: 140px;
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  font-family: ui-monospace, monospace;
  font-size: 13px;
  margin-bottom: 10px;
}

/* ---------------------------------------------------------------- Toast & Modal */

#toast-zone {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  background: var(--text);
  color: #fff;
  font-weight: 800;
  padding: 12px 22px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 9px;
  animation: pop .25s ease;
  max-width: 90vw;
}
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }
@keyframes pop {
  from { transform: translateY(14px) scale(.92); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(60,60,60,.45);
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.modal {
  background: #fff;
  border-radius: 20px;
  padding: 26px 24px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  animation: pop .2s ease;
}
.modal .modal-icon {
  width: 70px; height: 70px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
}
.modal h3 { font-size: 20px; font-weight: 900; margin-bottom: 8px; }
.modal p { color: var(--text-soft); font-weight: 700; margin-bottom: 20px; }
.modal .modal-tip { font-size: 26px; font-weight: 900; color: var(--text); margin-bottom: 16px; }
.modal .modal-btns { display: flex; gap: 10px; }
.modal .modal-btns .btn { flex: 1; }

/* ---------------------------------------------------------------- Chat */

.chat-wrap {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  height: calc(100vh - 230px);
  min-height: 420px;
  overflow: hidden;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 85%;
  animation: pop .18s ease;
}
.chat-msg.mine { flex-direction: row-reverse; align-self: flex-end; }
.chat-bubble {
  background: var(--bg-soft);
  border: 2px solid var(--line);
  border-radius: 16px 16px 16px 4px;
  padding: 8px 13px;
  min-width: 0;
}
.chat-msg.mine .chat-bubble {
  background: var(--green-light);
  border-color: #b8e986;
  border-radius: 16px 16px 4px 16px;
}
.chat-meta {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-soft);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-text { font-weight: 600; font-size: 14.5px; word-wrap: break-word; overflow-wrap: anywhere; }
.chat-del {
  background: none;
  border: none;
  color: var(--red);
  padding: 0 2px;
  display: inline-flex;
  opacity: .5;
}
.chat-del:hover { opacity: 1; }
.chat-form {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-top: 2px solid var(--line);
  background: #fff;
}
.chat-form input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  font-size: 15px;
  font-weight: 600;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
  outline: none;
  font-family: inherit;
}
.chat-form input:focus { border-color: var(--blue); background: #fff; }

/* ---------------------------------------------------------------- Hilfe */

.faq-card { padding: 6px 18px; }
.faq-item { border-bottom: 2px solid var(--bg-soft); }
.faq-item:last-child { border-bottom: none; }
.faq-item summary {
  font-weight: 800;
  padding: 14px 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq-item summary::after {
  content: '+';
  font-size: 20px;
  font-weight: 900;
  color: var(--blue);
  margin-left: 12px;
}
.faq-item[open] summary::after { content: '–'; }
.faq-item p {
  padding: 0 0 14px;
  color: var(--text-soft);
  font-weight: 600;
  line-height: 1.55;
}
.contact-row { display: flex; align-items: center; gap: 14px; }
.contact-mail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}
.contact-mail:hover { text-decoration: underline; }
.contact-card a { color: var(--blue); font-weight: 800; }

/* ---------------------------------------------------------------- Finalrunde */

.ko-locked { padding: 48px 24px; }
.ko-lock-hero {
  width: 96px; height: 96px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 2px solid var(--line);
  color: var(--text-soft);
  display: flex; align-items: center; justify-content: center;
}
.progress-outer {
  max-width: 420px;
  height: 18px;
  margin: 0 auto;
  background: var(--bg-soft);
  border: 2px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: 999px;
  transition: width .7s cubic-bezier(.25,.8,.35,1);
}

/* ---------------------------------------------------------------- Tipp-Erfolg & Level */

.success-pop {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity .4s;
}
.success-pop.fade { opacity: 0; }
.success-card {
  background: #fff;
  border: 3px solid var(--green);
  border-radius: 20px;
  box-shadow: 0 6px 0 var(--green-dark);
  padding: 26px 34px;
  text-align: center;
  animation: pop .25s ease;
}
.success-check {
  width: 72px; height: 72px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 0 var(--green-dark);
  animation: celebrate-bounce .8s ease 2;
}
.success-title { font-weight: 900; font-size: 18px; }

.level-block { margin-top: 10px; max-width: 340px; }
.level-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f3e8ff;
  color: #9b5de5;
  border-radius: 999px;
  padding: 4px 14px;
  font-weight: 900;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.progress-outer.slim { height: 12px; margin: 0; max-width: none; }
.progress-outer.slim .progress-fill { background: #9b5de5; }
.level-progress-text {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
}

/* ---------------------------------------------------------------- Konfetti & Feier */

.confetti-zone {
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
  overflow: hidden;
}
.confetti-piece {
  position: absolute;
  top: -4vh;
  animation-name: confetti-fall;
  animation-timing-function: cubic-bezier(.25,.4,.55,1);
  animation-fill-mode: forwards;
}
@keyframes confetti-fall {
  0%   { transform: translate(0, -4vh) rotate(0deg) rotateX(0deg); opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translate(var(--drift), 108vh) rotate(var(--spin)) rotateX(900deg); opacity: 0.6; }
}

.modal.celebrate { border: 3px solid var(--gold); box-shadow: 0 6px 0 var(--gold-dark); }
.celebrate-icon {
  width: 84px; height: 84px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 0 var(--gold-dark);
  animation: celebrate-bounce .9s ease infinite;
}
@keyframes celebrate-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  35%      { transform: translateY(-12px) scale(1.07); }
  55%      { transform: translateY(0) scale(.97); }
}
.modal.celebrate .modal-tip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 20px;
}

/* Ergebnis-Recap ("Willkommen zurück") */
.celebrate-icon.sober { background: var(--blue-light); color: var(--blue); box-shadow: 0 4px 0 #bfe7fb; animation: none; }
.modal.recap { max-width: 480px; text-align: center; }
.recap-rows { margin-bottom: 14px; }
.recap-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  border-bottom: 2px solid var(--bg-soft);
  opacity: 0;
  animation: recap-in .45s cubic-bezier(.2,.8,.3,1.1) forwards;
}
.recap-row:last-child { border-bottom: none; }
.recap-match {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 18px;
  flex-wrap: wrap;
  justify-content: center;
}
.recap-match .flag { width: 28px; height: 21px; }
.recap-teams { font-size: 13px; font-weight: 700; color: var(--text-soft); width: 100%; }
.recap-tip { font-size: 13px; font-weight: 700; }
@keyframes recap-in {
  from { opacity: 0; transform: translateY(14px) scale(.95); }
  to { opacity: 1; transform: none; }
}
.recap-total {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 900;
  color: var(--gold-dark);
  background: #fff3d0;
  border-radius: 999px;
  padding: 8px 22px;
  margin-bottom: 18px;
  opacity: 0;
  animation: recap-in .45s cubic-bezier(.2,.8,.3,1.1) forwards;
}

/* Punkte-Regeln-Box */
.rules-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}
.rule {
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
}
.rule .rp { font-size: 22px; font-weight: 900; }
.rule .rl { font-size: 13px; font-weight: 800; margin-bottom: 6px; }
.rule .rd { font-size: 11.5px; font-weight: 600; color: var(--text-soft); line-height: 1.45; }
.rule.r4 .rp { color: var(--green-dark); }
.rule.r3 .rp { color: var(--blue-dark); }
.rule.r2 .rp { color: var(--gold-dark); }
.rule.r0 .rp { color: var(--red-dark); }

/* ---------------------------------------------------------------- Mobil */

@media (max-width: 640px) {
  .statbar { gap: 9px; }
  .stat { font-size: 13.5px; }
  .logo span { display: none; }
  .team { font-size: 14px; gap: 7px; }
  .flag { width: 28px; height: 21px; }
  .match-meta .venue { display: none; }
  .podium .pod { max-width: 110px; }
}
