/* ===== Developer PR Design System ===== */
:root {
  --bg-canvas: #0d1117;
  --bg-deep: #010409;
  --surface-1: #161b22;
  --surface-2: #1f242c;
  --surface-3: #21262d;
  --surface-soft: rgba(48, 54, 61, 0.42);

  --border-1: rgba(110, 118, 129, 0.4);
  --border-2: rgba(110, 118, 129, 0.58);
  --border-strong: rgba(139, 148, 158, 0.72);

  --text-1: #e6edf3;
  --text-2: #c9d1d9;
  --text-3: #8b949e;
  --text-muted: #6e7681;
  --text-link: #58a6ff;

  --accent-pink: #1f6feb;
  --accent-pink-deep: #1b5bc7;
  --accent-cyan: #79c0ff;
  --accent-violet: #58a6ff;
  --accent-yellow: #d29922;
  --accent-green: #238636;
  --accent-green-dark: #2ea043;
  --accent-red: #da3633;
  --accent-red-dark: #f85149;

  --success-soft: rgba(35, 134, 54, 0.2);
  --danger-soft: rgba(218, 54, 51, 0.2);

  --code-bg: #0d1117;
  --line-hover: rgba(88, 166, 255, 0.08);
  --line-error: rgba(218, 54, 51, 0.14);
  --line-number: #6e7681;

  --radius-sm: 6px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 0 rgba(1, 4, 9, 0.2);
  --shadow-md: 0 6px 16px rgba(1, 4, 9, 0.35);
  --shadow-lg: 0 12px 28px rgba(1, 4, 9, 0.45);

  --font-sans: "Inter", "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}

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

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--text-1);
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bg-canvas) 0%, var(--bg-deep) 100%);
}

.app-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 18px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== Accessibility ===== */
.skip-link {
  position: absolute;
  top: -48px;
  left: 12px;
  background: var(--surface-2);
  color: var(--text-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  z-index: 1500;
}

.skip-link:focus {
  top: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

button:focus-visible,
.nav-tab:focus-visible,
.archive-card:focus-visible,
.back-btn:focus-visible,
.nav-arrow:focus-visible,
.share-btn:focus-visible,
.ad-banner-card:focus-visible {
  outline: 2px solid var(--text-link);
  outline-offset: 2px;
}

/* ===== Utility ===== */
.hidden {
  display: none !important;
}

/* ===== Landing ===== */
.landing-page {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-canvas) 0%, var(--bg-deep) 100%);
  animation: fadeIn 0.28s ease;
}

.landing-page.hidden {
  display: none;
}

.landing-orb {
  display: none;
}

.orb-one {
  width: 300px;
  height: 300px;
  top: 10%;
  left: -40px;
  background: radial-gradient(circle at 30% 30%, rgba(82, 229, 255, 0.85), rgba(82, 229, 255, 0));
  animation: floatOrb 12s ease-in-out infinite;
}

.orb-two {
  width: 340px;
  height: 340px;
  bottom: -80px;
  right: -20px;
  background: radial-gradient(circle at 40% 40%, rgba(255, 94, 198, 0.82), rgba(255, 94, 198, 0));
  animation: floatOrb 15s ease-in-out infinite reverse;
}

.landing-content {
  width: min(100%, 560px);
  padding: 34px 30px;
  position: relative;
  z-index: 2;
  text-align: center;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-2);
  background: var(--surface-1);
  box-shadow: var(--shadow-md);
}

.landing-kicker {
  display: inline-block;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  background: rgba(88, 166, 255, 0.12);
  border: 1px solid rgba(88, 166, 255, 0.32);
  color: var(--text-link);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.landing-title {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.landing-subtitle {
  color: var(--text-2);
  font-size: clamp(1.02rem, 2.4vw, 1.22rem);
  margin-bottom: 22px;
}

.landing-description {
  margin-bottom: 22px;
}

.landing-description p {
  color: var(--text-3);
  line-height: 1.55;
}

.landing-how-to-play {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
  text-align: left;
}

.how-to-play-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}

.how-to-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.approve-icon {
  background: var(--accent-green);
  color: #ffffff;
}

.changes-icon {
  background: transparent;
  border: 1px solid var(--border-2);
  color: var(--text-2);
}

.how-to-text {
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.45;
}

.how-to-text strong {
  color: var(--text-1);
}

.landing-play-btn {
  width: 100%;
  border: 1px solid var(--accent-green);
  border-radius: var(--radius-md);
  min-height: 50px;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  background: var(--accent-green);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.landing-play-btn:hover {
  transform: translateY(-1px);
  background: var(--accent-green-dark);
  box-shadow: var(--shadow-md);
}

.landing-play-btn:active {
  transform: translateY(0);
}

.landing-proof {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 13px;
}

/* ===== Header ===== */
.header {
  margin-top: 16px;
  margin-bottom: 18px;
}

.header-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-1);
  background: var(--surface-1);
  box-shadow: var(--shadow-sm);
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-glyph {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-3);
  border: 1px solid var(--border-1);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: none;
}

