/* ============================================
   BOXING MATCHUP PREDICTOR - PIXEL ART STYLES
   Retro Arcade / Prize Fighters 2 Aesthetic
   ============================================ */

/* --- Google Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Backgrounds */
  --bg-primary: #0f0f1e;
  --bg-secondary: #1a1a2e;
  --bg-card: #16213e;
  --bg-dark: #0a0a14;

  /* Red Corner */
  --red-corner: #ff0040;
  --red-corner-dark: #cc0033;
  --red-corner-glow: #ff335980;
  --red-corner-light: #ff6680;

  /* Blue Corner */
  --blue-corner: #00d9ff;
  --blue-corner-dark: #00a8cc;
  --blue-corner-glow: #00d9ff80;
  --blue-corner-light: #66e8ff;

  /* Accents */
  --gold: #ffd700;
  --gold-dark: #cc9900;
  --gold-glow: #ffd70080;
  --orange: #ffaa00;
  --green: #00ff66;
  --green-dark: #00cc52;

  /* Text */
  --text-primary: #ffffff;
  --text-secondary: #c0c0c0;
  --text-muted: #808080;

  /* Pixel sizing */
  --pixel: 4px;
  --pixel-2: 8px;
  --pixel-3: 12px;
  --pixel-4: 16px;

  /* Font */
  --font-pixel: 'Press Start 2P', monospace;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  image-rendering: pixelated;
}

body {
  font-family: var(--font-pixel);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.8;
  position: relative;
}

/* --- CRT Scanline Overlay --- */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.12) 0px,
    rgba(0, 0, 0, 0.12) 1px,
    transparent 1px,
    transparent 3px
  );
}

/* Subtle CRT flicker */
@keyframes crtFlicker {
  0% { opacity: 0.97; }
  5% { opacity: 1; }
  10% { opacity: 0.98; }
  15% { opacity: 1; }
  100% { opacity: 1; }
}

body {
  animation: crtFlicker 4s infinite;
}

/* --- Scrollbar Styling --- */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
  border-left: 4px solid var(--gold-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--gold);
  border: 2px solid var(--bg-dark);
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--bg-dark);
  border-bottom: 4px solid var(--gold);
  padding: 12px 0;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
}

.nav-logo {
  font-size: 10px;
  color: var(--gold);
  text-decoration: none;
  text-shadow: 2px 2px 0 var(--gold-dark);
  letter-spacing: 2px;
  white-space: nowrap;
}

.nav-logo:hover {
  color: var(--text-primary);
  text-shadow: 0 0 8px var(--gold-glow);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 8px;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 8px;
  padding: 8px 16px;
  border: 2px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
  border-color: var(--gold);
  text-shadow: 0 0 8px var(--gold-glow);
}

.nav-links .nav-cta {
  background: var(--red-corner);
  color: var(--text-primary);
  border: 3px solid var(--red-corner-light);
  padding: 8px 20px;
  font-size: 8px;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.5);
  box-shadow: 0 4px 0 var(--red-corner-dark);
  position: relative;
  top: 0;
}

.nav-links .nav-cta:hover {
  top: 2px;
  box-shadow: 0 2px 0 var(--red-corner-dark);
  background: var(--red-corner-light);
  color: var(--text-primary);
  border-color: var(--red-corner-light);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-pixel);
  font-size: 14px;
  padding: 6px 10px;
  cursor: pointer;
}

/* --- Page Content Wrapper --- */
.page-content {
  padding-top: 72px;
}

/* --- Hero Section (Landing Page) --- */
.hero {
  min-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  position: relative;
  overflow: hidden;
}

/* Pixel corner decorations */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  border: 6px solid var(--gold);
  opacity: 0.3;
}

.hero::before {
  top: 96px;
  left: 24px;
  border-right: none;
  border-bottom: none;
}

.hero::after {
  bottom: 24px;
  right: 24px;
  border-left: none;
  border-top: none;
}

/* Pixel boxing ring border */
.hero-ring {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1000px;
  height: calc(100% - 104px);
  border: 4px solid var(--gold-dark);
  opacity: 0.15;
  pointer-events: none;
}

.hero-ring::before,
.hero-ring::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gold-dark);
}

.hero-ring::before {
  top: 33%;
}

.hero-ring::after {
  top: 66%;
}

/* Pixel art boxing gloves */
.hero-gloves {
  display: flex;
  gap: 48px;
  margin-bottom: 32px;
  position: relative;
  z-index: 2;
}

