@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --pitch: #0E211A;
  --pitch-light: #16332A;
  --paper: #F3F0E4;
  --hit: #C8FF4D;
  --miss: #FF5A3C;
  --gold: #C9A227;
  --line: rgba(243, 240, 228, 0.16);
  --radius: 2px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--pitch);
  color: var(--paper);
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
}

h1, h2, h3, .display {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0;
}

.mono { font-family: 'JetBrains Mono', monospace; }
a { color: inherit; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 24px; }

nav.top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px; border-bottom: 1px solid var(--line);
  flex-wrap: wrap; gap: 12px;
}
nav.top #nav-auth { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
nav.top .account-email { font-size: 13px; color: rgba(243,240,228,.6); }
nav.top .account-email .sub-badge { color: var(--hit); }
nav.top .account-email .sub-badge.ended { color: var(--miss); }
nav.top .brand {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 22px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
nav.top .brand span { color: var(--hit); }
nav.top a.nav-link {
  color: var(--paper); text-decoration: none; border: 1px solid var(--line);
  padding: 8px 16px; border-radius: var(--radius); font-size: 14px;
}
nav.top a.nav-link:hover { border-color: var(--hit); color: var(--hit); }

.hero {
  padding: 72px 0 48px; display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: 48px; align-items: center;
}
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; padding-top: 40px; } }
.hero h1 { font-size: clamp(40px, 6vw, 64px); line-height: 0.98; }
.hero h1 em { font-style: normal; color: var(--hit); }
.hero p.lede { font-size: 17px; color: rgba(243,240,228,0.75); max-width: 46ch; margin-top: 18px; }

.ticket {
  background: var(--paper); color: var(--pitch); border-radius: var(--radius);
  padding: 28px 24px; position: relative; box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}
.ticket::before {
  content: ""; position: absolute; left: -10px; right: -10px; bottom: 96px;
  border-top: 2px dashed rgba(14,33,26,0.25);
}
.ticket .label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(14,33,26,0.55); }
.ticket .rate { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 88px; line-height: 1; margin: 6px 0 0; }
.ticket .rate .unit { font-size: 32px; vertical-align: 12px; }
.ticket .meta { margin-top: 22px; padding-top: 18px; display: flex; justify-content: space-between; font-size: 13px; color: rgba(14,33,26,0.6); }
.ticket .stub { margin-top: 18px; display: flex; justify-content: space-between; font-size: 12px; letter-spacing: 0.08em; }

