.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(11, 16, 32, 0.92);
  border-bottom: 1px solid rgba(37, 48, 74, 0.9);
}

.topbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: var(--header-height);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--muted);
}

.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid rgba(255,255,255,0.06); /* lighter */
  border-radius: var(--radius-lg);
  box-shadow: 0 6px 18px rgba(0,0,0,0.25); /* softer */
  padding: 16px;
}

.card + .card {
  margin-top: 20px; /* was 16px */
}

.section-title {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.section-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.button {
  appearance: none;
  border: 0;
  border-radius: 12px;
  min-height: 44px;
  padding: 0 16px;
  font-weight: 700;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.button:active {
  transform: scale(0.98);
}

.button-primary {
  background: var(--primary);
  color: #08111f;
}

.button-primary:hover {
  opacity: 0.95;
}

.nav-link.active {
  background: rgba(255,255,255,0.08);
}

.button-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.button-danger {
  background: var(--danger);
  color: #fff;
}

.button-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.input,
.select {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 12px 14px;
}

.label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.92rem;
  font-weight: 700;
}

.field + .field {
  margin-top: 14px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inline-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(18, 24, 38, 0.96);
  backdrop-filter: blur(16px);
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: var(--bottom-nav-height);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 8px 12px 12px;
}

.nav-link {
  display: grid;
  place-items: center;
  color: var(--muted);
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 700;
}

.nav-link.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.form-row {
  display: grid;
  gap: 10px;
}

.notice {
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.notice.success {
  border-color: rgba(34, 197, 94, 0.35);
  color: #bbf7d0;
}

.notice.error {
  border-color: rgba(251, 113, 133, 0.35);
  color: #fecdd3;
}

.list {
  display: grid;
  gap: 12px;
}

.list-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.list-item-title {
  font-weight: 800;
  margin-bottom: 6px;
}

.list-item-meta {
  font-size: 0.9rem;
  color: var(--muted);
  word-break: break-word;
}

.league-switcher {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fixture-list {
  display: grid;
  gap: 14px;
}

.fixture-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.fixture-card {
  padding: 14px;
}

.fixture-card.finished {
  opacity: 0.7;
  filter: saturate(0.6);
}

.fixture-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.fixture-kickoff {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.35;
}

.fixture-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  border: 1px solid var(--border);
}

.fixture-status.open {
  color: #99f6e4;
  border-color: rgba(94, 234, 212, 0.35);
  background: rgba(94, 234, 212, 0.08);
}

.fixture-status.locked {
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.35);
}

.fixture-status.finished {
  color: #c7d2e3;
  background: rgba(255, 255, 255, 0.05);
}

.fixture-matchup {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.fixture-team-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.fixture-team-name {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.2;
}

.fixture-score {
  min-width: 28px;
  text-align: right;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}

.fixture-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.fixture-team-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fixture-team-row + .fixture-team-row {
  margin-top: 6px;
}

.fixture-flag {
  width: 24px;
  height: 18px;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  flex-shrink: 0;
}

.fixture-flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fixture-meta .status-pill,
.fixture-meta .missing-prediction-pill {
  flex: 0 0 auto;
}

.fixture-meta .status-pill {
  opacity: 0.75;
  font-size: 0.75rem;
}

.missing-prediction-pill {
  font-weight: 900;
}

.fixture-action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.fixture-card.finished .status-pill {
  opacity: 0.6;
}

.fixture-card.finished .fixture-team-name {
  opacity: 0.85;
}

.fixture-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 14px 0;
}

.pressure-play-row {
  border: 1px dashed rgba(251, 113, 133, 0.3);
  padding: 10px 12px;
  border-radius: 12px;
  margin-top: 12px;
}

.card:has(.home-manage-grid) {
  opacity: 0.9;
}

.card {
  backdrop-filter: blur(6px);
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 20px 0;
}

.prediction-summary {
  background: rgba(94, 234, 212, 0.08);
  border: 1px solid rgba(94, 234, 212, 0.3);
  border-radius: 14px;
  padding: 10px;
  margin-bottom: 12px;
}

.prediction-summary-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #99f6e4;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.prediction-scoreline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  gap: 12px;
  margin-top: 6px;
}