.pixel-glove {
  width: 80px;
  height: 80px;
  position: relative;
  image-rendering: pixelated;
}

.pixel-glove-red {
  background: var(--red-corner);
  clip-path: polygon(
    20% 0%, 80% 0%, 100% 20%, 100% 60%,
    90% 80%, 70% 100%, 30% 100%, 10% 80%,
    0% 60%, 0% 20%
  );
  box-shadow: inset -8px -8px 0 var(--red-corner-dark),
              0 0 20px var(--red-corner-glow);
  animation: gloveLeftPunch 2s ease-in-out infinite;
}

.pixel-glove-blue {
  background: var(--blue-corner);
  clip-path: polygon(
    20% 0%, 80% 0%, 100% 20%, 100% 60%,
    90% 80%, 70% 100%, 30% 100%, 10% 80%,
    0% 60%, 0% 20%
  );
  box-shadow: inset -8px -8px 0 var(--blue-corner-dark),
              0 0 20px var(--blue-corner-glow);
  animation: gloveRightPunch 2s ease-in-out infinite 0.3s;
}

@keyframes gloveLeftPunch {
  0%, 100% { transform: translateX(0) rotate(-15deg); }
  50% { transform: translateX(10px) rotate(-5deg) scale(1.05); }
}

@keyframes gloveRightPunch {
  0%, 100% { transform: translateX(0) rotate(15deg); }
  50% { transform: translateX(-10px) rotate(5deg) scale(1.05); }
}

/* VS sparkle between gloves */
.hero-vs-spark {
  font-size: 20px;
  color: var(--gold);
  text-shadow: 0 0 16px var(--gold-glow), 2px 2px 0 var(--gold-dark);
  animation: vsPulse 1.5s ease-in-out infinite;
  align-self: center;
}

@keyframes vsPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.15); }
}

.hero-title {
  font-size: 32px;
  color: var(--gold);
  text-shadow:
    3px 3px 0 var(--gold-dark),
    6px 6px 0 rgba(0,0,0,0.4);
  margin-bottom: 24px;
  letter-spacing: 4px;
  position: relative;
  z-index: 2;
  line-height: 1.4;
}

.hero-title .title-boxing {
  color: var(--red-corner);
  text-shadow:
    3px 3px 0 var(--red-corner-dark),
    6px 6px 0 rgba(0,0,0,0.4);
  display: block;
}

.hero-title .title-predictor {
  color: var(--blue-corner);
  text-shadow:
    3px 3px 0 var(--blue-corner-dark),
    6px 6px 0 rgba(0,0,0,0.4);
  font-size: 22px;
  display: block;
}

.hero-subtitle {
  font-size: 10px;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 40px;
  position: relative;
  z-index: 2;
  line-height: 2.2;
}

.hero-subtitle .blink {
  animation: textBlink 1s step-end infinite;
}

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

/* Arcade style pixel art belt */
.pixel-belt {
  width: 200px;
  height: 24px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-dark));
  border: 3px solid var(--gold);
  margin: 0 auto 32px;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 12px var(--gold-glow);
}

.pixel-belt::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 16px;
  background: var(--text-primary);
  border: 2px solid var(--gold-dark);
}

/* --- Buttons --- */
.btn {
  font-family: var(--font-pixel);
  font-size: 12px;
  padding: 16px 32px;
  border: 4px solid;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  position: relative;
  top: 0;
  transition: all 0.1s;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
  color: var(--text-primary);
}

.btn:active {
  top: 4px !important;
  box-shadow: none !important;
}

/* Primary (Red) */
.btn-primary {
  background: var(--red-corner);
  border-color: var(--red-corner-light);
  box-shadow: 0 6px 0 var(--red-corner-dark),
              0 0 20px var(--red-corner-glow);
  text-shadow: 2px 2px 0 rgba(0,0,0,0.5);
}

.btn-primary:hover {
  background: var(--red-corner-light);
  top: 2px;
  box-shadow: 0 4px 0 var(--red-corner-dark),
              0 0 30px var(--red-corner-glow);
}

/* Secondary (Blue) */
.btn-secondary {
  background: var(--bg-dark);
  border-color: var(--blue-corner);
  box-shadow: 0 6px 0 #001a20,
              0 0 12px var(--blue-corner-glow);
  text-shadow: 2px 2px 0 rgba(0,0,0,0.5);
  color: var(--blue-corner);
}

