/* ============================================================
   Milan Fantasy League — Main Stylesheet
   Theme: AC Milan Dark Mode (Red / Black / White)
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --red:          #CC0000;
  --red-dark:     #990000;
  --red-light:    #FF3333;
  --red-glow:     rgba(204, 0, 0, 0.25);
  --bg:           #0a0a0a;
  --surface:      #111111;
  --card:         #1a1a1a;
  --card-hover:   #222222;
  --border:       #2a2a2a;
  --border-light: #333333;
  --text:         #f0f0f0;
  --text-muted:   #888888;
  --text-dim:     #555555;
  --white:        #ffffff;
  --success:      #22c55e;
  --warning:      #f59e0b;
  --danger:       #ef4444;
  --gold:         #f59e0b;
  --ucl-blue:     #0066cc;

  --radius:       10px;
  --radius-lg:    16px;
  --radius-sm:    6px;
  --shadow:       0 4px 24px rgba(0,0,0,0.4);
  --shadow-card:  0 2px 12px rgba(0,0,0,0.3);
  --transition:   0.2s ease;

  --nav-h:        64px;
  --font:         'Inter', system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--red); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--red-light); }

img { max-width: 100%; display: block; }

/* ── Typography ─────────────────────────────────────────────── */
h1 { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 1.2rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 600; }
h4 { font-size: 0.9rem; font-weight: 600; }

.text-muted    { color: var(--text-muted) !important; }
.text-dim      { color: var(--text-dim) !important; }
.text-success  { color: var(--success) !important; }
.text-danger   { color: var(--danger) !important; }
.text-warning  { color: var(--warning) !important; }
.text-primary  { color: var(--red) !important; }
.text-right    { text-align: right; }
.text-center   { text-align: center; }
.font-bold     { font-weight: 700; }
.small         { font-size: 0.82rem; }

/* ── Layout ─────────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.main-content {
  flex: 1;
  padding-top: calc(var(--nav-h) + 2rem);
  padding-bottom: 3rem;
}

.mt-4 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1.5rem; }

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(17, 17, 17, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 1.5rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--white);
  text-decoration: none;
  flex-shrink: 0;
}

.brand-icon {
  color: var(--red);
  font-size: 1.4rem;
}

.brand-accent { color: var(--red); }

.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
  padding: 4px;
}

.navbar-toggle span {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin-left: auto;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.nav-link:hover,
.nav-item.active .nav-link {
  color: var(--white);
  background: var(--card);
}

.nav-item.active .nav-link {
  color: var(--red);
}

.nav-link-admin {
  color: var(--warning) !important;
}

.nav-caret { font-size: 0.7rem; transition: transform var(--transition); }

/* Dropdown */
.nav-dropdown { position: relative; }

.nav-user-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.nav-user-btn:hover { color: var(--white); background: var(--card); }

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  list-style: none;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition);
  z-index: 100;
}

.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown.open .nav-caret {
  transform: rotate(180deg);
}

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  color: var(--text);
  font-size: 0.9rem;
  transition: background var(--transition);
}

.nav-dropdown-menu a:hover { background: var(--card-hover); }
.nav-dropdown-menu a.text-danger { color: var(--danger) !important; }
.dropdown-divider { height: 1px; background: var(--border); }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.btn-primary:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--red-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border-light);
}
.btn-outline:hover {
  border-color: var(--red);
  color: var(--red);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}
.btn-ghost:hover { color: var(--text); background: var(--card); }