.prediction-scoreline .team {
  flex: 1;
  font-size: 1rem;
}

.prediction-scoreline .score {
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.prediction-meta {
  margin-top: 6px;
  font-size: 0.88rem;
  color: var(--muted);
}

.prediction-form {
  margin-top: 8px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.score-input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  color: var(--text);
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.helper-text {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
}

.pressure-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  background: rgba(251, 113, 133, 0.15);
  color: #fb7185;
  border: 1px solid rgba(251, 113, 133, 0.35);
}

.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.18);
  color: #fde68a;
  border: 1px solid rgba(251, 191, 36, 0.45);
}

.fixture-card .button {
  min-width: 148px;
}

.leaderboard-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.leaderboard-summary-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.leaderboard-summary-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.leaderboard-summary-value {
  margin-top: 8px;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
}

.leaderboard-list {
  display: grid;
  gap: 12px;
}

.leaderboard-row {
  appearance: none;
  width: 100%;
  text-align: left;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 12px; /* was 14px */
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
}

.leaderboard-row-current {
  border: 1px solid rgba(94, 234, 212, 0.6);
  background: linear-gradient(
    180deg,
    rgba(94, 234, 212, 0.18),
    rgba(94, 234, 212, 0.06)
  );
  box-shadow: 
    0 0 0 1px rgba(94, 234, 212, 0.15),
    0 8px 20px rgba(0, 0, 0, 0.25);
}

.leaderboard-row-current .leaderboard-rank {
  border-color: rgba(94, 234, 212, 0.7);
  background: rgba(94, 234, 212, 0.18);
  color: #99f6e4;
  font-weight: 900;
}

.leaderboard-row-current .leaderboard-name {
  color: #5eead4;
  font-weight: 900;
}

.leaderboard-row-current {
  position: relative;
}

.leaderboard-row-current::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10%;
  bottom: 10%;
  width: 4px;
  border-radius: 4px;
  background: #5eead4;
}

.leaderboard-rank {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 800;
  border: 1px solid var(--border);
  color: var(--text);
}

.leaderboard-main {
  min-width: 0;
}

.leaderboard-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.leaderboard-name {
  font-weight: 800;
}

.leaderboard-meta {
  margin-top: 2px;
  font-size: 0.88rem;
  color: var(--muted);
}

