/* 4ever1 Tippspiel – Schwarz-Rot-Gold (Deutschland) */

:root {
  --bg: #0a0a0a;
  --bg-1: #141414;
  --bg-2: #1c1c1c;
  --line: #2a2a2a;
  --text: #f6f6f6;
  --muted: #9a9a9a;
  --black: #111111;
  --red: #e30613;
  --red-2: #ff2d3b;
  --gold: #ffce00;
  --gold-2: #ffe169;
  --accent: var(--gold);
  --good: #00d28a;
  --bad: #ff4d6d;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0,0,0,.55);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); min-height: 100dvh; }
body { padding-bottom: env(safe-area-inset-bottom); }

/* Trikolore-Band ganz oben */
body::before {
  content: "";
  position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 100;
  background: linear-gradient(90deg, #000 0 33.3%, var(--red) 33.3% 66.6%, var(--gold) 66.6% 100%);
}

a { color: var(--gold); text-decoration: none; }
button { font: inherit; cursor: pointer; }

#app { max-width: 720px; margin: 0 auto; padding: 16px; padding-top: max(20px, env(safe-area-inset-top)); }

/* Topbar */
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 8px 4px 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .5px; }
.brand-text { font-size: 1.2rem; }
.brand-text small { display: block; font-size: .65rem; color: var(--gold); font-weight: 600; letter-spacing: 2px; text-transform: uppercase; }
/* Logo-Punkt als Trikolore-Ring */
.logo-dot { width: 16px; height: 16px; border-radius: 50%;
  background: conic-gradient(#000 0 33%, var(--red) 33% 66%, var(--gold) 66% 100%);
  box-shadow: 0 0 16px rgba(255,206,0,.5); }

.icon-btn { background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 50%; width: 38px; height: 38px; display: inline-grid; place-items: center; }

.view { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Hero */
.hero { font-size: clamp(1.9rem, 6vw, 2.7rem); line-height: 1.12; margin: 8px 0 12px; font-weight: 800; }
.accent { color: var(--gold); text-shadow: 0 0 26px rgba(255,206,0,.4); }
.lead { color: var(--muted); font-size: 1.05rem; line-height: 1.5; margin: 0 0 22px; }

.cta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }

/* Primär-Button: Gold. CTA-Akzent: Rot */
.btn-primary { background: linear-gradient(180deg, var(--gold) 0%, #e0b400 100%); color: #1a1500; font-weight: 800; padding: 14px 22px; border: none; border-radius: 12px; box-shadow: 0 6px 22px rgba(255,206,0,.3); transition: transform .08s; }
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary.small { padding: 10px 14px; font-size: .95rem; }
.btn-red { background: linear-gradient(180deg, var(--red-2) 0%, var(--red) 100%); color: #fff; font-weight: 800; padding: 14px 22px; border: none; border-radius: 12px; box-shadow: 0 6px 22px rgba(227,6,19,.35); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); padding: 14px 22px; border-radius: 12px; font-weight: 600; }
.link { background: none; border: none; color: var(--gold); padding: 6px 2px; }

/* Section-Titel */
.section-title { font-size: 1.3rem; margin: 26px 0 14px; display: flex; align-items: center; gap: 8px; }

/* Preise */
.prizes { display: grid; gap: 12px; margin-bottom: 22px; }
.prize { display: flex; align-items: center; gap: 14px; background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; position: relative; overflow: hidden; }
.prize::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.prize.r1::before { background: var(--gold); }
.prize.r2::before { background: #c8c8c8; }
.prize.r3::before { background: #cd7f32; }
.prize.r1 { border-color: rgba(255,206,0,.4); box-shadow: 0 0 24px rgba(255,206,0,.12); }
.prize .medal { font-size: 2rem; line-height: 1; }
.prize .ptitle { font-weight: 800; font-size: 1.05rem; }
.prize .pdesc { color: var(--muted); font-size: .92rem; margin-top: 2px; }
.prize .pvalue { margin-left: auto; font-weight: 800; color: var(--gold); white-space: nowrap; }

/* Feature-Karten */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 8px 0 24px; }
.card { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card .emoji { font-size: 1.6rem; margin-bottom: 6px; }
.card h3 { margin: 0 0 4px; font-size: 1rem; }
.card p { margin: 0; color: var(--muted); font-size: .9rem; }
@media (max-width: 480px) { .cards { grid-template-columns: 1fr; } }

/* Forms */
.form { display: grid; gap: 14px; max-width: 380px; margin-top: 16px; }
.form label { display: grid; gap: 6px; font-size: .9rem; color: var(--muted); }
.form input { background: var(--bg-1); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 1rem; }
.form input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255,206,0,.2); }
.form .hint { color: var(--muted); font-size: .8rem; }

/* Tabs */
.tabs { display: flex; gap: 4px; background: var(--bg-1); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 16px; overflow-x: auto; }
.tab { background: transparent; color: var(--muted); border: none; padding: 10px 14px; border-radius: 10px; font-weight: 600; white-space: nowrap; }
.tab.active { background: var(--gold); color: #1a1500; }
.tab-pane { min-height: 200px; }

/* Install-Bar */
.install-bar { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); background: var(--bg-1); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow); z-index: 50; max-width: 696px; margin: 0 auto; }
.install-bar span { flex: 1; font-size: .95rem; }

/* ===== Match-Cards + Tipp-Eingabe ===== */
.muted { color: var(--muted); }
.bad { color: var(--bad); }
.match { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.mhead { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); margin-bottom: 8px; }
.mteams { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; font-weight: 700; margin-bottom: 12px; }
.mteams .team { flex: 1; }
.mteams .team.right { text-align: right; }
.mteams .vs { color: var(--muted); font-weight: 400; }
.mscore { font-size: 1.6rem; font-weight: 800; text-align: center; color: var(--gold); margin: 6px 0 10px; }
.sealed { background: var(--bg-2); border-radius: 10px; padding: 12px; text-align: center; color: var(--muted); font-size: .92rem; }

.tip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stepper { display: flex; align-items: center; gap: 6px; background: var(--bg-2); border-radius: 10px; padding: 4px; }
.stepper button { width: 38px; height: 38px; border-radius: 8px; border: none; background: var(--bg-1); color: var(--text); font-size: 1.3rem; font-weight: 700; }
.stepper button:active { background: var(--gold); color: #000; }
.st-val { min-width: 28px; text-align: center; font-size: 1.3rem; font-weight: 800; }
.tcolon { font-size: 1.3rem; font-weight: 800; color: var(--muted); }
.joker { width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); font-size: 1.2rem; }
.joker.on { background: var(--red); border-color: var(--red); box-shadow: 0 0 14px rgba(227,6,19,.5); }
.tipstate { font-size: .85rem; color: var(--good); margin-left: 2px; }

/* ===== Ranking ===== */
.ranktable { display: grid; gap: 6px; }
.rankrow { display: flex; align-items: center; gap: 12px; background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.rankrow .rk { min-width: 32px; font-weight: 800; font-size: 1.1rem; }
.rankrow .rn { flex: 1; font-weight: 600; }
.rankrow .rp { color: var(--gold); font-weight: 800; }
.rankrow.top1 { border-color: rgba(255,206,0,.5); box-shadow: 0 0 18px rgba(255,206,0,.12); }
.rankrow.top2 { border-color: rgba(200,200,200,.4); }
.rankrow.top3 { border-color: rgba(205,127,50,.4); }

/* ===== Admin ===== */
.adminrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.adminbtns { display: flex; gap: 8px; }

/* ===== Reveal-Liste ===== */
.revlist { display: grid; gap: 4px; max-height: 60vh; overflow: auto; }
.revrow { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--bg-2); border-radius: 8px; }
.revrow span:first-child { flex: 1; }
.revrow .pts { color: var(--gold); font-weight: 800; }

/* ===== Toast ===== */
#toast { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--bg-2); border: 1px solid var(--line); color: var(--text); padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); opacity: 0; transition: all .25s; z-index: 200; max-width: 90vw; text-align: center; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.good { border-color: var(--good); }
#toast.bad { border-color: var(--bad); }

/* ===== Modal ===== */
#modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: none; align-items: center; justify-content: center; z-index: 150; padding: 16px; }
#modal.show { display: flex; }
.modal-box { background: var(--bg-1); border: 1px solid var(--line); border-radius: 16px; padding: 18px; max-width: 460px; width: 100%; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.modal-head h3 { margin: 0; }

.btn-ghost.small, .btn-primary.small { padding: 9px 14px; font-size: .9rem; }

/* ===== Werbung ===== */
.adbanner { display: block; position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin: 16px 0; }
.adbanner img { width: 100%; display: block; }
.adlabel { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.65); color: #ccc; font-size: .65rem; padding: 2px 6px; border-radius: 4px; letter-spacing: .5px; }
details.card summary { cursor: pointer; font-weight: 600; }
.form select { background: var(--bg-1); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 1rem; }

/* ===== Werbe-Auswertung ===== */
.bigstat { font-size: 1.8rem; font-weight: 800; color: var(--gold); }
.slotpill { display: inline-block; background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); font-size: .72rem; padding: 2px 8px; border-radius: 999px; margin-left: 4px; }

/* ===== Rechtstexte ===== */
.legal { line-height: 1.65; max-width: 720px; }
.legal h3 { margin-top: 24px; color: var(--gold); font-size: 1.05rem; }
.legal p, .legal ul { color: #dcdcdc; }
.legal a { color: var(--gold); }
.legal-footer { margin-top: 36px; padding: 20px 0; border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: .85rem; }
.legal-footer a { color: var(--muted); }

/* ===== Cookie-Bar ===== */
.cookie-bar { position: fixed; left: 12px; right: 12px; bottom: 12px; background: var(--bg-1); border: 1px solid var(--gold); border-radius: 14px; padding: 14px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; box-shadow: var(--shadow); z-index: 300; max-width: 696px; margin: 0 auto; font-size: .9rem; }
.cookie-bar span { flex: 1; min-width: 200px; color: #dcdcdc; }
.cookie-bar a { color: var(--gold); }
.cookie-btns { display: flex; gap: 8px; }

/* ===== Countdown ===== */
.countdown { background: linear-gradient(135deg, var(--bg-1), var(--bg-2)); border: 1px solid var(--gold); border-radius: var(--radius); padding: 18px; margin: 4px 0 24px; text-align: center; box-shadow: 0 0 26px rgba(255,206,0,.1); }
.cd-title { color: var(--gold); font-weight: 700; font-size: .9rem; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 12px; }
.cd-grid { display: flex; justify-content: center; gap: 14px; }
.cd-grid > div { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 6px; min-width: 62px; }
.cd-grid b { display: block; font-size: 1.9rem; font-weight: 800; color: var(--text); line-height: 1; }
.cd-grid span { font-size: .7rem; color: var(--muted); text-transform: uppercase; }
.cd-match { margin-top: 12px; font-weight: 700; color: var(--gold-2); }

/* ===== Blitztabelle ===== */
.blitz-badge { background: linear-gradient(90deg, var(--red), #b00510); color: #fff; font-weight: 800; text-align: center; padding: 10px; border-radius: 10px; margin-bottom: 12px; letter-spacing: .5px; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .7; } }
.rankrow .mv { font-size: .8rem; font-weight: 800; margin-right: 6px; }
.rankrow .mv.up { color: var(--good); }
.rankrow .mv.down { color: var(--bad); }
.rankrow.me { border-color: var(--gold); box-shadow: 0 0 14px rgba(255,206,0,.2); }
.rankrow.me .rn::after { content: " (du)"; color: var(--gold); font-size: .8rem; }

/* ===== AdSense-Slot ===== */
.adsense-slot { margin: 16px 0; min-height: 1px; }

/* ===== Registrierung (aufgewertet) ===== */
.pw-strength { margin-top: -6px; }
.pw-bar { height: 6px; background: var(--bg-2); border-radius: 3px; overflow: hidden; }
.pw-bar span { display: block; height: 100%; width: 0; transition: width .2s, background .2s; }
.pw-strength small { color: var(--muted); font-size: .78rem; }
.checkbox { flex-direction: row !important; align-items: flex-start; gap: 8px; font-size: .85rem; color: var(--muted); }
.checkbox input { width: auto; margin-top: 3px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