.mini-ticket {
  background: var(--paper); color: var(--pitch); border-radius: var(--radius);
  padding: 20px 24px; display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; box-shadow: 0 12px 32px rgba(0,0,0,0.25); position: relative; margin-bottom: 32px;
}
.mini-ticket::before { content: ""; position: absolute; top: -6px; bottom: -6px; left: 30%; border-left: 2px dashed rgba(14,33,26,0.2); }
.mini-ticket .mt-left { display: flex; align-items: center; gap: 16px; }
.mini-ticket .mt-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(14,33,26,0.5); }
.mini-ticket .mt-date { font-size: 13px; font-weight: 600; margin-top: 2px; }
.mini-ticket .mt-rate { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 40px; line-height: 1; }
.mini-ticket .mt-detail { font-size: 13px; color: rgba(14,33,26,0.6); }
.mini-ticket .mt-games { display: flex; gap: 8px; flex-wrap: wrap; }
.mini-ticket .mt-pill { font-size: 11px; font-family: 'JetBrains Mono', monospace; padding: 3px 8px; border-radius: 20px; font-weight: 600; }
.mini-ticket .mt-pill.won { background: rgba(200,255,77,0.35); color: #1a3d0f; }
.mini-ticket .mt-pill.lost { background: rgba(255,90,60,0.3); color: #7a1c0e; }
.mini-ticket .mt-pill.void { background: rgba(14,33,26,0.1); color: rgba(14,33,26,0.6); }
.mini-ticket .mt-game-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 6px 0; border-bottom: 1px solid rgba(14,33,26,0.08); }
.mini-ticket .mt-game-row:last-child { border-bottom: none; }

.btn {
  display: inline-block; background: var(--hit); color: var(--pitch); font-weight: 700;
  padding: 14px 28px; border-radius: var(--radius); text-decoration: none; border: none;
  cursor: pointer; font-size: 15px; font-family: 'Inter', sans-serif;
}
.btn:hover { background: #d8ff77; }
.btn.ghost { background: transparent; color: var(--paper); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--hit); color: var(--hit); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
.btn:disabled:hover { border-color: var(--line); color: var(--paper); }
.btn.danger { background: var(--miss); color: var(--paper); }
.cta-row { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

section { padding: 56px 0; border-top: 1px solid var(--line); }
section h2 { font-size: 32px; margin-bottom: 8px; }
section .sub { color: rgba(243,240,228,0.6); margin-bottom: 28px; max-width: 60ch; }

.history-bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; margin-top: 24px; }
.history-bars .bar { flex: 1; background: var(--pitch-light); border-radius: 2px 2px 0 0; position: relative; min-height: 6px; }
.history-bars .bar.good { background: var(--hit); }
.history-bars .bar.bad { background: var(--miss); }
.history-bars .bar span { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); font-size: 10px; color: rgba(243,240,228,0.4); white-space: nowrap; }

.price-card { background: var(--pitch-light); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; max-width: 380px; }
.price-card .amount { font-size: 48px; }
.price-card .amount .per { font-size: 15px; color: rgba(243,240,228,0.5); text-transform: none; }
.price-card ul { list-style: none; padding: 0; margin: 20px 0; }
.price-card li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.price-card li:before { content: "\2192  "; color: var(--hit); }

.auth-box { max-width: 380px; margin: 80px auto; background: var(--pitch-light); border: 1px solid var(--line); padding: 32px; border-radius: var(--radius); }
.auth-box h1 { font-size: 28px; margin-bottom: 20px; }
input, select, textarea {
  width: 100%; padding: 11px 12px; margin-bottom: 14px; background: var(--pitch);
  border: 1px solid var(--line); color: var(--paper); border-radius: var(--radius);
  font-family: 'Inter', sans-serif; font-size: 14px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--hit); border-color: transparent; }
label { font-size: 13px; color: rgba(243,240,228,0.6); display: block; margin-bottom: 4px; }
.form-msg { font-size: 13px; margin-top: 8px; min-height: 18px; }
.form-msg.error { color: var(--miss); }
.form-msg.ok { color: var(--hit); }

