/* ============================================
   March Madness 2026 — Dashboard Styles
   Theme: Dark navy + orange/gold accents
   ============================================ */

:root {
  --bg: #0a0e1a;
  --bg-card: #111827;
  --bg-card-hover: #1a2235;
  --border: #1e293b;
  --text: #e2e8f0;
  --text-dim: #94a3b8;
  --text-bright: #ffffff;
  --accent: #f97316;
  --accent-glow: rgba(249, 115, 22, 0.2);
  --accent2: #fbbf24;
  --green: #22c55e;
  --red: #ef4444;
  --blue: #3b82f6;
  --purple: #a855f7;
  --radius: 12px;
  --radius-sm: 8px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Hero */
.hero {
  position: relative;
  padding: 4rem 0 3rem;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(249,115,22,0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 50%, rgba(59,130,246,0.08) 0%, transparent 50%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  padding: 0.3rem 1rem;
  background: rgba(249,115,22,0.15);
  border: 1px solid rgba(249,115,22,0.3);
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.hero-sub {
  font-size: 1.2rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
  font-weight: 500;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-bright);
}

.stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0.8rem 0;
}

.nav .container {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-link {
  padding: 0.5rem 1.2rem;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 100px;
  white-space: nowrap;
  transition: all 0.2s;
}

.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-link.active { color: var(--bg); background: var(--accent); }

/* Sections */
.section { padding: 3rem 0; }
.section.hidden { display: none; }

.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-sub {
  color: var(--text-dim);
  margin-top: 0.3rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

/* Champion Card */
.champion-card {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(249,115,22,0.08) 100%);
  border: 1px solid rgba(249,115,22,0.2);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.champion-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(249,115,22,0.05) 0%, transparent 50%);
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.champion-crown { font-size: 3rem; margin-bottom: 0.5rem; position: relative; }
.champion-label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  font-weight: 700;
  position: relative;
}

.champion-name {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  color: var(--text-bright);
  margin-top: 0.5rem;
  position: relative;
}

.champion-seed {
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 700;
  position: relative;
}

.champion-prob {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-top: 0.3rem;
  position: relative;
}

.champion-path {
  margin-top: 2rem;
  position: relative;
}

.path-label {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.path-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.path-step {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.path-team {
  padding: 0.3rem 0.8rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

.path-team.winner { border-color: var(--accent); color: var(--accent); }
.path-arrow { color: var(--text-dim); font-size: 0.8rem; }

/* Final Four Grid */
.final-four-grid {
  margin-top: 2rem;
}

.ff-header {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
}

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

.ff-team-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: all 0.2s;
}

.ff-team-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.ff-region {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.ff-team {
  font-size: 1.1rem;
  font-weight: 800;
  margin-top: 0.3rem;
}

.ff-seed-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: rgba(249,115,22,0.15);
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: 0.5rem;
}

/* Why Section */
.why-section {
  margin-top: 3rem;
}

.why-section h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.why-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.why-label {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.why-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-bright);
  margin-top: 0.2rem;
}

.why-desc {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

/* Bracket Region */
.bracket-regions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .bracket-regions { grid-template-columns: 1fr; }
  .ff-teams { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { gap: 1.5rem; }
}

.region-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

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

.region-name {
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.region-winner {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
}

.round-group {
  padding: 0.8rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.round-label {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.game-row {
  display: flex;
  align-items: center;
  padding: 0.3rem 0;
  font-size: 0.8rem;
  gap: 0.5rem;
}

.game-seeds {
  color: var(--text-dim);
  font-size: 0.7rem;
  min-width: 55px;
  font-weight: 500;
}

.game-pick {
  font-weight: 700;
  flex: 1;
}

.game-pick.upset { color: var(--accent2); }

.game-prob {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-weight: 600;
  min-width: 35px;
  text-align: right;
}

.game-prob-bar {
  width: 50px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.game-prob-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}

.upset-badge {
  font-size: 0.55rem;
  padding: 0.1rem 0.4rem;
  background: rgba(251,191,36,0.15);
  border: 1px solid rgba(251,191,36,0.3);
  border-radius: 100px;
  color: var(--accent2);
  font-weight: 700;
  white-space: nowrap;
}

/* Finals */
.bracket-finals {
  margin-top: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}

.finals-title {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

.finals-game {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.finals-team {
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0.5rem 1.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.finals-team.winner {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

.finals-vs {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-weight: 700;
}

.finals-label {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

/* Probability Charts */
.prob-chart {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.prob-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.5rem 0;
}

.prob-rank {
  font-size: 0.7rem;
  color: var(--text-dim);
  min-width: 20px;
  text-align: right;
  font-weight: 600;
}

.prob-team {
  font-weight: 700;
  min-width: 130px;
  font-size: 0.85rem;
}

.prob-bar-container {
  flex: 1;
  height: 24px;
  background: rgba(255,255,255,0.03);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.prob-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s ease;
  position: relative;
}

.prob-bar.champ { background: linear-gradient(90deg, var(--accent), #fb923c); }
.prob-bar.ff { background: linear-gradient(90deg, var(--blue), #60a5fa); }

.prob-value {
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 50px;
  text-align: right;
}

/* Insights */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.insight-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all 0.2s;
}

.insight-card:hover { border-color: rgba(249,115,22,0.3); transform: translateY(-2px); }

.insight-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }

.insight-title {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
}

.insight-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* Signals Grid */
.signals-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

@media (max-width: 768px) { .signals-grid { grid-template-columns: repeat(2, 1fr); } }

.signal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.signal-weight {
  font-size: 2rem;
  font-weight: 900;
  color: var(--accent);
}

.signal-name {
  font-weight: 700;
  margin-top: 0.3rem;
}

.signal-desc {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.3rem;
}

/* Champions Timeline */
.champs-timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.champ-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
}

.champ-year {
  color: var(--text-dim);
  font-weight: 600;
}

.champ-team { font-weight: 700; }

.champ-seed-badge {
  font-size: 0.6rem;
  padding: 0.1rem 0.3rem;
  background: rgba(249,115,22,0.1);
  border-radius: 3px;
  color: var(--accent);
  font-weight: 700;
}

/* Print Options */
.print-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 600px) { .print-options { grid-template-columns: 1fr; } }

.print-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}

.print-icon { font-size: 2.5rem; margin-bottom: 0.8rem; }
.print-card h3 { font-weight: 800; margin-bottom: 0.5rem; }
.print-card p { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 1.2rem; }
.print-card .btn { margin: 0.3rem; }
.btn-secondary { background: transparent; border: 1px solid var(--accent); color: var(--accent); }
.btn-secondary:hover { background: var(--accent); color: var(--bg); }
.print-card a.btn { text-decoration: none; }

.btn {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  font-size: 0.85rem;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn:hover { background: #fb923c; transform: translateY(-1px); }

/* Printable Bracket */
.printable-bracket {
  background: #fff;
  color: #111;
  border-radius: var(--radius);
  padding: 2rem;
  margin-top: 1rem;
  overflow-x: auto;
}

.printable-bracket h2 {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 0.3rem;
  color: #111;
}

.printable-bracket .pb-sub {
  text-align: center;
  color: #666;
  font-size: 0.8rem;
  margin-bottom: 1.5rem;
}

.pb-region {
  margin-bottom: 1.5rem;
  page-break-inside: avoid;
}

.pb-region-name {
  font-size: 1rem;
  font-weight: 800;
  color: #111;
  border-bottom: 2px solid #f97316;
  padding-bottom: 0.3rem;
  margin-bottom: 0.8rem;
}

.pb-round { margin-bottom: 0.8rem; }

.pb-round-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #999;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.pb-game {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  margin-right: 1rem;
  margin-bottom: 0.3rem;
  padding: 0.2rem 0.5rem;
  background: #f8f8f8;
  border-radius: 4px;
  border-left: 3px solid #ddd;
}

.pb-game.upset { border-left-color: #f97316; }

.pb-pick {
  font-weight: 700;
  color: #111;
}

.pb-matchup {
  color: #999;
  font-size: 0.65rem;
  margin-left: 0.3rem;
}

.pb-prob {
  color: #f97316;
  font-size: 0.6rem;
  font-weight: 700;
  margin-left: 0.4rem;
}

.pb-finals {
  text-align: center;
  padding: 1rem;
  background: #fef3c7;
  border-radius: 8px;
  margin-top: 1rem;
}

.pb-champ {
  font-size: 1.5rem;
  font-weight: 900;
  color: #111;
}

.pb-champ-sub {
  color: #92400e;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Footer */
.footer {
  text-align: center;
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

.footer p { font-size: 0.8rem; color: var(--text-dim); }
.footer-sub { margin-top: 0.3rem; font-size: 0.7rem; }

/* Print styles */
@media print {
  body { background: #fff; color: #111; }
  .hero, .nav, .footer, .print-options, .section:not(.print-target) { display: none !important; }
  .printable-bracket { box-shadow: none; border: none; padding: 0; }
  .section.print-target { display: block !important; }
}