.btn-secondary:hover {
  background: var(--blue-corner);
  color: var(--text-primary);
  top: 2px;
  box-shadow: 0 4px 0 var(--blue-corner-dark),
              0 0 20px var(--blue-corner-glow);
}

/* Gold/Accent */
.btn-gold {
  background: var(--bg-dark);
  border-color: var(--gold);
  box-shadow: 0 6px 0 #1a1400,
              0 0 12px var(--gold-glow);
  color: var(--gold);
  text-shadow: 1px 1px 0 rgba(0,0,0,0.5);
}

.btn-gold:hover {
  background: var(--gold);
  color: var(--bg-dark);
  top: 2px;
  box-shadow: 0 4px 0 var(--gold-dark),
              0 0 20px var(--gold-glow);
}

.btn-small {
  font-size: 8px;
  padding: 10px 20px;
  border-width: 3px;
  box-shadow-offset: 4px;
}

/* --- Pixel Borders --- */
.pixel-border {
  border: 4px solid var(--gold);
  position: relative;
}

.pixel-border::before {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border: 2px solid var(--gold-dark);
  pointer-events: none;
}

/* --- Section Styles --- */
.section {
  padding: 64px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: 18px;
  text-align: center;
  margin-bottom: 48px;
  color: var(--gold);
  text-shadow: 2px 2px 0 var(--gold-dark);
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 120px;
  height: 4px;
  background: var(--gold);
  margin: 16px auto 0;
  box-shadow: 0 0 8px var(--gold-glow);
}

/* --- Features Section (Landing) --- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}

.feature-card {
  background: var(--bg-secondary);
  border: 4px solid var(--gold-dark);
  padding: 32px 24px;
  text-align: center;
  position: relative;
  transition: all 0.2s;
}

.feature-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: 0 8px 0 rgba(0,0,0,0.3),
              0 0 20px var(--gold-glow);
}

.feature-icon {
  font-size: 32px;
  margin-bottom: 16px;
  display: block;
}

.feature-card h3 {
  font-size: 10px;
  color: var(--gold);
  margin-bottom: 16px;
  text-shadow: 1px 1px 0 var(--gold-dark);
}

.feature-card p {
  font-size: 8px;
  color: var(--text-secondary);
  line-height: 2;
}

/* Pixel art icons via CSS */
.pixel-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  image-rendering: pixelated;
}

.pixel-icon-glove {
  background: var(--red-corner);
  clip-path: polygon(
    25% 0%, 75% 0%, 100% 25%, 100% 50%,
    85% 75%, 65% 100%, 35% 100%, 15% 75%,
    0% 50%, 0% 25%
  );
  box-shadow: inset -6px -6px 0 var(--red-corner-dark);
}

.pixel-icon-chart {
  background: linear-gradient(
    to top,
    var(--green) 0%, var(--green) 30%,
    transparent 30%, transparent 35%,
    var(--blue-corner) 35%, var(--blue-corner) 55%,
    transparent 55%, transparent 60%,
    var(--gold) 60%, var(--gold) 75%,
    transparent 75%, transparent 80%,
    var(--red-corner) 80%, var(--red-corner) 100%
  );
  clip-path: polygon(
    0% 100%, 0% 20%, 25% 20%, 25% 40%,
    50% 40%, 50% 0%, 75% 0%, 75% 30%,
    100% 30%, 100% 100%
  );
}

.pixel-icon-trophy {
  background: var(--gold);
  clip-path: polygon(
    15% 0%, 85% 0%, 100% 15%, 90% 50%,
    65% 60%, 65% 70%, 75% 80%, 75% 100%,
    25% 100%, 25% 80%, 35% 70%, 35% 60%,
    10% 50%, 0% 15%
  );
  box-shadow: inset -6px -6px 0 var(--gold-dark);
}

/* --- Predictor Page --- */
.predictor-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px;
}

.predictor-title {
  text-align: center;
  font-size: 20px;
  color: var(--gold);
  text-shadow: 3px 3px 0 var(--gold-dark);
  margin-bottom: 8px;
}

.predictor-subtitle {
  text-align: center;
  font-size: 8px;
  color: var(--text-muted);
  margin-bottom: 40px;
}

/* Character Select Area */
.select-screen {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 40px;
}

/* Fighter Card */
.fighter-card {
  background: var(--bg-secondary);
  border: 4px solid;
  padding: 24px;
  position: relative;
}