.tip-card {
  background: var(--pitch-light); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 12px; display: grid; grid-template-columns: 1fr auto auto;
  gap: 16px; align-items: center;
}
.tip-card .teams { font-size: 18px; font-weight: 600; }
.tip-card .detail { font-size: 13px; color: rgba(243,240,228,0.6); margin-top: 4px; }
.tip-card .odds { font-family: 'JetBrains Mono', monospace; font-size: 20px; color: var(--gold); }
.badge { padding: 4px 10px; border-radius: 20px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.badge.pending { background: rgba(201,162,39,0.2); color: var(--gold); }
.badge.won { background: rgba(200,255,77,0.2); color: var(--hit); }
.badge.lost { background: rgba(255,90,60,0.2); color: var(--miss); }
.badge.void { background: rgba(243,240,228,0.1); color: rgba(243,240,228,0.5); }

.teams-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 20px; }
.team-card { background: var(--pitch-light); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; cursor: pointer; transition: border-color 0.15s; }
.team-card:hover { border-color: var(--hit); }
.team-card .tc-name { font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.team-card .tc-stats { display: flex; justify-content: space-between; align-items: baseline; }
.team-card .tc-fraction { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: rgba(243,240,228,.5); }
.team-card .tc-rate { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 22px; }
.team-card .tc-note { font-size: 11px; color: rgba(243,240,228,.4); margin-top: 4px; }

.faq-item { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq-item summary { cursor: pointer; font-weight: 600; font-size: 15px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: 'Barlow Condensed', sans-serif; font-size: 22px; color: var(--hit); margin-left: 16px; flex-shrink: 0; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin: 12px 0 0; font-size: 14px; color: rgba(243,240,228,.7); line-height: 1.6; }

table { width: 100%; border-collapse: collapse; margin-top: 20px; font-size: 13px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: rgba(243,240,228,0.5); text-transform: uppercase; font-size: 11px; letter-spacing: 0.06em; }
.row-actions button { background: none; border: 1px solid var(--line); color: var(--paper); padding: 4px 10px; border-radius: var(--radius); font-size: 12px; cursor: pointer; margin-right: 4px; }
.row-actions button.won { border-color: var(--hit); color: var(--hit); }
.row-actions button.lost { border-color: var(--miss); color: var(--miss); }

.empty-state { padding: 40px 0; text-align: center; color: rgba(243,240,228,0.5); }
footer { padding: 32px 24px; text-align: center; font-size: 12px; color: rgba(243,240,228,0.4); }

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .ticket { padding: 22px 18px; }
  .ticket .rate { font-size: 56px; }
  .ticket .rate .unit { font-size: 22px; vertical-align: 8px; }
  .ticket .meta { flex-direction: column; gap: 4px; align-items: flex-start; }
  .mini-ticket { flex-direction: column; align-items: flex-start; padding: 18px 16px; }
  .mini-ticket::before { display: none; }
  .mini-ticket .mt-rate { font-size: 32px; }
  .mini-ticket .mt-games { width: 100%; }
  .tip-card { grid-template-columns: 1fr; gap: 10px; }
  .tip-card .odds, .tip-card > div:last-child { justify-self: start; }
  .teams-grid { grid-template-columns: 1fr; }
  .price-card { max-width: 100%; }
  table { display: block; overflow-x: auto; white-space: nowrap; }
  .hero h1 { font-size: clamp(32px, 9vw, 44px); }
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-row .btn { text-align: center; }
  nav.top #nav-auth { width: 100%; justify-content: flex-start; }
}

/* ---------- i18n ---------- */
/* Verhindert kurzes Aufblitzen der deutschen Texte auf /en/ und /fr/,
   bis i18n.js die Übersetzung angewendet hat. */
html.i18n-loading body { visibility: hidden; }

.lang-switcher a {
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(243,240,228,.5);
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 4px 8px;
  border-radius: var(--radius);
  transition: color .15s, border-color .15s;
}
.lang-switcher a:hover,
.lang-switcher a.active {
  color: var(--hit);
  border-color: var(--hit);
}

/* ---------- Sprach-Dropdown ---------- */
.lang-dropdown { position: relative; }
.lang-dropdown summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(243,240,228,.7);
  border: 1px solid var(--line);
  padding: 5px 10px;
  border-radius: var(--radius);
  transition: border-color .15s, color .15s;
}
.lang-dropdown summary::-webkit-details-marker { display: none; }
.lang-dropdown summary::after {
  content: "▾";
  font-size: 8px;
  opacity: .6;
}
.lang-dropdown[open] summary { border-color: var(--hit); color: var(--hit); }
.lang-dropdown[open] summary::after { content: "▴"; }

.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--pitch-light);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  min-width: 64px;
  overflow: hidden;
  z-index: 30;
  box-shadow: 0 12px 28px rgba(0,0,0,.4);
}
.lang-menu a {
  padding: 9px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(243,240,228,.65);
  text-decoration: none;
}
.lang-menu a:hover { background: rgba(255,255,255,.04); color: var(--paper); }
.lang-menu a.active { color: var(--hit); pointer-events: none; opacity: .6; }
