/* ============================================================
   WK 2026 Familie Pool — Stylesheet
   ============================================================ */

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

:root {
  --bg:         #0a0f1e;
  --bg2:        #0f1628;
  --bg3:        #172033;
  --orange:     #ff6b00;
  --orange-dark:#d95a00;
  --orange-dim: #7a3200;
  --gold:       #f1c40f;
  --text:       #f0f4ff;
  --text-dim:   #7a8fb0;
  --red:        #e74c3c;
  --card-bg:    #111a2e;
  --border:     #1e2f4a;
  --radius:     12px;
  --shadow:     0 4px 24px rgba(0,0,0,0.6);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── TOP BAR ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--bg2);
  border-bottom: 2px solid var(--orange-dim);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.trophy { font-size: 22px; }

.pool-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 0.5px;
}

.topbar-right {
  display: flex;
  gap: 8px;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 5px 10px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}

.lang-btn img { width: 18px; height: 12px; border-radius: 2px; object-fit: cover; }
.lang-btn.active { border-color: var(--orange); color: var(--orange); background: var(--orange-dim); }
.lang-btn:hover:not(.active) { border-color: var(--text-dim); color: var(--text); }

/* ── MAIN NAV ── */
.main-nav {
  display: flex;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.main-nav::-webkit-scrollbar { display: none; }

.nav-btn {
  flex: 1;
  min-width: 80px;
  padding: 12px 8px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.nav-btn.active, .nav-btn:hover {
  color: var(--orange);
  border-bottom-color: var(--orange);
}

/* ── SCREENS ── */
.screen { display: none; flex: 1; padding: 20px 16px 40px; }
.screen.active { display: flex; justify-content: center; }

/* ── CARD ── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}
.card.wide { max-width: 680px; }

/* ── CARD HERO ── */
.card-hero {
  text-align: center;
  margin-bottom: 28px;
}
.ball-icon { font-size: 48px; margin-bottom: 8px; }
.card-hero h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}
.subtitle { color: var(--text-dim); font-size: 14px; }
.welcome-name { color: var(--orange); font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.pool-label { color: var(--text-dim); font-size: 13px; }

/* ── FORM ── */
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input, select {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 15px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.2s;
}
input:focus, select:focus { border-color: var(--orange); }
input::placeholder { color: var(--text-dim); }
select option { background: var(--bg2); }

.pin-input {
  font-size: 24px;
  letter-spacing: 8px;
  text-align: center;
}

/* ── BUTTONS ── */
.btn-primary {
  width: 100%;
  padding: 13px;
  background: var(--orange);
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-top: 4px;
}
.btn-primary:hover { background: var(--orange-dark); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { background: var(--orange-dim); cursor: not-allowed; opacity: 0.7; }

.btn-ghost {
  width: 100%;
  padding: 11px;
  background: none;
  color: var(--text-dim);
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  margin-top: 10px;
  transition: color 0.2s, border-color 0.2s;
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-dim); }

.btn-refresh {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 34px; height: 34px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.btn-refresh:hover { color: var(--orange); border-color: var(--orange); }

/* ── ERROR ── */
.error-msg {
  background: rgba(231, 76, 60, 0.12);
  border: 1px solid var(--red);
  color: #ff6b6b;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
}

/* ── SCREEN HEADERS ── */
.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.screen-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--orange);
}
.screen-desc {
  color: var(--text-dim);
  font-size: 13px;
  margin-bottom: 22px;
  line-height: 1.5;
}

/* ── TQ LOCKED BANNER ── */
.tq-locked-banner {
  background: rgba(241, 196, 15, 0.1);
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
}

/* ── STANDINGS TABLE ── */
.standings-table-wrap { overflow-x: auto; }
.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.standings-table th {
  text-align: left;
  padding: 10px 12px;
  color: var(--text-dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}
.standings-table td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(30,47,74,0.6);
}
.standings-table tr:last-child td { border-bottom: none; }
.standings-table tr.me td { background: rgba(255,107,0,0.08); color: var(--orange); font-weight: 700; }
.standings-table .rank { font-weight: 800; color: var(--orange); }
.standings-table .total { font-weight: 800; }

.rank-1 .rank { color: var(--gold); }

.updated-at {
  color: var(--text-dim);
  font-size: 11px;
  margin-top: 12px;
  text-align: right;
}

/* ── COMING SOON ── */
.coming-soon {
  color: var(--text-dim);
  font-style: italic;
  font-size: 14px;
  text-align: center;
  padding: 40px 0;
}

/* ── UTILITY ── */
.hidden { display: none !important; }

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
  .card { padding: 22px 16px; }
  .pool-name { font-size: 14px; }
  .card-hero h1 { font-size: 22px; }
}