.btn-warning {
  background: var(--warning);
  color: #000;
  border-color: var(--warning);
}
.btn-warning:hover { filter: brightness(0.9); color: #000; }

.btn-danger {
  background: var(--danger);
  color: var(--white);
  border-color: var(--danger);
}
.btn-danger:hover { filter: brightness(0.85); color: var(--white); }

.btn-success {
  background: var(--success);
  color: #000;
  border-color: var(--success);
}

.btn-secondary {
  background: var(--card);
  color: var(--text);
  border-color: var(--border);
}

.btn-full { width: 100%; justify-content: center; }
.btn-sm   { padding: 0.35rem 0.8rem; font-size: 0.82rem; }
.btn-xs   { padding: 0.2rem 0.5rem; font-size: 0.78rem; }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

.card-header h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-body { padding: 1.25rem; }

/* ── Forms ───────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  padding: 0.6rem 0.9rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-glow);
}

select option { background: var(--card); }

input::placeholder { color: var(--text-dim); }

.input-icon-right {
  position: relative;
}

.input-icon-right input { padding-right: 2.5rem; }

.toggle-password {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  transition: color var(--transition);
}

.toggle-password:hover { color: var(--text); }

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: normal !important;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* ── Alerts ──────────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  border-left: 4px solid;
}

.alert-error   { background: rgba(239,68,68,0.12); border-color: var(--danger); color: #fca5a5; }
.alert-success { background: rgba(34,197,94,0.12); border-color: var(--success); color: #86efac; }
.alert-info    { background: rgba(59,130,246,0.12); border-color: #3b82f6; color: #93c5fd; }
.alert-warning { background: rgba(245,158,11,0.12); border-color: var(--warning); color: #fcd34d; }

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.55rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-serie      { background: rgba(204,0,0,0.2);   color: var(--red-light); }
.badge-ucl        { background: rgba(0,102,204,0.2); color: #60a5fa; }
.badge-home       { background: rgba(34,197,94,0.15); color: var(--success); }
.badge-away       { background: rgba(245,158,11,0.15); color: var(--warning); }
.badge-success    { background: rgba(34,197,94,0.15); color: var(--success); }
.badge-round      { background: var(--surface); color: var(--text-muted); }
.badge-gold       { background: rgba(245,158,11,0.2); color: var(--gold); }
.badge-joker      { background: rgba(168,85,247,0.2); color: #c084fc; }
.badge-you        { background: rgba(204,0,0,0.2); color: var(--red-light); }
.badge-locked     { background: rgba(239,68,68,0.15); color: var(--danger); }
.badge-admin      { background: rgba(245,158,11,0.2); color: var(--warning); }
.badge-user       { background: var(--surface); color: var(--text-muted); }

.badge-status-upcoming { background: rgba(59,130,246,0.15); color: #93c5fd; }
.badge-status-live     { background: rgba(34,197,94,0.2); color: var(--success); animation: pulse 1.5s infinite; }
.badge-status-finished { background: var(--surface); color: var(--text-muted); }

.badge-pos-goalkeeper  { background: rgba(59,130,246,0.15); color: #93c5fd; }
.badge-pos-defender    { background: rgba(34,197,94,0.15); color: #86efac; }
.badge-pos-midfielder  { background: rgba(245,158,11,0.15); color: #fcd34d; }
.badge-pos-forward     { background: rgba(204,0,0,0.15); color: var(--red-light); }

/* ── Tables ──────────────────────────────────────────────────── */
.table-responsive { overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table th {
  padding: 0.65rem 0.75rem;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}

.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(255,255,255,0.02); }
.table-sm td, .table-sm th { padding: 0.5rem 0.65rem; }

.row-highlight td { background: rgba(204,0,0,0.06) !important; }
.row-inactive td  { opacity: 0.5; }

/* ── Stats grid ─────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.4rem;
  transition: border-color var(--transition);
}

.stat-card:hover { border-color: var(--red); }

.stat-icon {
  font-size: 1.4rem;
  color: var(--red);
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* ── Page header ─────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* ── Dashboard grid ──────────────────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* ── Match list ──────────────────────────────────────────────── */
.match-list { display: flex; flex-direction: column; gap: 0.75rem; }

.match-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
  flex-wrap: wrap;
}

.match-item:hover { border-color: var(--border-light); }

.match-teams {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  min-width: 200px;
}

.team-milan { color: var(--red); font-weight: 700; }
.match-vs { color: var(--text-muted); font-size: 0.8rem; }
.match-date { font-size: 0.82rem; color: var(--text-muted); white-space: nowrap; }
.match-action { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }

/* ── Results list ────────────────────────────────────────────── */
.results-list { display: flex; flex-direction: column; gap: 0.75rem; }

.result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex-wrap: wrap;
}

.result-teams {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 200px;
}

.result-score {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--red);
  padding: 0.1rem 0.4rem;
  background: rgba(204,0,0,0.1);
  border-radius: 4px;
}

.result-pts { display: flex; align-items: center; gap: 0.4rem; margin-left: auto; }

.pts-badge {
  background: rgba(34,197,94,0.15);
  color: var(--success);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
}

