:root {
  --bg: #0b1020;
  --panel: #121826;
  --panel-2: #182338;
  --border: #25304a;
  --text: #f8fafc;
  --muted: #a9b7cf;
  --primary: #5eead4;
  --primary-strong: #2dd4bf;
  --danger: #fb7185;
  --warning: #fbbf24;
  --success: #22c55e;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --max-width: 720px;
  --header-height: 64px;
  --bottom-nav-height: 72px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  overflow-y: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
}

.app-shell {
  min-height: 100vh;
}

.page {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 16px 140px;
}

@media (min-width: 768px) {
  .page {
    padding: 24px 24px 160px;
  }
}

.leaderboard-list {
  display: grid !important;
  gap: 12px !important;
}

.leaderboard-row {
  display: grid !important;
  grid-template-columns: 44px 1fr auto !important;
  gap: 12px !important;
  align-items: center !important;
  border: 1px solid var(--border) !important;
  border-radius: 16px !important;
  padding: 14px !important;
  background: rgba(255, 255, 255, 0.03) !important;
}

.leaderboard-rank {
  width: 44px !important;
  height: 44px !important;
  border-radius: 999px !important;
  display: grid !important;
  place-items: center !important;
  font-weight: 800 !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

.leaderboard-name {
  font-weight: 800 !important;
}

.leaderboard-meta {
  margin-top: 4px !important;
  font-size: 0.88rem !important;
  color: var(--muted) !important;
}

.leaderboard-points {
  text-align: right !important;
}

.leaderboard-points-value {
  font-size: 1.2rem !important;
  font-weight: 800 !important;
}

.leaderboard-points-label {
  font-size: 0.8rem !important;
  color: var(--muted) !important;
}

.missing-prediction-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  background: rgba(251, 191, 36, 0.12);
  color: #fde68a;
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.page > .card:first-child {
  margin-top: 8px;
}

.home-next-fixture-countdown {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-top: 4px;
}

.button-small {
  padding: 4px 8px;
  font-size: 0.85rem;
  margin-left: 8px;
}

.fixture-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.fixture-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fixture-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.fixture-team-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fixture-team-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.fixture-team-name {
  line-height: 1.2;
}

.fixture-score {
  min-width: 24px;
  text-align: right;
  font-weight: 700;
}

.fixture-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pick-distribution {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
}

.pick-distribution-label {
  flex-shrink: 0;
}

.pick-distribution-value {
  min-width: 0;
}

.prediction-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.score-input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}

.score-input-grid .field {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.score-input-grid .label {
  min-height: 20px;
  display: block;
}

.score-input-grid .input {
  width: 100%;
  height: 54px;
  box-sizing: border-box;
}

..pressure-play-row {
  padding: 10px 12px;
  border-radius: 14px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-row input[type="checkbox"] {
  flex-shrink: 0;
}

.pressure-play-row .helper-text {
  margin-top: 6px;
  line-height: 1.35;
}

.inline-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.inline-actions .button {
  min-width: 140px;
}

.prediction-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
}

.prediction-summary-title {
  margin-bottom: 2px;
}

.prediction-scoreline {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}

.prediction-scoreline .team:first-child {
  text-align: left;
}

.prediction-scoreline .team:last-child {
  text-align: right;
}

.prediction-scoreline .score {
  font-weight: 700;
  white-space: nowrap;
}

.fixture-action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 520px) {
  .score-input-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .inline-actions .button,
  .fixture-action-row .button {
    width: 100%;
  }

  .prediction-scoreline {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .prediction-scoreline .team:last-child {
    text-align: left;
  }
}