.fighter-card.red-corner {
  border-color: var(--red-corner);
  box-shadow: 0 0 20px var(--red-corner-glow),
              inset 0 0 30px rgba(255, 0, 64, 0.05);
}

.fighter-card.blue-corner {
  border-color: var(--blue-corner);
  box-shadow: 0 0 20px var(--blue-corner-glow),
              inset 0 0 30px rgba(0, 217, 255, 0.05);
}

.corner-label {
  font-size: 10px;
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: 4px;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.5);
}

.red-corner .corner-label {
  color: var(--red-corner);
}

.blue-corner .corner-label {
  color: var(--blue-corner);
}

/* Fighter sprite placeholder */
.fighter-sprite {
  width: 100%;
  height: 200px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.sprite-placeholder {
  width: 120px;
  height: 180px;
  position: relative;
  image-rendering: pixelated;
}

/* Pixel fighter silhouette */
.sprite-placeholder .head {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  margin: 0 auto 4px;
}

.sprite-placeholder .body {
  width: 56px;
  height: 48px;
  margin: 0 auto 4px;
  clip-path: polygon(10% 0%, 90% 0%, 100% 100%, 0% 100%);
}

.sprite-placeholder .legs {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.sprite-placeholder .leg {
  width: 20px;
  height: 52px;
  border-radius: 0 0 4px 4px;
}

.sprite-placeholder .arm-left,
.sprite-placeholder .arm-right {
  position: absolute;
  width: 16px;
  height: 56px;
  top: 44px;
  border-radius: 4px;
}

.sprite-placeholder .arm-left {
  left: 16px;
  transform: rotate(20deg);
}

.sprite-placeholder .arm-right {
  right: 16px;
  transform: rotate(-20deg);
}

.sprite-placeholder .glove-left,
.sprite-placeholder .glove-right {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  top: 36px;
}

.sprite-placeholder .glove-left {
  left: 6px;
}

.sprite-placeholder .glove-right {
  right: 6px;
}

.red-corner .sprite-placeholder .head,
.red-corner .sprite-placeholder .leg {
  background: #e8c4a0;
}

.red-corner .sprite-placeholder .body {
  background: var(--red-corner);
  box-shadow: inset -6px 0 0 var(--red-corner-dark);
}

.red-corner .sprite-placeholder .arm-left,
.red-corner .sprite-placeholder .arm-right {
  background: #e8c4a0;
}

.red-corner .sprite-placeholder .glove-left,
.red-corner .sprite-placeholder .glove-right {
  background: var(--red-corner);
  box-shadow: inset -3px -3px 0 var(--red-corner-dark);
}

.blue-corner .sprite-placeholder .head,
.blue-corner .sprite-placeholder .leg {
  background: #d4a87c;
}

.blue-corner .sprite-placeholder .body {
  background: var(--blue-corner);
  box-shadow: inset -6px 0 0 var(--blue-corner-dark);
}

.blue-corner .sprite-placeholder .arm-left,
.blue-corner .sprite-placeholder .arm-right {
  background: #d4a87c;
}

.blue-corner .sprite-placeholder .glove-left,
.blue-corner .sprite-placeholder .glove-right {
  background: var(--blue-corner);
  box-shadow: inset -3px -3px 0 var(--blue-corner-dark);
}

/* Fighter select dropdown */
.fighter-select-wrapper {
  margin-bottom: 16px;
}

.fighter-select-wrapper label {
  display: block;
  font-size: 8px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.fighter-select {
  width: 100%;
  font-family: var(--font-pixel);
  font-size: 10px;
  padding: 12px 16px;
  background: var(--bg-dark);
  color: var(--text-primary);
  border: 3px solid;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  position: relative;
}

.red-corner .fighter-select {
  border-color: var(--red-corner-dark);
}

.red-corner .fighter-select:focus {
  border-color: var(--red-corner);
  outline: none;
  box-shadow: 0 0 12px var(--red-corner-glow);
}

.blue-corner .fighter-select {
  border-color: var(--blue-corner-dark);
}

.blue-corner .fighter-select:focus {
  border-color: var(--blue-corner);
  outline: none;
  box-shadow: 0 0 12px var(--blue-corner-glow);
}

.fighter-select option {
  background: var(--bg-dark);
  color: var(--text-primary);
  padding: 8px;
}

/* Select arrow */
.fighter-select-wrapper {
  position: relative;
}

.fighter-select-wrapper::after {
  content: '\25BC';
  position: absolute;
  right: 12px;
  bottom: 14px;
  font-size: 10px;
  pointer-events: none;
}

.red-corner .fighter-select-wrapper::after {
  color: var(--red-corner);
}

.blue-corner .fighter-select-wrapper::after {
  color: var(--blue-corner);
}

/* Fighter stats */
.fighter-stats {
  margin-top: 16px;
}

.fighter-stats.hidden {
  display: none;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 7px;
}

.stat-label {
  color: var(--text-muted);
  min-width: 70px;
}

.stat-value {
  color: var(--text-primary);
  text-align: right;
  min-width: 50px;
}

.stat-bar-wrapper {
  flex: 1;
  height: 12px;
  background: var(--bg-dark);
  border: 2px solid #333;
  margin: 0 8px;
  position: relative;
  overflow: hidden;
}

.stat-bar {
  height: 100%;
  transition: width 0.5s ease;
  position: relative;
}

.stat-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: rgba(255,255,255,0.15);
}

.red-corner .stat-bar {
  background: linear-gradient(90deg, var(--red-corner-dark), var(--red-corner));
}

.blue-corner .stat-bar {
  background: linear-gradient(90deg, var(--blue-corner-dark), var(--blue-corner));
}

/* VS Section */
.vs-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 0;
  min-width: 80px;
}

.vs-text {
  font-size: 36px;
  color: var(--gold);
  text-shadow:
    3px 3px 0 var(--gold-dark),
    0 0 20px var(--gold-glow);
  animation: vsPulse 1.5s ease-in-out infinite;
  line-height: 1;
}

.vs-divider {
  width: 4px;
  flex: 1;
  min-height: 80px;
  background: linear-gradient(
    to bottom,
    transparent,
    var(--gold),
    transparent
  );
  margin: 16px 0;
}

/* Predict Button */
.predict-section {
  text-align: center;
  margin: 32px 0;
}

.btn-predict {
  font-size: 14px;
  padding: 20px 48px;
  animation: predictGlow 2s ease-in-out infinite;
}

@keyframes predictGlow {
  0%, 100% { box-shadow: 0 6px 0 var(--red-corner-dark), 0 0 20px var(--red-corner-glow); }
  50% { box-shadow: 0 6px 0 var(--red-corner-dark), 0 0 40px var(--red-corner-glow); }
}

.btn-predict:hover {
  animation: none;
}

.btn-predict:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  animation: none;
}