/* ── Rank icons ──────────────────────────────────────────────── */
.rank-icon { font-size: 1rem; }
.rank-1 { color: #f59e0b; }
.rank-2 { color: #94a3b8; }
.rank-3 { color: #b87333; }
.rank-num { color: var(--text-muted); font-size: 0.9rem; font-weight: 600; }

/* ── Leaderboard ─────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tab-btn {
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tab-btn:hover, .tab-btn.active {
  border-color: var(--red);
  color: var(--red);
  background: rgba(204,0,0,0.08);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.round-selector select {
  width: auto;
  padding: 0.4rem 0.75rem;
}

/* ── Predictions page ────────────────────────────────────────── */
.joker-status-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
}

.joker-period { font-weight: 600; }
.joker-available { color: var(--success); }
.joker-used      { color: var(--text-muted); text-decoration: line-through; }
.joker-sep       { color: var(--border); }
.joker-hint      { color: var(--text-muted); margin-left: auto; font-style: italic; }

.prediction-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.5rem;
  transition: border-color var(--transition);
}

.prediction-card:hover,
.prediction-card-active {
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red-glow);
}

.pred-match-header {
  background: linear-gradient(135deg, rgba(204,0,0,0.15) 0%, rgba(0,0,0,0) 60%);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.pred-match-info { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.pred-teams {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 1.25rem;
  font-weight: 800;
}

.pred-vs {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 400;
}

.team-milan { color: var(--red); }
.pred-match-date { font-size: 0.85rem; color: var(--text-muted); }
.pred-saved-badge { color: var(--success); font-size: 0.85rem; font-weight: 600; }

.pred-form { padding: 1.25rem; }

.pred-fields {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.pred-field { display: flex; flex-direction: column; gap: 0.4rem; }

.pred-field > label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pred-field-icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

.goal-icon   { background: rgba(204,0,0,0.2); color: var(--red); }
.assist-icon { background: rgba(245,158,11,0.2); color: var(--warning); }
.score-icon  { background: rgba(34,197,94,0.2); color: var(--success); }
.mvp-icon    { background: rgba(245,158,11,0.2); color: var(--gold); }

.pred-select {
  width: 100%;
  padding: 0.6rem 0.9rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.88rem;
  cursor: pointer;
}

.pred-select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-glow);
  outline: none;
}

.pred-field-hint { font-size: 0.75rem; color: var(--text-dim); }

/* Multiple goals/assists toggle */
.multiple-toggle {
  display: flex;
  align-items: center;
  gap: 0;
  cursor: pointer;
  margin-top: 0.4rem;
  font-weight: normal !important;
  color: var(--text) !important;
}

.multiple-toggle input[type="checkbox"] {
  display: none;
}

.multiple-toggle-inner {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border: 1.5px dashed var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: all var(--transition);
  width: 100%;
  cursor: pointer;
}

.multiple-toggle-inner i {
  font-size: 0.78rem;
  color: var(--text-dim);
  transition: color var(--transition);
}

.multiple-bonus {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
  transition: color var(--transition);
}

.multiple-toggle input:checked + .multiple-toggle-inner {
  border-color: var(--warning);
  background: rgba(245, 158, 11, 0.08);
  color: var(--warning);
}

.multiple-toggle input:checked + .multiple-toggle-inner i {
  color: var(--warning);
}

.multiple-toggle input:checked + .multiple-toggle-inner .multiple-bonus {
  color: var(--warning);
}

/* Score picker */
.score-picker {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.score-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  flex: 1;
}

.score-team span {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

.score-select {
  width: 64px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 800;
  padding: 0.4rem 0.5rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
}

.score-select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-glow);
  outline: none;
}

