/* ============================================================
   CFB Competition — Global Design System
   style.css · Link this in header.php
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;800&family=Barlow:wght@400;500;600&display=swap');

/* --- CSS Variables --- */
:root {
  --bg:          #0d0f14;
  --surface:     #161a23;
  --surface2:    #1e2330;
  --surface3:    #252b3b;
  --border:      rgba(255, 255, 255, 0.08);
  --border-md:   rgba(255, 255, 255, 0.14);

  --gold:        #e8a020;
  --gold-dim:    rgba(232, 160, 32, 0.15);
  --gold-dark:   #b87d14;
  --red:         #c8341a;
  --red-dim:     rgba(200, 52, 26, 0.15);

  --text:        #f0f2f5;
  --text-muted:  #8a92a3;
  --text-faint:  #4a5060;

  --green:       #22c55e;
  --green-dim:   rgba(34, 197, 94, 0.15);
  --blue:        #3b82f6;
  --blue-dim:    rgba(59, 130, 246, 0.15);

  --font-display: 'Barlow Condensed', sans-serif;
  --font-body:    'Barlow', sans-serif;

  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   14px;

  --nav-h:       58px;
  --max-w:       1100px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  padding-top: var(--nav-h);
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }

/* --- Typography --- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.15;
  color: var(--text);
}
h1 { font-size: 2.6rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }

p { margin-bottom: 1rem; color: var(--text-muted); }
p:last-child { margin-bottom: 0; }

/* --- Layout Helpers --- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}
.page-body {
  padding: 32px 20px 60px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* --- Card --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface2);
}
.card-header h3, .card-header h4 {
  font-size: 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.card-body { padding: 18px; }

/* Accent top-border on featured cards */
.card-accent { position: relative; }
.card-accent::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--gold));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* --- Stat / Metric Cards --- */
.stat-card {
  background: var(--surface2);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  text-align: center;
}
.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}
.stat-card .stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 4px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary  { background: var(--gold); color: #000; }
.btn-primary:hover { background: #f0aa28; }

.btn-secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border-md); }
.btn-secondary:hover { background: var(--surface3); }

.btn-ghost { background: transparent; color: var(--gold); border: 1.5px solid var(--gold); }
.btn-ghost:hover { background: var(--gold-dim); }

.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #d94020; }

.btn-sm { padding: 7px 14px; font-size: 0.85rem; }
.btn-lg { padding: 13px 30px; font-size: 1.1rem; }
.btn-full { width: 100%; }

/* --- Badges / Pills --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-gold    { background: var(--gold-dim); color: var(--gold); }
.badge-red     { background: var(--red-dim); color: #e06040; }
.badge-green   { background: var(--green-dim); color: var(--green); }
.badge-blue    { background: var(--blue-dim); color: #60a5fa; }
.badge-muted   { background: rgba(255,255,255,0.06); color: var(--text-muted); }

/* --- Section Headers --- */
.section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* --- Forms --- */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}
.form-input, .form-select {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 10px 14px;
  transition: border-color 0.15s;
  appearance: none;
}
.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-dim);
}
.form-input::placeholder { color: var(--text-faint); }
.form-error { font-size: 12px; color: #ef4444; margin-top: 5px; }
.form-hint  { font-size: 12px; color: var(--text-muted); margin-top: 5px; }

/* --- Tables --- */
.cfb-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cfb-table th {
  text-align: left;
  padding: 10px 14px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
.cfb-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.cfb-table tr:last-child td { border-bottom: none; }
.cfb-table tr:hover td { background: rgba(255,255,255,0.02); }
.cfb-table .rank-col { font-family: var(--font-display); font-weight: 800; font-size: 1rem; }

/* --- Alerts / Flash Messages --- */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-success { background: var(--green-dim); color: var(--green); border: 1px solid rgba(34,197,94,0.25); }
.alert-error   { background: var(--red-dim);   color: #e06040;     border: 1px solid rgba(200,52,26,0.25); }
.alert-info    { background: var(--blue-dim);  color: #60a5fa;     border: 1px solid rgba(59,130,246,0.25); }
.alert-warning { background: rgba(232,160,32,0.12); color: var(--gold); border: 1px solid rgba(232,160,32,0.25); }

/* --- Dividers --- */
hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

/* --- Utilities --- */
.text-gold   { color: var(--gold); }
.text-red    { color: var(--red); }
.text-green  { color: var(--green); }
.text-muted  { color: var(--text-muted); }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }

/* --- Mobile Responsive Base --- */
@media (max-width: 600px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  .page-body { padding: 20px 16px 50px; }
}