/* --- Results Section --- */
.results-section {
  display: none;
  margin-top: 40px;
  animation: resultsReveal 0.6s ease-out;
}

.results-section.visible {
  display: block;
}

@keyframes resultsReveal {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  60% {
    transform: translateY(-4px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.results-header {
  text-align: center;
  font-size: 16px;
  color: var(--gold);
  text-shadow: 2px 2px 0 var(--gold-dark);
  margin-bottom: 32px;
}

.results-card {
  background: var(--bg-secondary);
  border: 4px solid var(--gold);
  padding: 32px;
  position: relative;
}

.results-card::before {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border: 2px solid var(--gold-dark);
  pointer-events: none;
}

/* Probability bars */
.probability-display {
  margin-bottom: 32px;
}

.prob-fighter {
  margin-bottom: 24px;
}

.prob-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.prob-name {
  font-size: 10px;
}

.prob-name.red {
  color: var(--red-corner);
}

.prob-name.blue {
  color: var(--blue-corner);
}

.prob-percentage {
  font-size: 14px;
}

.prob-percentage.red {
  color: var(--red-corner);
  text-shadow: 0 0 8px var(--red-corner-glow);
}

.prob-percentage.blue {
  color: var(--blue-corner);
  text-shadow: 0 0 8px var(--blue-corner-glow);
}

.prob-bar-wrapper {
  height: 28px;
  background: var(--bg-dark);
  border: 3px solid #333;
  position: relative;
  overflow: hidden;
}

.prob-bar {
  height: 100%;
  width: 0;
  transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
}

.prob-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: rgba(255,255,255,0.1);
}

.prob-bar.red {
  background: linear-gradient(90deg, var(--red-corner-dark), var(--red-corner));
}

.prob-bar.blue {
  background: linear-gradient(90deg, var(--blue-corner-dark), var(--blue-corner));
}

/* Animated bar fill with segments for retro look */
.prob-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent 0px,
    transparent 8px,
    rgba(0,0,0,0.15) 8px,
    rgba(0,0,0,0.15) 10px
  );
}

