/* -------------------------------------------------------------------------- */
/* Theme: Arcade (Capcom CPS-2 / Neo-Geo Arcade Cabinet Game Select Screen)   */
/* Layout: 2x3 Roster Character Select Stage, Neon Marquee & Coin-Op HUD      */
/* Contrast: WCAG AA Pass (Text on Roster Card 17.4:1)                        */
/* -------------------------------------------------------------------------- */

body[data-theme-layout="arcade"],
:root[data-theme-layout="arcade"] body {
  --sky: #08040f;
  --sky-grad: linear-gradient(rgba(0, 0, 0, 0.38) 50%, transparent 50%) 0 0 / 100% 3px,
              radial-gradient(circle at 50% 10%, #1e092c 0%, #08040f 80%);
  --card: #1e1338;
  --ink: #ffffff;
  --ink-soft: #cbb3f5;
  --slot: #120a22;
  --shadow-1: #ff0077;
  --shadow-2: #00f0ff;
  --gold: #ffd166;
  --chip-bg: rgba(0, 240, 255, 0.1);
  --dither: rgba(255, 0, 119, 0.04);
  background: var(--sky);
  background-image: var(--sky-grad);
  background-attachment: fixed;
  color: var(--ink);
  font-family: 'Press Start 2P', 'Courier New', monospace;
}

/* Ambient scanline glow */
body[data-theme-layout="arcade"] .bg,
:root[data-theme-layout="arcade"] .bg {
  opacity: 0.35;
}

/* Arcade Cabinet Stage Container */
body[data-theme-layout="arcade"] main,
:root[data-theme-layout="arcade"] main {
  max-width: 48rem;
  padding: 1.8rem 1.25rem 7rem;
}

/* Neon Pulse Animation */
@keyframes neon-marquee {
  0%, 100% {
    text-shadow: 0 0 8px #ff0077, 0 0 18px #ff0077, 0 0 35px #ff0077, -2px 0 0 #00f0ff;
    border-color: #ff0077;
    box-shadow: 0 0 16px rgba(255, 0, 119, 0.6), inset 0 0 14px rgba(255, 0, 119, 0.3);
  }
  50% {
    text-shadow: 0 0 4px #ff0077, 0 0 10px #ff0077, 0 0 20px #ff0077, -1px 0 0 #00f0ff;
    border-color: #00f0ff;
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.6), inset 0 0 14px rgba(0, 240, 255, 0.3);
  }
}

/* Top Neon Cabinet Marquee Banner */
body[data-theme-layout="arcade"] main::before,
:root[data-theme-layout="arcade"] main::before {
  content: "★★★ F U R P H Y   A R C A D E ★★★";
  display: block;
  text-align: center;
  font-size: clamp(0.72rem, 3.2vw, 1.05rem);
  letter-spacing: 0.22em;
  color: #ffffff;
  padding: 0.8rem 1rem;
  background: #140724;
  border: 3px solid #ff0077;
  border-radius: 4px;
  margin-bottom: 1.8rem;
  animation: neon-marquee 2.4s ease-in-out infinite;
}

/* Fighter Select Header Profile */
body[data-theme-layout="arcade"] .player,
:root[data-theme-layout="arcade"] .player {
  position: relative;
  background: linear-gradient(180deg, #241544 0%, #170d2c 100%);
  border: 3px solid #ff0077;
  border-radius: 6px;
  box-shadow: 0 6px 0 #000000, 0 0 14px rgba(255, 0, 119, 0.4);
  padding: 1.8rem 1.25rem 1.6rem;
  margin-bottom: 2rem;
}

/* 1P Challenger Tab */
body[data-theme-layout="arcade"] .player::before,
:root[data-theme-layout="arcade"] .player::before {
  content: "★ PLAYER 1 : ACTIVE CHALLENGER ★";
  position: absolute;
  top: -13px;
  left: 20px;
  background: #1e1338;
  color: #00f0ff;
  border: 2px solid #00f0ff;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  padding: 0.2rem 0.65rem;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
  z-index: 2;
}

/* Character Portrait Frame */
body[data-theme-layout="arcade"] .avatar-slot,
:root[data-theme-layout="arcade"] .avatar-slot {
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, #3b216b 0%, #120924 85%);
  border: 3px solid #ffe600;
  box-shadow: 0 0 12px rgba(255, 230, 0, 0.5), 0 4px 0 #000000;
  margin-bottom: 0.9rem;
  animation: none;
}

/* Arcade Titles */
body[data-theme-layout="arcade"] h1,
:root[data-theme-layout="arcade"] h1 {
  color: #ffffff;
  font-size: clamp(1.5rem, 6.5vw, 2rem);
  text-shadow: 0 0 12px #ff0077, 3px 3px 0 #000000;
  margin-bottom: 0.35rem;
}

body[data-theme-layout="arcade"] .kana,
:root[data-theme-layout="arcade"] .kana {
  color: #00f0ff;
  font-size: 0.88rem;
  letter-spacing: 0.3em;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.6);
  margin-bottom: 0.45rem;
}

body[data-theme-layout="arcade"] .tagline,
:root[data-theme-layout="arcade"] .tagline {
  color: #ffd166;
  font-size: 0.68rem;
  line-height: 1.6;
  margin-bottom: 1.1rem;
}

/* Arcade Push Buttons (Sanwa Fighting Game Controls) */
body[data-theme-layout="arcade"] .socials,
:root[data-theme-layout="arcade"] .socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 0.9rem;
}

body[data-theme-layout="arcade"] .slot-btn,
:root[data-theme-layout="arcade"] .slot-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #42296d 0%, #1a0f30 85%);
  border: 3px solid #ffe600;
  box-shadow: 0 4px 0 #08040f, inset 0 2px 3px rgba(255, 255, 255, 0.3);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.06s ease, box-shadow 0.06s ease;
}