.leaderboard-form {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.leaderboard-form-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.leaderboard-form-dot-neutral {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.leaderboard-form-dot-hit {
  background: rgba(34, 197, 94, 0.95);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.2);
}

.leaderboard-form-dot-miss {
  background: rgba(251, 113, 133, 0.95);
  box-shadow: 0 0 0 1px rgba(251, 113, 133, 0.2);
}

.leaderboard-form-wrap {
  margin-top: 10px;
}

.leaderboard-form-label {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.leaderboard-points {
  text-align: right;
}

.leaderboard-points-value {
  font-size: 1.2rem;
  font-weight: 800;
}

.leaderboard-points-label {
  font-size: 0.8rem;
  color: var(--muted);
}

@media (max-width: 640px) {
  .leaderboard-summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .prediction-scoreline {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .prediction-scoreline .score {
    font-size: 1.2rem;
  }

  .score-input-grid {
    grid-template-columns: 1fr;
  }

  .fixture-card .button {
    width: 100%;
  }
}

.pick-distribution {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}

.pick-distribution-label {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.5);
}

.pick-distribution-value {
  font-size: 0.9rem;
  color: var(--text);
}

.home-hero {
  display: grid;
  gap: 16px;
}

.home-hero .button {
  margin-top: 16px;
  align-self: center;
}

.home-next-fixture {
  border: 1px solid rgba(94, 234, 212, 0.25);
  background: rgba(94, 234, 212, 0.05);
}

.home-stat-card {
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.home-stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.12);
}

.home-hero-title {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.home-hero-subtitle {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.home-hero .button {
  margin-top: 12px;
}

.home-next-fixture {
  border: 1px solid rgba(94, 234, 212, 0.2);
  border-radius: 14px;
  padding: 14px;
  background: rgba(94, 234, 212, 0.04);
}

.home-next-fixture-title {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.home-next-fixture-match {
  margin-top: 8px;
  font-size: 1rem;
  font-weight: 800;
}

.home-next-fixture-time {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.home-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 12px;
}

.home-stat-card {
  min-height: 96px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  transition: transform 0.15s ease;
  min-width: 0;
  align-items: center;
  text-align: center;
}

.home-stat-card:hover {
  transform: translateY(-2px);
}

.home-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}

.home-stat-label {
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.35;
}

.home-manage-grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 760px) {
  .home-hero {
    grid-template-columns: 1.3fr 1fr;
    align-items: start;
  }

  .home-stats-grid {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
  }

  .home-manage-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}

.player-history-list {
  display: grid;
  gap: 12px;
}

.player-history-row {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.player-history-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.player-history-kickoff {
  font-size: 0.85rem;
  color: var(--muted);
}

.player-history-points {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text);
}

.player-history-match {
  display: grid;
  gap: 6px;
}

.player-history-teams {
  font-weight: 800;
}

.player-history-actual,
.player-history-prediction {
  font-size: 0.9rem;
  color: var(--muted);
}

.player-history-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.movers-subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.movers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.movers-column {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.movers-column-title {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 10px;
}

.movers-list {
  display: grid;
  gap: 10px;
}

.mover-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mover-name {
  font-weight: 700;
}

.mover-change {
  font-size: 0.95rem;
  font-weight: 800;
  min-width: 36px;
  text-align: right;
}

.mover-up {
  color: #22c55e;
}

.mover-down {
  color: #fb7185;
}

@media (max-width: 640px) {
  .movers-grid {
    grid-template-columns: 1fr;
  }
}

.movers-section-title {
  margin-top: 14px;
  margin-bottom: 10px;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.movers-section-title + .movers-grid {
  margin-bottom: 0;
}

.movers-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.movers-filter {
  min-width: 140px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .movers-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .movers-filter {
    min-width: 0;
  }
}

.select {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.select option {
  background: #0f172a;
  color: #e5e7eb;
}

.checkbox-row {
  align-items: center;
  gap: 12px;
}

.field input[type="time"] {
  background: rgba(255,255,255,0.05);
}

#reminder-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.button {
  appearance: none;
  border: 0;
  border-radius: 12px;
  min-height: 44px;
  padding: 0 16px;
  font-weight: 700;
  transition: transform 0.15s ease, opacity 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

  a.button {
  text-decoration: none;
}

@media (max-width: 640px) {
  .home-hero {
    grid-template-columns: 1fr; /* force stack */
  }

  .home-next-fixture {
    margin-top: 12px;
  }
}

@media (max-width: 640px) {
  .card {
    padding: 14px;
  }
}

@media (max-width: 640px) {
  .home-stats-grid {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 4px;
  }

  .home-stat-card {
    min-width: 110px;
    flex-shrink: 0;
  }
}

@media (max-width: 640px) {
  .movers-toolbar {
    flex-direction: column;
    gap: 10px;
  }

  .movers-filter {
    width: 100%;
  }
}

.home-next-fixture-countdown {
  margin-top: 4px;
  font-size: 0.9rem;
  opacity: 0.8;
}

.leaderboard-rank-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 40px;
}

.leaderboard-rank-change {
  font-size: 0.8rem;
  margin-top: 4px;
}

.leaderboard-rank-change-up {
  opacity: 1;
}

.leaderboard-rank-change-down {
  opacity: 1;
}

.leaderboard-rank-change-neutral {
  opacity: 0.6;
}