.title {
  font-size: 1.22rem;
  letter-spacing: -0.01em;
}

.tagline {
  margin-top: 2px;
  font-size: 13px;
  color: var(--text-3);
}

.header-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-1);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
}

.nav-tabs {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-1);
}

.nav-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  min-height: 40px;
  padding: 9px 12px;
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: color 0.14s ease, border-color 0.14s ease;
}

.nav-tab:hover {
  color: var(--text-1);
}

.nav-tab.active {
  color: var(--text-1);
  background: transparent;
  border-bottom-color: #f78166;
}

.tab-icon {
  font-size: 11px;
  font-family: var(--font-mono);
  opacity: 0.9;
}

/* ===== Main ===== */
.main-content {
  flex: 1;
  padding-bottom: 18px;
}

.view {
  display: none;
}

.view.active {
  display: block;
  animation: fadeIn 0.22s ease;
}

/* ===== Game Arena ===== */
.arena {
  display: grid;
  gap: 14px;
}

.arena-card {
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  background: var(--surface-1);
  box-shadow: var(--shadow-sm);
  padding: 16px;
}

.intro-card {
  padding: 16px;
}

.arena-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.arena-head-copy {
  min-width: 0;
}

.arena-head-copy p {
  color: var(--text-2);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.arena-pill {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(88, 166, 255, 0.1);
  border: 1px solid rgba(88, 166, 255, 0.32);
  color: var(--text-link);
  font-size: 12px;
  font-weight: 600;
}

.pr-description-text {
  color: var(--text-2);
  line-height: 1.58;
}

.pr-review-divider {
  margin: 14px 0 12px;
  border-top: 1px solid var(--border-1);
}

/* ===== File and Code ===== */
.code-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.code-meta-label {
  color: var(--text-3);
  font-size: 13px;
}

.files-badge {
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-1);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 11px;
  padding: 3px 8px;
}

.file-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.file-icon {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border-1);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
}

.file-name {
  font-family: var(--font-mono);
  color: var(--text-1);
}

.file-status {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-green);
}

.code-container {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-2);
  overflow: hidden;
  background: var(--code-bg);
}

.code-line {
  display: flex;
  min-height: 22px;
  font-size: 12px;
}

.code-line:hover {
  background: var(--line-hover);
}

.code-line.error-line {
  background: var(--line-error);
  border-left: 3px solid var(--accent-red);
}

.code-line.error-line.pulse {
  animation: errorPulse 0.9s ease;
}

.line-number {
  min-width: 46px;
  padding: 0 10px;
  text-align: right;
  user-select: none;
  color: var(--line-number);
  border-right: 1px solid var(--border-1);
  font-family: var(--font-mono);
  background: var(--surface-1);
}

.line-content {
  flex: 1;
  padding-left: 12px;
  white-space: pre;
  font-family: var(--font-mono);
  color: var(--text-2);
}

/* ===== Action/Voting ===== */
.action-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.section-title {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.action-helper {
  margin-left: auto;
  color: var(--text-3);
  font-size: 13px;
}

.voting-card {
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  padding: 14px;
}

.voting-buttons {
  display: flex;
  gap: 10px;
}

.vote-btn {
  flex: 1;
  min-height: 50px;
  border-radius: 6px;
  border: 1px solid transparent;
  padding: 11px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
}

.vote-lgtm {
  color: #ffffff;
  background: var(--accent-green);
  border-color: var(--accent-green);
  box-shadow: none;
}

.vote-lgtm:hover:not(:disabled) {
  transform: translateY(-1px);
  background: var(--accent-green-dark);
}

.vote-changes {
  color: var(--text-1);
  background: var(--surface-1);
  border-color: var(--border-2);
  box-shadow: none;
}

.vote-changes:hover:not(:disabled) {
  transform: translateY(-1px);
  background: var(--surface-3);
}

.vote-btn:active:not(:disabled) {
  transform: translateY(0);
}

.vote-btn:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  box-shadow: none;
}

.vote-icon {
  font-size: 15px;
}

.vote-loading {
  margin-top: 10px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}

.voting-card.submitting .voting-buttons {
  pointer-events: none;
  opacity: 0.62;
}

/* ===== Results ===== */
.result-section {
  display: grid;
  gap: 14px;
}

.result-block {
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  background: var(--surface-1);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.result-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.result-meta {
  display: grid;
  gap: 1px;
}

.timeline-action {
  color: var(--text-3);
  font-size: 13px;
}

.stats-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  background: var(--surface-3);
  border: 1px solid var(--border-1);
}

.result-stage.revealed {
  animation: stageIn 0.3s ease;
}