/* Winner announcement */
.winner-announce {
  text-align: center;
  padding: 24px;
  margin-bottom: 24px;
  border: 3px solid var(--gold);
  background: rgba(255, 215, 0, 0.05);
}

.winner-announce h3 {
  font-size: 12px;
  color: var(--gold);
  margin-bottom: 8px;
}

.winner-announce .winner-name {
  font-size: 18px;
  color: var(--text-primary);
  text-shadow: 2px 2px 0 rgba(0,0,0,0.5);
  animation: winnerFlash 0.5s ease-in-out 3;
}

@keyframes winnerFlash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Prediction factors */
.factors-section {
  margin-top: 24px;
}

.factors-title {
  font-size: 10px;
  color: var(--gold);
  margin-bottom: 16px;
  text-align: center;
}

.factors-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.factor-item {
  background: var(--bg-dark);
  border: 2px solid #333;
  padding: 12px;
  font-size: 7px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.factor-icon {
  color: var(--gold);
  font-size: 10px;
  line-height: 1;
  flex-shrink: 0;
}

.factor-text {
  color: var(--text-secondary);
  line-height: 2;
}

.factor-text strong {
  color: var(--text-primary);
}

/* --- Fighter Info Page --- */
.fighter-profile {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px;
}

.fighter-profile-header {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  margin-bottom: 40px;
  background: var(--bg-secondary);
  border: 4px solid var(--gold);
  padding: 24px;
  position: relative;
}

.fighter-profile-header::before {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border: 2px solid var(--gold-dark);
  pointer-events: none;
}

/* Fighter portrait */
.fighter-portrait {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--bg-dark);
  border: 4px solid var(--gold-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.portrait-sprite {
  width: 160px;
  height: 220px;
  position: relative;
}

.portrait-sprite .head {
  width: 56px;
  height: 56px;
  background: #e8c4a0;
  border-radius: 4px;
  margin: 0 auto 4px;
}

.portrait-sprite .body {
  width: 80px;
  height: 64px;
  background: var(--red-corner);
  margin: 0 auto 4px;
  clip-path: polygon(10% 0%, 90% 0%, 100% 100%, 0% 100%);
  box-shadow: inset -8px 0 0 var(--red-corner-dark);
}

.portrait-sprite .shorts {
  width: 72px;
  height: 32px;
  background: var(--gold);
  margin: 0 auto 4px;
  box-shadow: inset -6px 0 0 var(--gold-dark);
}

.portrait-sprite .legs {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.portrait-sprite .leg {
  width: 28px;
  height: 56px;
  background: #e8c4a0;
  border-radius: 0 0 4px 4px;
}

/* Fighter info text */
.fighter-info-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.fighter-name-large {
  font-size: 22px;
  color: var(--gold);
  text-shadow: 3px 3px 0 var(--gold-dark);
  margin-bottom: 8px;
  line-height: 1.4;
}

.fighter-nickname {
  font-size: 10px;
  color: var(--red-corner);
  margin-bottom: 16px;
}

.fighter-record-large {
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.fighter-record-large .wins {
  color: var(--green);
}

.fighter-record-large .losses {
  color: var(--red-corner);
}

.fighter-record-large .draws {
  color: var(--gold);
}

.fighter-basic-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.basic-info-item {
  font-size: 8px;
}

.basic-info-item .info-label {
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}

.basic-info-item .info-value {
  color: var(--text-primary);
}

/* Detailed Stats */
.fighter-detailed-stats {
  background: var(--bg-secondary);
  border: 4px solid var(--gold-dark);
  padding: 24px;
  margin-bottom: 32px;
}

.detailed-stats-title {
  font-size: 12px;
  color: var(--gold);
  text-shadow: 2px 2px 0 var(--gold-dark);
  margin-bottom: 24px;
  text-align: center;
}

.detailed-stat-row {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
}

.detailed-stat-label {
  font-size: 8px;
  color: var(--text-muted);
  min-width: 100px;
}

.detailed-stat-bar-wrapper {
  flex: 1;
  height: 20px;
  background: var(--bg-dark);
  border: 3px solid #333;
  position: relative;
  overflow: hidden;
}

.detailed-stat-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--red-corner-dark), var(--red-corner));
  transition: width 0.8s ease;
  position: relative;
}

.detailed-stat-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: rgba(255,255,255,0.1);
}