.score-colon {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Joker checkbox */
.pred-joker {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: rgba(168,85,247,0.06);
  border: 1px dashed rgba(168,85,247,0.3);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.pred-joker:hover:not(.joker-disabled) {
  border-color: rgba(168,85,247,0.6);
  background: rgba(168,85,247,0.1);
}

.joker-disabled { opacity: 0.5; cursor: not-allowed; }

.joker-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-weight: normal;
  color: var(--text) !important;
}

.joker-icon { font-size: 1.2rem; color: #c084fc; }

.joker-checkbox {
  width: 18px !important;
  height: 18px !important;
  accent-color: #9333ea;
  cursor: pointer;
}

.pred-submit {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.pred-submit-btn { min-width: 180px; justify-content: center; }
.pred-status { font-size: 0.88rem; }
.pred-status.success { color: var(--success); }
.pred-status.error   { color: var(--danger); }

/* ── Profile ─────────────────────────────────────────────────── */
.profile-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.profile-avatar {
  font-size: 4rem;
  color: var(--red);
  margin-bottom: 0.5rem;
}

.profile-username { font-size: 1.2rem; font-weight: 800; }

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
}

.pstat {
  padding: 0.75rem 0.5rem;
  text-align: center;
  border-right: 1px solid var(--border);
}

.pstat:nth-child(3n) { border-right: none; }
.pstat:nth-child(n+4) { border-top: 1px solid var(--border); }

.pstat-val { font-size: 1.2rem; font-weight: 800; color: var(--red); }
.pstat-lbl { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

.joker-info-block {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
}

.joker-info-block h4 {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}

.joker-row {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
  font-size: 0.88rem;
}

/* ── Auth pages ──────────────────────────────────────────────── */
.auth-page {
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.auth-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 1rem;
  min-height: 100vh;
}

.auth-card {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.auth-card-wide { max-width: 640px; }

.auth-logo {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px; height: 64px;
  background: rgba(204,0,0,0.1);
  border: 2px solid var(--red);
  border-radius: 50%;
  font-size: 1.8rem;
  color: var(--red);
  margin-bottom: 0.75rem;
}

.auth-logo h1 { font-size: 1.5rem; }
.auth-logo p  { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.25rem; }

.auth-form { display: flex; flex-direction: column; gap: 0; }

.auth-footer {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Decorative circles */
.auth-decor { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }

.auth-decor-circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.06;
}

.auth-decor-circle.c1 {
  width: 500px; height: 500px;
  background: var(--red);
  top: -200px; right: -100px;
}

.auth-decor-circle.c2 {
  width: 300px; height: 300px;
  background: var(--red);
  bottom: -100px; left: -50px;
}

.auth-decor-circle.c3 {
  width: 200px; height: 200px;
  background: white;
  top: 40%; left: 40%;
}

/* Password strength */
.password-strength { margin-top: -0.5rem; margin-bottom: 0.5rem; }

.strength-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.strength-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s, background 0.3s;
}

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2rem 0 1rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.footer-brand { max-width: 260px; }

.footer-logo {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.footer-logo i { color: var(--red); }

.footer-brand p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--text); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ── Toast notifications ─────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  padding: 0.75rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow);
  pointer-events: all;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: slideUp 0.3s ease;
  max-width: 320px;
}

.toast-success { background: var(--card); border-left: 3px solid var(--success); }
.toast-error   { background: var(--card); border-left: 3px solid var(--danger); }
.toast-info    { background: var(--card); border-left: 3px solid #3b82f6; }

.toast i.success { color: var(--success); }
.toast i.error   { color: var(--danger); }

/* ── Loading overlay ─────────────────────────────────────────── */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-overlay.hidden { display: none; }

.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ── Filter bar ──────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.filter-btn {
  padding: 0.35rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--red);
  color: var(--red);
  background: rgba(204,0,0,0.08);
}

/* ── Empty state ─────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
}

.empty-state i { font-size: 2.5rem; margin-bottom: 0.75rem; display: block; }
.empty-state h3 { font-size: 1.1rem; color: var(--text); margin-bottom: 0.4rem; }
.empty-state.large { padding: 4rem 1rem; }
.empty-state.large i { font-size: 3.5rem; }

/* ── Animations ──────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.5; } }
@keyframes slideUp {
  from { opacity:0; transform: translateY(16px); }
  to   { opacity:1; transform: translateY(0); }
}

/* ── Modal ───────────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
}

.modal-box {
  position: relative;
  z-index: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.25rem;
  transition: color var(--transition);
}

.modal-close:hover { color: var(--text); }

/* ── Hidden ──────────────────────────────────────────────────── */
.hidden { display: none !important; }
.hidden-mobile { /* hidden on mobile, visible on desktop */ }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .stats-grid    { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .profile-grid  { grid-template-columns: 1fr; }
  .pred-fields   { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .stats-grid  { grid-template-columns: repeat(2, 1fr); }
  .form-row    { grid-template-columns: 1fr; }
  .hidden-mobile { display: none !important; }

  .navbar-toggle { display: flex; }

  .navbar-nav {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--surface);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    gap: 0.25rem;
  }

  .navbar-nav.open { display: flex; }

  .nav-link { justify-content: flex-start; padding: 0.6rem 1rem; }

  .nav-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: var(--card);
    border-radius: var(--radius-sm);
    margin-top: 0.25rem;
    display: none;
  }

  .nav-dropdown.open .nav-dropdown-menu { display: block; }

  .match-item   { flex-wrap: wrap; }
  .match-action { margin-left: 0; width: 100%; justify-content: flex-end; }

  .pred-teams { font-size: 1rem; }

  .joker-hint { display: none; }
}