/* ===== Cards/Comments ===== */
.comment-card {
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-2);
}

.comment-card.correct {
  border-color: rgba(65, 212, 134, 0.55);
  box-shadow: inset 0 0 0 1px rgba(65, 212, 134, 0.18);
}

.comment-card.incorrect {
  border-color: rgba(255, 106, 125, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 106, 125, 0.18);
}

.comment-body {
  padding: 14px 15px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.58;
}

.comment-body p {
  margin: 0 0 10px;
}

.comment-body p:last-child {
  margin-bottom: 0;
}

.comment-body code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-link);
  background: rgba(88, 166, 255, 0.1);
  border: 1px solid rgba(88, 166, 255, 0.22);
  border-radius: 8px;
  padding: 2px 6px;
}

.comment-body pre {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-1);
  overflow-x: auto;
  background: var(--bg-canvas);
}

.comment-body pre code {
  background: transparent;
  border: 0;
  padding: 0;
}

.mention {
  color: var(--text-link);
  font-weight: 600;
}

.lgtm-message {
  font-weight: 600;
}

.result-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-pill);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}

.result-indicator.correct {
  color: #3fb950;
  background: var(--success-soft);
  border: 1px solid rgba(63, 185, 80, 0.4);
}

.result-indicator.incorrect {
  color: #f85149;
  background: var(--danger-soft);
  border: 1px solid rgba(248, 81, 73, 0.4);
}

.difficulty-reveal {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-2);
}

.difficulty-reveal strong {
  color: var(--text-1);
}

.explanation {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-1);
}

.not-played-message {
  color: var(--text-muted);
  font-style: italic;
}

/* ===== Avatars/Meta ===== */
.comment-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
}

.author-avatar {
  background: #f0883e;
}

.user-avatar {
  background: #1f6feb;
}

.staff-avatar {
  background: #238636;
}

.comment-author {
  color: var(--text-1);
  font-weight: 700;
  font-size: 14px;
}

.comment-time {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== Stats and Retention ===== */
.stats-card {
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}

.stats-content {
  padding: 14px;
}

.stats-bar-container {
  height: 10px;
  border-radius: var(--radius-pill);
  overflow: hidden;
  background: var(--surface-3);
  margin-bottom: 9px;
}

.stats-bar {
  width: 0%;
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--accent-green);
  transition: width 0.7s ease-out;
}

.stats-bar.stats-bar-empty {
  background: var(--surface-3);
}

.stats-text .stats-empty-msg.hidden,
.stats-text .stats-normal.hidden {
  display: none;
}

.stats-text {
  color: var(--text-2);
  font-size: 14px;
}

.stats-text span:first-child {
  color: var(--text-1);
  font-weight: 700;
}

.stats-total {
  color: var(--text-muted);
  font-size: 12px;
}

.stats-text-models {
  margin-top: 8px;
}

.stats-text-models .stat-tooltip-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  cursor: help;
  vertical-align: middle;
}

.stats-text-models .stat-tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--border-2);
  background: var(--surface-3);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
}

.stats-text-models .stat-tooltip-wrapper:hover .stat-tooltip-icon,
.stats-text-models .stat-tooltip-wrapper:focus-visible .stat-tooltip-icon {
  border-color: var(--border-strong);
  color: var(--text-2);
}

.stats-text-models .stat-tooltip-content {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  padding: 8px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-2);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12px;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 20;
}

.stats-text-models .stat-tooltip-wrapper:hover .stat-tooltip-content,
.stats-text-models .stat-tooltip-wrapper:focus-visible .stat-tooltip-content {
  opacity: 1;
  visibility: visible;
}

.retention-panel {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-1);
  display: grid;
  gap: 8px;
}

.retention-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.retention-label {
  color: var(--text-muted);
  font-size: 12px;
}

.retention-value {
  color: var(--text-1);
  font-weight: 700;
  font-size: 13px;
}

.retention-separator {
  color: var(--text-muted);
}

.countdown-timer {
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}

.share-btn {
  border: 1px solid var(--border-1);
  border-radius: 6px;
  padding: 6px 10px;
  min-height: 34px;
  background: var(--surface-1);
  color: var(--text-2);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}

.share-btn:hover {
  transform: translateY(-1px);
  background: var(--surface-3);
  border-color: var(--border-strong);
}

.share-feedback {
  color: #9bf4c9;
  font-size: 12px;
  font-weight: 700;
}

/* ===== Archive ===== */
.archive-container {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-1);
  background: var(--surface-1);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.archive-head {
  margin-bottom: 12px;
}

.archive-title {
  font-size: 1.3rem;
}

.archive-subtitle {
  color: var(--text-3);
  margin-top: 2px;
}

.archive-list {
  display: grid;
  gap: 10px;
}