body[data-theme-layout="arcade"] .slot-btn canvas,
:root[data-theme-layout="arcade"] .slot-btn canvas {
  width: 26px;
  height: 26px;
}

body[data-theme-layout="arcade"] .slot-btn:hover,
:root[data-theme-layout="arcade"] .slot-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #08040f, 0 0 12px rgba(255, 230, 0, 0.6);
}

body[data-theme-layout="arcade"] .slot-btn:active,
:root[data-theme-layout="arcade"] .slot-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #08040f, inset 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Stage Divider */
body[data-theme-layout="arcade"] .divider,
:root[data-theme-layout="arcade"] .divider {
  color: #00f0ff;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  margin: 1.8rem 0 1.3rem;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

body[data-theme-layout="arcade"] .divider::before,
body[data-theme-layout="arcade"] .divider::after,
:root[data-theme-layout="arcade"] .divider::before,
:root[data-theme-layout="arcade"] .divider::after {
  border-top: 2px solid #ff0077;
}

/* 2-Column Character Roster Grid */
body[data-theme-layout="arcade"] .worlds,
:root[data-theme-layout="arcade"] .worlds {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.15rem;
}

@media (max-width: 580px) {
  body[data-theme-layout="arcade"] .worlds,
  :root[data-theme-layout="arcade"] .worlds {
    grid-template-columns: 1fr;
  }
}

/* Character Select Fighter Card */
body[data-theme-layout="arcade"] .world,
:root[data-theme-layout="arcade"] .world {
  position: relative;
  background: #1e1338;
  border: 3px solid #3d2568;
  border-radius: 4px;
  box-shadow: 0 5px 0 #000000;
  padding: 1.1rem;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
  color: #ffffff;
  transition: transform 0.08s ease, border-color 0.08s ease, box-shadow 0.08s ease;
}

/* 1P Select Floating Indicator */
@keyframes blink-1p {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

body[data-theme-layout="arcade"] .world:hover,
:root[data-theme-layout="arcade"] .world:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: #ffe600;
  background: #281a4b;
  box-shadow: 0 0 20px rgba(255, 230, 0, 0.5), inset 0 0 14px rgba(255, 230, 0, 0.2), 0 5px 0 #000000;
}

body[data-theme-layout="arcade"] .world:hover::before,
:root[data-theme-layout="arcade"] .world:hover::before {
  content: "★ 1P SELECT ★";
  position: absolute;
  top: -12px;
  right: 12px;
  background: #ffe600;
  color: #08040f;
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.5rem;
  border: 2px solid #08040f;
  box-shadow: 0 0 8px #ffe600;
  z-index: 3;
  animation: blink-1p 0.5s steps(2, end) infinite;
}

/* Fighter Icon Slot */
body[data-theme-layout="arcade"] .icon-slot,
:root[data-theme-layout="arcade"] .icon-slot {
  width: 58px;
  height: 58px;
  background: #100720;
  border: 2px solid #00f0ff;
  border-radius: 3px;
  margin-bottom: 0.75rem;
  box-shadow: inset 0 0 6px rgba(0, 240, 255, 0.4);
}

/* Fighter Details */
body[data-theme-layout="arcade"] .wname,
:root[data-theme-layout="arcade"] .wname {
  color: #ffffff;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-shadow: 1px 1px 0 #000000;
}

body[data-theme-layout="arcade"] .badge,
:root[data-theme-layout="arcade"] .badge {
  background: #ff0077;
  color: #08040f;
  font-weight: 700;
  border: 1px solid #ffffff;
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  box-shadow: 0 0 6px rgba(255, 0, 119, 0.6);
}

body[data-theme-layout="arcade"] .blurb,
:root[data-theme-layout="arcade"] .blurb {
  color: #cbb3f5;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.6rem;
  line-height: 1.6;
  margin: 0.45rem 0 0.7rem;
}

body[data-theme-layout="arcade"] .chips,
:root[data-theme-layout="arcade"] .chips {
  gap: 0.35rem;
}

body[data-theme-layout="arcade"] .chip,
:root[data-theme-layout="arcade"] .chip {
  background: #120924;
  color: #00f0ff;
  border: 1px solid #00f0ff;
  font-size: 0.48rem;
  box-shadow: none;
}

/* Coin-Op Bottom HUD Footer */
@keyframes press-start-flash {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.15; }
}

body[data-theme-layout="arcade"] footer,
:root[data-theme-layout="arcade"] footer {
  margin-top: 3rem;
  text-align: center;
  border-top: 2px solid #3d2568;
  padding-top: 1.5rem;
}

body[data-theme-layout="arcade"] footer::before,
:root[data-theme-layout="arcade"] footer::before {
  content: "CREDITS: 04   [INSERT COIN]   FREE PLAY: OFF";
  display: block;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  color: #ffd166;
  text-shadow: 0 0 8px rgba(255, 209, 102, 0.5);
  margin-bottom: 0.85rem;
}

body[data-theme-layout="arcade"] .press,
:root[data-theme-layout="arcade"] .press {
  color: #00f0ff;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  animation: press-start-flash 0.85s steps(1, end) infinite;
  text-shadow: 0 0 10px #00f0ff;
}

/* Accessibility Focus States */
body[data-theme-layout="arcade"] a:focus-visible,
body[data-theme-layout="arcade"] button:focus-visible,
:root[data-theme-layout="arcade"] a:focus-visible,
:root[data-theme-layout="arcade"] button:focus-visible {
  outline: 3px solid #00f0ff;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  body[data-theme-layout="arcade"] *,
  body[data-theme-layout="arcade"] *::before,
  body[data-theme-layout="arcade"] *::after {
    animation: none !important;
    transition: none !important;
  }
}
