/* ══════════════════════════════════════
   BATTLES PAGE — The Great Food Debates
   Punchy, competitive, still editorial
══════════════════════════════════════ */

.battles-page { background: var(--page-bg); min-height: 100dvh; }

.battles-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 100px;
}

/* ── Hero ── */
.battles-hero {
  text-align: center;
  padding: 48px 0 36px;
  border-bottom: 2px solid var(--rule);
  margin-bottom: 32px;
  position: relative;
}

.battles-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 1px;
  height: 32px;
  background: var(--rule);
}

.battles-hero-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.battles-hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(48px, 9vw, 96px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--text);
  margin: 0 0 16px;
}

.battles-hero-sub {
  font-size: 15px;
  color: var(--muted);
  max-width: 440px;
  margin: 0 auto;
  line-height: 1.6;
  font-style: italic;
}

/* ── Stats bar ── */
.battles-stats {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 36px;
}

/* ── Grid ── */
.battles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ── Skeleton ── */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}

.battle-skeleton {
  height: 220px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--faint) 25%, rgba(26,23,20,0.10) 50%, var(--faint) 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite linear;
}

/* ══════════════════════════════
   BATTLE CARD
══════════════════════════════ */
.battle-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.18s, transform 0.18s;
}

.battle-card:hover {
  box-shadow: 0 8px 28px rgba(26,23,20,0.10);
  transform: translateY(-2px);
}

/* Question header */
.battle-question {
  padding: 16px 18px 12px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  border-bottom: 1px solid var(--rule);
}

/* VS zone */
.battle-vs-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  flex: 1;
}

/* Option button */
.battle-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 18px 14px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
  text-align: center;
  border-radius: 0;
  box-shadow: none;
  min-height: 90px;
}

.battle-option:hover {
  background: var(--faint);
  transform: none;
  box-shadow: none;
}

.battle-option:active {
  opacity: 0.8;
}

.battle-option-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.battle-option-emoji {
  font-size: 28px;
  line-height: 1;
}

/* VS divider */
.battle-vs-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--muted);
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  background: var(--faint);
  writing-mode: vertical-rl;
}

/* ══════════════════════════════
   VOTED STATE — results
══════════════════════════════ */
.battle-card.voted .battle-option {
  cursor: default;
  pointer-events: none;
}

.battle-card.voted .battle-option:hover {
  background: none;
}

/* Winner option gets subtle highlight */
.battle-option.winner-option {
  background: rgba(45, 74, 138, 0.05);
}

/* Voted indicator on chosen option */
.battle-option.chosen-option .battle-option-label::after {
  content: ' ✓';
  color: var(--accent);
  font-weight: 900;
}

/* Result bars */
.battle-results {
  padding: 0 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--rule);
  margin-top: 0;
}

.battle-result-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.battle-result-row:first-child {
  margin-top: 12px;
}

.battle-result-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  width: 90px;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.battle-result-bar-wrap {
  flex: 1;
  height: 8px;
  background: var(--faint);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--rule);
}

.battle-result-bar {
  height: 100%;
  border-radius: 999px;
  background: var(--muted);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.battle-result-bar.bar-a {
  background: var(--accent);
}

.battle-result-bar.bar-b {
  background: var(--text);
}

.battle-result-pct {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  width: 34px;
  text-align: right;
  flex-shrink: 0;
}

.battle-result-pct.pct-winner {
  color: var(--text);
}

/* Vote count */
.battle-vote-count {
  padding: 0 18px 14px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.battle-share-btn {
  background: none;
  border: none;
  box-shadow: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.1s;
  text-transform: uppercase;
}

.battle-share-btn:hover {
  color: var(--text);
  background: none;
  transform: none;
  box-shadow: none;
}

/* ── Tie state ── */
.battle-tie-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: var(--faint);
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Empty ── */
.battles-empty {
  text-align: center;
  padding: 80px 20px;
}
.battles-empty-icon { font-size: 48px; margin-bottom: 16px; }
.battles-empty h3 { margin: 0 0 8px; }

/* ══════════════════════════════
   MOBILE
══════════════════════════════ */
@media (max-width: 900px) {
  .battles-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

@media (max-width: 600px) {
  .battles-main { padding: 0 14px 80px; }
  .battles-hero { padding: 32px 0 24px; margin-bottom: 20px; }

  .battles-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .battle-skeleton { height: 200px; }

  .battle-question { font-size: 15px; padding: 14px 14px 10px; }
  .battle-option { padding: 14px 10px; min-height: 80px; }
  .battle-option-label { font-size: 13px; }
  .battle-option-emoji { font-size: 24px; }
  .battle-results { padding: 0 14px 12px; }
  .battle-vote-count { padding: 0 14px 12px; }
  .battle-result-label { width: 76px; font-size: 11px; }
}