.archive-empty {
  border: 1px dashed var(--border-1);
  border-radius: var(--radius-md);
  text-align: center;
  padding: 26px 12px;
  color: var(--text-muted);
  background: var(--surface-2);
}

.archive-card {
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  padding: 12px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.archive-card:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  background: var(--surface-3);
}

.archive-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.archive-card-icon.won {
  background: var(--success-soft);
  color: #3fb950;
}

.archive-card-icon.lost {
  background: var(--danger-soft);
  color: #f85149;
}

.archive-card-icon.not-played {
  background: rgba(110, 118, 129, 0.24);
  color: var(--text-2);
}

.archive-card-content {
  flex: 1;
  min-width: 0;
}

.archive-card-title {
  color: var(--text-1);
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.archive-card-date {
  color: var(--text-muted);
  font-size: 12px;
}

.archive-card-status {
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.archive-card-status.won {
  color: #3fb950;
  background: var(--success-soft);
}

.archive-card-status.lost {
  color: #f85149;
  background: var(--danger-soft);
}

.archive-card-status.not-played {
  color: var(--text-2);
  background: rgba(110, 118, 129, 0.24);
}

/* ===== Past View ===== */
.past-shell {
  display: grid;
  gap: 12px;
}

.past-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.back-btn {
  border: 1px solid var(--border-1);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--text-2);
  min-height: 38px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.back-btn:hover {
  border-color: var(--border-strong);
}

.past-badge {
  border-radius: var(--radius-pill);
  border: 1px solid rgba(210, 153, 34, 0.48);
  background: rgba(210, 153, 34, 0.12);
  color: #f2cc60;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
}

.day-navigation {
  display: flex;
  gap: 10px;
}

.nav-arrow {
  flex: 1;
  min-height: 40px;
  border: 1px solid var(--border-1);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.nav-arrow:hover:not(:disabled) {
  border-color: var(--border-strong);
}

.nav-arrow:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

/* ===== Footer ===== */
.footer {
  margin-top: auto;
  padding: 14px 0 20px;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-spacer {
  flex: 1 1 auto;
}

.rss-link {
  color: var(--accent-1);
  font-size: 12px;
  text-decoration: none;
}

.rss-link:hover,
.rss-link:focus-visible {
  text-decoration: underline;
}

.copyright {
  color: var(--text-muted);
  font-size: 12px;
}

/* ===== Ad Banner ===== */
.ad-banner {
  margin: 16px 0 10px;
}

.ad-banner-label {
  text-align: center;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  margin-bottom: 8px;
}

.ad-banner-card {
  max-width: 728px;
  min-height: 90px;
  margin: 0 auto;
  padding: 14px 16px;
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  background: var(--surface-1);
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 3px;
  text-decoration: none;
}

.ad-banner-card:hover {
  border-color: var(--border-strong);
}

.ad-banner-tag {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 11px;
}

.ad-banner-title {
  color: var(--text-1);
  font-size: 17px;
  font-weight: 700;
}

.ad-banner-copy {
  color: var(--text-2);
  font-size: 13px;
}

/* ===== Global Utilities ===== */
#confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1400;
}

.loading {
  opacity: 0.58;
  pointer-events: none;
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes stageIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes errorPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 106, 125, 0.6);
  }
  100% {
    box-shadow: 0 0 0 14px rgba(255, 106, 125, 0);
  }
}

@keyframes floatOrb {
  0%,
  100% {
    transform: translateY(0) translateX(0);
  }
  50% {
    transform: translateY(-18px) translateX(10px);
  }
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .app-container {
    padding: 0 14px;
  }

  .header-shell {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-badge {
    margin-left: 50px;
  }
}

@media (max-width: 720px) {
  html {
    font-size: 14px;
  }

  .landing-content {
    width: min(100%, 100%);
    margin: 0 12px;
    padding: 24px 18px;
  }

  .nav-tabs {
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-tab {
    white-space: nowrap;
  }

  .action-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .action-helper {
    margin-left: 0;
  }

  .voting-buttons {
    flex-direction: column;
  }

  .arena-head {
    align-items: flex-start;
  }

  .comment-time {
    margin-left: 0;
  }

  .result-head {
    flex-wrap: wrap;
  }

  .day-navigation {
    flex-direction: column;
  }

  .ad-banner-card {
    min-height: 74px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== Prism Tokens ===== */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #8b949e;
}

.token.punctuation {
  color: #c9d1d9;
}

.token.property,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
  color: #79c0ff;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
  color: #a5d6ff;
}

.token.operator,
.token.entity,
.token.url {
  color: #c9d1d9;
}

.token.atrule,
.token.attr-value,
.token.keyword {
  color: #ff7b72;
}

.token.function,
.token.class-name {
  color: #d2a8ff;
}

.token.regex,
.token.important,
.token.variable {
  color: #ffa657;
}
