:root {
  --bg: #0a1628;
  --surface: #12233d;
  --surface-light: #1a3050;
  --border: #2a4060;
  --text: #e0e8f0;
  --text-muted: #8090a8;
  --accent: #4caf50;
  --accent-dim: #2e7d32;
  --gold: #ffd700;
  --danger: #ef5350;
  --info: #42a5f5;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.container { max-width: 1400px; margin: 0 auto; padding: 1rem; }
.container-narrow { max-width: 600px; margin: 0 auto; padding: 2rem; }

h1 { font-size: 1.8rem; margin-bottom: 1rem; }
h2 { font-size: 1.3rem; margin-bottom: 0.75rem; color: var(--accent); }
h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }

a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  font-weight: 600;
  transition: opacity 0.2s;
}
.btn:hover { opacity: 0.85; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-info { background: var(--info); color: #fff; }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.85rem; }

input, select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-light);
  color: var(--text);
  font-size: 0.95rem;
  width: 100%;
}

label { display: block; margin-bottom: 0.3rem; color: var(--text-muted); font-size: 0.85rem; }
.form-group { margin-bottom: 1rem; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.5rem 0.75rem; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
td { font-size: 0.9rem; }
tr:hover { background: var(--surface-light); }

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-green { background: var(--accent-dim); color: var(--accent); }
.badge-gold { background: #5c4d00; color: var(--gold); }
.badge-red { background: #5c1a1a; color: var(--danger); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }

/* Commissioner layout */
.draft-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1rem;
  height: calc(100vh - 5rem);
}

.draft-main { overflow-y: auto; }
.draft-sidebar { overflow-y: auto; }

/* Timer */
.timer {
  font-size: 4rem;
  font-weight: 700;
  text-align: center;
  padding: 1rem;
  font-variant-numeric: tabular-nums;
}
.timer.warning { color: var(--gold); }
.timer.danger { color: var(--danger); animation: pulse 0.5s infinite alternate; }
@keyframes pulse { from { opacity: 1; } to { opacity: 0.5; } }

/* Auction block */
.auction-block {
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}
.auction-team-name { font-size: 1.6rem; font-weight: 700; }
.auction-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0.75rem; margin-top: 1rem; }
.stat-box { text-align: center; }
.stat-value { font-size: 1.3rem; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; }

.impact-warning { border-left: 3px solid var(--danger); background: var(--surface-light); padding: 0.5rem 0.75rem; border-radius: 0 6px 6px 0; font-size: 0.8rem; margin-top: 0.75rem; }

/* Tiered notes (e.g. bye-week optimization) — same shape as .impact-warning, color set by tier */
.impact-note { background: var(--surface-light); padding: 0.5rem 0.75rem; border-radius: 0 6px 6px 0; font-size: 0.8rem; margin-top: 0.75rem; border-left: 3px solid var(--border); }
.impact-note.tier-green { border-left-color: var(--accent); }
.impact-note.tier-gold { border-left-color: var(--gold); }
.impact-note.tier-red { border-left-color: var(--danger); }

/* Team grid for nomination */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.5rem; }
.team-btn {
  padding: 0.5rem;
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  font-size: 0.8rem;
  text-align: center;
  transition: border-color 0.2s;
}
.team-btn:hover { border-color: var(--accent); }
.team-btn .abbr { font-weight: 700; font-size: 1rem; }
.team-btn .proj { color: var(--text-muted); font-size: 0.7rem; }

/* Team logos */
.team-logo { height: 28px; width: 28px; object-fit: contain; vertical-align: middle; }
.team-logo-sm { height: 20px; width: 20px; object-fit: contain; vertical-align: middle; }
.team-logo-lg { height: 48px; width: 48px; object-fit: contain; vertical-align: middle; }
.team-logo-xl { height: 72px; width: 72px; object-fit: contain; }
.team-btn .team-logo { height: 36px; width: 36px; margin-bottom: 0.25rem; }

/* Bidder cards */
.bidder-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
}
.bidder-card.active { border-color: var(--gold); }
.bidder-name { font-weight: 700; font-size: 0.95rem; }
.bidder-budget { color: var(--accent); font-weight: 700; }
.bidder-teams { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }

/* Cheatsheet mobile */
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .draft-layout { grid-template-columns: 1fr; height: auto; }
  .container { padding: 0.5rem; }
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 1rem; }
.mb-1 { margin-bottom: 1rem; }
.money { color: var(--accent); }
.highlight { color: var(--gold); }

/* Status indicator */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.3rem;
}
.status-dot.live { background: var(--accent); animation: pulse 1s infinite alternate; }
.status-dot.stale { background: var(--gold); }