.detailed-stat-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent 0px,
    transparent 6px,
    rgba(0,0,0,0.15) 6px,
    rgba(0,0,0,0.15) 8px
  );
}

.detailed-stat-value {
  font-size: 9px;
  color: var(--text-primary);
  min-width: 50px;
  text-align: right;
}

/* Fighting style box */
.fighting-style-box {
  background: var(--bg-secondary);
  border: 4px solid var(--blue-corner-dark);
  padding: 24px;
  margin-bottom: 32px;
}

.fighting-style-title {
  font-size: 12px;
  color: var(--blue-corner);
  text-shadow: 2px 2px 0 rgba(0,0,0,0.5);
  margin-bottom: 16px;
}

.fighting-style-desc {
  font-size: 8px;
  color: var(--text-secondary);
  line-height: 2.4;
}

/* Recent fights table */
.recent-fights {
  background: var(--bg-secondary);
  border: 4px solid var(--gold-dark);
  padding: 24px;
  margin-bottom: 32px;
}

.recent-fights-title {
  font-size: 12px;
  color: var(--gold);
  text-shadow: 2px 2px 0 var(--gold-dark);
  margin-bottom: 24px;
  text-align: center;
}

.fights-table {
  width: 100%;
  border-collapse: collapse;
}

.fights-table th {
  font-size: 7px;
  color: var(--gold);
  text-align: left;
  padding: 12px 8px;
  border-bottom: 3px solid var(--gold-dark);
}

.fights-table td {
  font-size: 7px;
  color: var(--text-secondary);
  padding: 12px 8px;
  border-bottom: 2px solid #222;
}

.fights-table tr:hover td {
  background: rgba(255, 215, 0, 0.03);
}

.fight-result {
  font-weight: bold;
  padding: 4px 8px;
  border: 2px solid;
}

.fight-result.win {
  color: var(--green);
  border-color: var(--green-dark);
}

.fight-result.loss {
  color: var(--red-corner);
  border-color: var(--red-corner-dark);
}

.fight-result.draw {
  color: var(--gold);
  border-color: var(--gold-dark);
}

/* Back button */
.back-nav {
  margin-bottom: 24px;
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 32px 24px;
  border-top: 4px solid var(--gold-dark);
  margin-top: 64px;
}

.footer-text {
  font-size: 7px;
  color: var(--text-muted);
  line-height: 2.4;
}

.footer-text a {
  color: var(--gold);
  text-decoration: none;
}

.footer-text a:hover {
  text-shadow: 0 0 8px var(--gold-glow);
}

/* --- Pixel Art Decorations --- */
/* Animated pixel stars */
.pixel-star {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--gold);
  animation: starTwinkle 2s ease-in-out infinite;
}

@keyframes starTwinkle {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

/* Ring ropes decorative element */
.ring-ropes {
  position: relative;
  padding: 24px 0;
}

.ring-ropes::before,
.ring-ropes::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 4px;
}

.ring-ropes::before {
  top: 0;
  background: var(--red-corner);
  box-shadow: 0 0 8px var(--red-corner-glow);
}

.ring-ropes::after {
  bottom: 0;
  background: var(--blue-corner);
  box-shadow: 0 0 8px var(--blue-corner-glow);
}

/* Loading spinner */
.loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 15, 30, 0.9);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 24px;
}

.loading-overlay.visible {
  display: flex;
}

.loading-text {
  font-size: 12px;
  color: var(--gold);
  text-shadow: 2px 2px 0 var(--gold-dark);
  animation: textBlink 0.8s step-end infinite;
}

.loading-bar-wrapper {
  width: 300px;
  height: 24px;
  background: var(--bg-dark);
  border: 3px solid var(--gold);
}

.loading-bar {
  height: 100%;
  background: var(--red-corner);
  width: 0;
  animation: loadingFill 2s ease-in-out forwards;
}

@keyframes loadingFill {
  0% { width: 0; }
  30% { width: 30%; }
  60% { width: 65%; }
  80% { width: 80%; }
  100% { width: 100%; }
}

/* Coin insert prompt style */
.coin-prompt {
  font-size: 10px;
  color: var(--gold);
  text-align: center;
  margin-top: 32px;
  animation: textBlink 1s step-end infinite;
}

