/* ============================================
   ARBITRATER — GLOBAL STYLES
   ============================================ */

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

:root {
  --green: #1D9E75;
  --green-dark: #0F6E56;
  --green-light: #E1F5EE;
  --green-border: #9FE1CB;
  --red: #E24B4A;
  --red-light: #FCEBEB;
  --amber: #EF9F27;
  --amber-light: #FAEEDA;
  --blue: #185FA5;
  --blue-light: #E6F1FB;
  --text-primary: #111111;
  --text-secondary: #555555;
  --text-tertiary: #999999;
  --border: #E5E5E5;
  --border-light: #F0F0F0;
  --bg: #ffffff;
  --bg-secondary: #F7F7F7;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  font-family: inherit;
}

/* ============================================
   NAV
   ============================================ */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 0.5px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.3px;
  text-decoration: none;
}

.nav-logo .green { color: var(--green); }
.nav-logo .black { color: var(--text-primary); }

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-links a {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--text-primary); }
.nav-links a.active { color: var(--text-primary); font-weight: 500; }

.nav-btn {
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 7px 16px;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 500;
  color: var(--green-dark);
  cursor: pointer;
  border: 1.5px solid var(--green-border);
  text-decoration: none;
}

/* ============================================
   PAGE LAYOUT
   ============================================ */

.page {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px;
}

.page-wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

.section-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 14px;
}

/* ============================================
   CARDS
   ============================================ */

.card {
  background: var(--bg);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.card-sm {
  background: var(--bg);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-primary {
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 22px;
  font-size: 14px;
  cursor: pointer;
  display: inline-block;
  text-align: center;
  transition: background 0.15s;
}

.btn-primary:hover { background: var(--green-dark); }

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 22px;
  font-size: 14px;
  cursor: pointer;
  display: inline-block;
  text-align: center;
}

.btn-secondary:hover { border-color: var(--text-tertiary); }

/* ============================================
   RATING PILLS
   ============================================ */

.pill {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 20px;
  display: inline-block;
}

.pill-good { background: #EAF3DE; color: #3B6D11; }
.pill-mid { background: #FAEEDA; color: #854F0B; }
.pill-bad { background: #FCEBEB; color: #A32D2D; }
.pill-live { background: #FAECE7; color: #993C1D; }
.pill-blue { background: var(--blue-light); color: var(--blue); }

/* ============================================
   LIVE BADGE
   ============================================ */

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #FAECE7;
  color: #993C1D;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 20px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #D85A30;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ============================================
   TABS
   ============================================ */

.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 4px;
  width: fit-content;
  margin-bottom: 20px;
}

.tab {
  padding: 7px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.tab.active {
  background: var(--bg);
  color: var(--text-primary);
  font-weight: 500;
  border: 0.5px solid var(--border);
}

.tabs-full {
  display: flex;
  gap: 4px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 20px;
}

.tabs-full .tab { flex: 1; text-align: center; }

/* ============================================
   APPROVAL BARS
   ============================================ */

.approval-bar-bg {
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 3px;
  overflow: hidden;
  flex: 1;
}

.approval-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* ============================================
   VOTE BUTTONS
   ============================================ */

.vote-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}

.vote-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 12px;
  border-radius: var(--radius-lg);
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: #fff;
  transition: filter 0.15s;
  user-select: none;
}

.vote-btn:hover { filter: brightness(0.92); }
.vote-btn:active { filter: brightness(0.85); transform: scale(0.98); }
.vote-btn.agree { background-color: var(--green); }
.vote-btn.disagree { background-color: var(--red); }

/* ============================================
   FORMS
   ============================================ */

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text-primary);
  transition: border-color 0.15s;
}

.form-input:focus {
  outline: none;
  border-color: var(--green);
}

.form-select {
  width: 100%;
  padding: 10px 12px;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text-primary);
  cursor: pointer;
}

.form-error {
  font-size: 12px;
  color: var(--red);
  margin-top: 4px;
}

/* ============================================
   MATCH CARDS
   ============================================ */

.match-card {
  background: var(--bg);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.15s;
  text-decoration: none;
  display: block;
}

.match-card:hover { border-color: #999; }

.match-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0;
}

.match-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex: 1;
}

.team-crest {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

.team-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  text-align: center;
}

.match-score {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.score-num {
  font-size: 26px;
  font-weight: 500;
  color: var(--text-primary);
}

.score-sep {
  font-size: 20px;
  color: var(--text-tertiary);
}

.match-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 0.5px solid var(--border-light);
  margin-top: 4px;
}

/* ============================================
   DECISION CARDS
   ============================================ */

.decision-card {
  background: var(--bg);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 12px;
  transition: border-color 0.15s;
}

.decision-card.voted { border-color: var(--green-border); }

.decision-badge {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 20px;
  display: inline-block;
}

.badge-penalty { background: var(--amber-light); color: #854F0B; }
.badge-red { background: var(--red-light); color: #A32D2D; }
.badge-yellow { background: #FFFBEB; color: #854F0B; }
.badge-var { background: #EEEDFE; color: #534AB7; }
.badge-foul { background: var(--green-light); color: var(--green-dark); }
.badge-other { background: var(--blue-light); color: var(--blue); }

/* ============================================
   RESULT BARS (after voting)
   ============================================ */

.result-bars { margin-top: 12px; }

.result-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.result-label {
  font-size: 11px;
  width: 48px;
  flex-shrink: 0;
}

.result-pct {
  font-size: 12px;
  font-weight: 500;
  width: 32px;
  text-align: right;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  border-top: 0.5px solid var(--border);
  margin-top: 48px;
  padding: 32px 16px 24px;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.footer-col-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.footer-link {
  display: block;
  font-size: 12px;
  color: var(--text-tertiary);
  padding: 2px 0;
  text-decoration: none;
  transition: color 0.15s;
}

.footer-link:hover { color: var(--green); }

.footer-bottom {
  text-align: center;
  font-size: 11px;
  color: var(--text-tertiary);
  padding-top: 16px;
  border-top: 0.5px solid var(--border-light);
}

/* ============================================
   AD PLACEHOLDERS
   ============================================ */

.ad-slot {
  background: var(--bg-secondary);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
  margin-bottom: 16px;
  font-size: 10px;
  color: var(--text-tertiary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ============================================
   UTILITIES
   ============================================ */

.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-amber { color: var(--amber); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.font-medium { font-weight: 500; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.w-full { width: 100%; }
.text-center { text-align: center; }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 600px) {
  .nav { padding: 12px 16px; }
  .nav-links a { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .vote-row { gap: 8px; }
}