/* --- Responsive Design --- */
@media (max-width: 900px) {
  .select-screen {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .vs-section {
    flex-direction: row;
    padding: 16px 0;
    min-width: unset;
  }

  .vs-divider {
    width: 80px;
    height: 4px;
    min-height: unset;
    background: linear-gradient(
      to right,
      transparent,
      var(--gold),
      transparent
    );
    margin: 0 16px;
  }

  .vs-text {
    font-size: 28px;
  }

  .hero-title {
    font-size: 20px;
  }

  .hero-title .title-predictor {
    font-size: 14px;
  }

  .features {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .factors-grid {
    grid-template-columns: 1fr;
  }

  .fighter-profile-header {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .fighter-portrait {
    max-width: 240px;
    margin: 0 auto;
  }

  .fighter-basic-info {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .fights-table {
    font-size: 6px;
  }

  .predictor-title {
    font-size: 14px;
  }

  .btn-predict {
    font-size: 11px;
    padding: 16px 32px;
  }
}

@media (max-width: 600px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: var(--bg-dark);
    border-bottom: 4px solid var(--gold);
    padding: 16px;
    gap: 4px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    text-align: center;
    padding: 12px;
  }

  .nav-toggle {
    display: block;
  }

  .hero-title {
    font-size: 16px;
  }

  .hero-title .title-predictor {
    font-size: 11px;
  }

  .hero-subtitle {
    font-size: 7px;
  }

  .hero-gloves {
    gap: 24px;
  }

  .pixel-glove {
    width: 56px;
    height: 56px;
  }

  .hero-vs-spark {
    font-size: 14px;
  }

  .fighter-sprite {
    height: 150px;
  }

  .sprite-placeholder {
    transform: scale(0.8);
  }

  .prob-percentage {
    font-size: 11px;
  }

  .results-header {
    font-size: 12px;
  }

  .winner-announce .winner-name {
    font-size: 14px;
  }

  .section-title {
    font-size: 13px;
  }

  .fighter-name-large {
    font-size: 16px;
  }
}

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

.text-center {
  text-align: center;
}

.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }

/* Select highlight for fighter info link */
.fighter-link {
  color: var(--gold);
  text-decoration: none;
  font-size: 8px;
  display: inline-block;
  margin-top: 8px;
  border-bottom: 2px solid var(--gold-dark);
  padding-bottom: 2px;
  transition: all 0.15s;
}

.fighter-link:hover {
  color: var(--text-primary);
  border-color: var(--gold);
  text-shadow: 0 0 8px var(--gold-glow);
}

/* Arcade cabinet edge decoration */
.arcade-edge-left,
.arcade-edge-right {
  position: fixed;
  top: 0;
  width: 8px;
  height: 100%;
  z-index: 100;
  pointer-events: none;
}

.arcade-edge-left {
  left: 0;
  background: linear-gradient(
    to bottom,
    var(--red-corner) 0%,
    var(--gold) 25%,
    var(--blue-corner) 50%,
    var(--gold) 75%,
    var(--red-corner) 100%
  );
  opacity: 0.3;
}

.arcade-edge-right {
  right: 0;
  background: linear-gradient(
    to bottom,
    var(--blue-corner) 0%,
    var(--gold) 25%,
    var(--red-corner) 50%,
    var(--gold) 75%,
    var(--blue-corner) 100%
  );
  opacity: 0.3;
}

/* Fighter select grid page */
.fighters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.fighter-grid-card {
  background: var(--bg-secondary);
  border: 3px solid var(--gold-dark);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  display: block;
}

.fighter-grid-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: 0 8px 0 rgba(0,0,0,0.3),
              0 0 20px var(--gold-glow);
}

.fighter-grid-card .mini-sprite {
  width: 64px;
  height: 80px;
  margin: 0 auto 12px;
  position: relative;
}

.fighter-grid-card .mini-head {
  width: 24px;
  height: 24px;
  background: #e8c4a0;
  border-radius: 2px;
  margin: 0 auto 2px;
}

.fighter-grid-card .mini-body {
  width: 32px;
  height: 24px;
  background: var(--red-corner);
  margin: 0 auto 2px;
  box-shadow: inset -4px 0 0 var(--red-corner-dark);
}

.fighter-grid-card .mini-legs {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.fighter-grid-card .mini-leg {
  width: 12px;
  height: 28px;
  background: #e8c4a0;
  border-radius: 0 0 2px 2px;
}

.fighter-grid-card h3 {
  font-size: 9px;
  color: var(--gold);
  margin-bottom: 8px;
}

.fighter-grid-card p {
  font-size: 7px;
  color: var(--text-muted);
}
