/* Modern StepMania Micro CSS with Tailwind Compatibility */

/* Canvas theme - CSS custom properties read by JavaScript for canvas drawing */
:root {
  /* Mine colors */
  --canvas-mine-fill: #ff0000;
  --canvas-mine-inner: #ff6666;
  --canvas-mine-stroke: #ffffff;
  --canvas-mine-danger: rgba(255, 255, 0, 1);
  --canvas-mine-text: #ffffff;

  /* Hold note colors */
  --canvas-hold-active-stroke: #ffffff;
  --canvas-hold-inactive-stroke: #cccccc;
  --canvas-hold-cap: #ff0000;
  --canvas-hold-cap-dropped: #cc0000;
  --canvas-hold-cap-stroke: #ffffff;

  /* Hold gradient - normal state */
  --canvas-hold-gradient-start: #00ff00;
  --canvas-hold-gradient-mid: #ffff00;
  --canvas-hold-gradient-end: #ff0000;

  /* Hold gradient - active state */
  --canvas-hold-active-start: rgba(0, 255, 100, 1);
  --canvas-hold-active-mid: #ffff00;
  --canvas-hold-active-end: #ff8800;

  /* Hold gradient - dropped state */
  --canvas-hold-dropped-start: #ff4444;
  --canvas-hold-dropped-mid: #cc0000;
  --canvas-hold-dropped-end: #880000;

  /* Judgment text */
  --canvas-judgment-fill: #ff4444;
  --canvas-judgment-shadow: black;

  /* ── stepmania: scoped UI palette ─────────────────────────────────
   * Judgment label colors and arrow tints are StepMania-genre
   * conventions (DDR/ITG traditions). Light-mode defaults are
   * saturated for AA on cream/white; dark-mode overrides below
   * restore the neon pastels that read on near-black surfaces. */
  --sm-judgment-marvelous: #7c3aed;
  --sm-judgment-perfect: #2563eb;
  --sm-judgment-great: #15803d;
  --sm-judgment-good: #a16207;
  --sm-judgment-boo: #c2410c;
  --sm-judgment-miss: #dc2626;
  /* Hero percent + fullscreen overlay pops */
  --sm-judgment-perfect-pop: #db2777;
  --sm-judgment-great-pop: #0891b2;
  --sm-percent-lo: #1a73e8;
  --sm-percent-hi: #7c3aed;
  /* DDR arrow lane colors (controls panel) */
  --sm-arrow-left: #dc2626;
  --sm-arrow-right: #a16207;
  --sm-arrow-up: #15803d;
  --sm-arrow-down: #1d4ed8;
  --sm-badge-sky-lo: #0ea5e9;
  --sm-badge-sky-hi: #38bdf8;
  --sm-badge-orange-lo: #f97316;
  --sm-badge-orange-hi: #fb923c;
  --sm-badge-red-lo: #dc2626;
  --sm-badge-red-hi: #ef4444;
  --sm-badge-green-lo: #16a34a;
  --sm-badge-green-hi: #22c55e;
  --sm-badge-purple-lo: #9333ea;
  --sm-badge-purple-hi: #a855f7;
  --sm-badge-teal-lo: #0d9488;
  --sm-badge-teal-hi: #14b8a6;
  /* Zenius browser cyan/blue gradient header */
  --sm-zb-accent-cyan: var(--sm-judgment-great-pop);
  --sm-zb-accent-blue: #3b82f6;
}

/* Dark theme — neon pastels for near-black surfaces */
:root[data-theme='dark'] {
  --sm-judgment-marvelous: #d8b4fe;
  --sm-judgment-perfect: #93c5fd;
  --sm-judgment-great: #86efac;
  --sm-judgment-good: #fde047;
  --sm-judgment-boo: #fdba74;
  --sm-judgment-miss: #fca5a5;
  --sm-judgment-perfect-pop: #f472b6;
  --sm-judgment-great-pop: #00f5ff;
  --sm-percent-lo: #00d4ff;
  --sm-percent-hi: #a855f7;
  --sm-arrow-left: #fca5a5;
  --sm-arrow-right: #fde68a;
  --sm-arrow-up: #86efac;
  --sm-arrow-down: #93c5fd;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --sm-judgment-marvelous: #d8b4fe;
    --sm-judgment-perfect: #93c5fd;
    --sm-judgment-great: #86efac;
    --sm-judgment-good: #fde047;
    --sm-judgment-boo: #fdba74;
    --sm-judgment-miss: #fca5a5;
    --sm-judgment-perfect-pop: #f472b6;
    --sm-judgment-great-pop: #00f5ff;
    --sm-percent-lo: #00d4ff;
    --sm-percent-hi: #a855f7;
    --sm-arrow-left: #fca5a5;
    --sm-arrow-right: #fde68a;
    --sm-arrow-up: #86efac;
    --sm-arrow-down: #93c5fd;
  }
}

/* Route Tailwind sm-arrow utilities through theme tokens */
.text-sm-arrow-left {
  color: var(--sm-arrow-left);
}
.text-sm-arrow-right {
  color: var(--sm-arrow-right);
}
.text-sm-arrow-up {
  color: var(--sm-arrow-up);
}
.text-sm-arrow-down {
  color: var(--sm-arrow-down);
}

/* Base styles that complement Tailwind */
body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text-1);
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom);
}

/* Game area sizing - now responsive with Tailwind */
#sm-micro {
  width: 100%;
  height: 100%;
  max-width: 800px;
  min-height: clamp(220px, 42vh, 480px);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  max-height: 60vh;
  overflow: hidden;
  user-select: none;
  background-size: cover;
  background-position: center;
}

.sm-home {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.55rem;
  padding: 1.1rem 1.25rem;
  overflow-y: auto;
  background: color-mix(in srgb, var(--surface-1) 88%, transparent);
  backdrop-filter: blur(10px);
  text-align: center;
}

.sm-home.is-drop {
  outline: 2px dashed var(--accent-primary);
  outline-offset: -8px;
}

.sm-home-kicker {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
}

.sm-home-title {
  margin: 0;
  font-size: clamp(1.15rem, 3vw, 1.6rem);
  font-weight: 700;
  color: var(--text-1);
}

.sm-home-lead {
  margin: 0 auto;
  max-width: 28rem;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-2);
}

.sm-home-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin: 0.15rem 0 0.35rem;
}

.sm-home-browse {
  align-self: center;
  margin: 0;
  padding: 0.55rem 1.25rem;
  border: 1px solid var(--hairline-accent);
  border-radius: 0.6rem;
  background: linear-gradient(135deg, var(--accent-primary-bg), var(--accent-primary));
  color: var(--text-on-accent);
  font-weight: 600;
  cursor: pointer;
}

.sm-home-browse-secondary {
  background: transparent;
  color: var(--text-1);
}

.sm-home-browse:hover {
  filter: brightness(1.08);
}

.sm-home-browse:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.sm-home-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
  text-align: left;
  min-height: 0;
}

.sm-home-heading {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
}

.sm-home-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.sm-home-chip {
  display: inline-block;
  max-width: 100%;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--hairline-accent);
  background: color-mix(in srgb, var(--surface-0) 40%, transparent);
  color: var(--text-1);
  font-size: 0.75rem;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sm-home-chip:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary-hover);
}

.sm-home-empty {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-3);
}

@media (max-width: 640px) {
  .sm-home-lists {
    grid-template-columns: 1fr;
  }
}

/* Reserve space before custom elements upgrade (CLS). */
zenius-browser:not(:defined),
feedback-button:not(:defined),
difficulty-selector:not(:defined),
share-button:not(:defined) {
  display: inline-block;
  min-width: 6.5rem;
  height: 2.5rem;
  vertical-align: middle;
}

/* Keep toolbar hosts inline after upgrade (CE default can be block). */
zenius-browser,
feedback-button,
difficulty-selector,
share-button {
  display: inline-block;
  vertical-align: middle;
}

step-button:not(:defined) {
  display: inline-block;
  width: 60px;
  height: 60px;
  vertical-align: middle;
}

score-panel:not(:defined) {
  display: block;
  min-height: 12rem;
}

/* Logo styling */
#sm-micro #logo {
  background: transparent url(/stepmania/img/logo.png) 0 0 no-repeat;
  background-size: contain;
  display: block;
  width: 155px;
  height: 30px;
}

/* Canvas styling for smooth animations */
#sm-micro canvas {
  border-radius: 1rem;
  max-width: 100%;
  max-height: 100%;
}

/* Button hover effects with neon glow */
.button:hover {
  box-shadow: 0 0 20px currentColor;
  transform: scale(1.1);
}

.button:active {
  transform: scale(0.95);
}

/* Smooth transitions for all interactive elements */
.button,
#logo,
#alert {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Uniform button heights for consistent layout */

/* Score animation effects */
#percent-score {
  text-shadow: 0 0 10px currentColor;
}

/* Score panel optimizations for screens < 1024px */
@media (max-width: 1024px) {
  /* Make score panel full width and stack below game on tablets */
  .lg\\:w-80 {
    width: 100% !important;
    max-width: 600px;
    margin: 0 auto;
  }

  /* Adjust score panel layout for horizontal display */
  .score-horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
  }

  /* Compact score display on smaller screens */
  .score-compact {
    padding: 0.75rem !important;
  }

  /* Smaller text on compact displays */
  .score-compact h2 {
    font-size: 1.25rem !important;
    margin-bottom: 0.5rem !important;
  }

  /* Reduce performance controls size */
  .performance-compact {
    padding: 0.5rem !important;
  }
}

/* Mobile optimizations */
@media (max-width: 768px) {
  #sm-micro {
    width: 100%;
    height: 100%;
    min-height: 120px;
    max-height: 55vh;
  }

  /* Stack score items vertically on mobile */
  .score-horizontal {
    flex-direction: column;
    gap: 0.75rem;
  }

  /* Ensure step buttons are properly sized on mobile */
  step-button {
    --button-size: 44px;
  }

  /* Add safe area padding for mobile devices */
  .audio-controls-container {
    padding-bottom: env(safe-area-inset-bottom, 20px);
  }
}

/* Mobile-specific score panel styles */
body.mobile .score-panel {
  position: fixed;
  bottom: -100%;
  left: 0;
  right: 0;
  z-index: 50;
  transition: bottom 0.3s ease-in-out;
  max-height: 60vh;
  overflow-y: auto;
  border-radius: 1rem 1rem 0 0;
  margin: 0;
  width: 100%;
}

body.mobile .score-panel.show {
  bottom: 0;
}

/* Score toggle button for mobile */
body.mobile .score-toggle {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 60;
  background: var(--accent-primary-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--hairline-accent);
  color: var(--text-on-accent);
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  font-weight: 600;
}

body.mobile .score-toggle:hover {
  background: var(--accent-primary);
  transform: scale(1.05);
}

body.mobile .score-toggle:active {
  transform: scale(0.95);
}

/* Hide score panel by default on mobile */
body.mobile .score-panel:not(.show) {
  display: none;
}

/* Make score panel visible on non-mobile */
body:not(.mobile) .score-toggle {
  display: none;
}

@media (max-width: 640px) {
  #sm-micro {
    width: 100%;
    height: 100%;
    min-height: 100px;
    max-height: 50vh;
  }

  .button {
    width: 60px !important;
    height: 60px !important;
    /* Ensure touch targets are at least 44px as per iOS guidelines */
    min-width: 44px !important;
    min-height: 44px !important;
  }

  /* Further compact score panel on very small screens */
  .score-compact {
    padding: 0.5rem !important;
  }

  .score-compact h2 {
    font-size: 1.125rem !important;
  }

  /* Reduce step button container size on very small screens */
  .step-button-container {
    width: 200px !important;
    height: 120px !important;
  }
}

/* Songs / Share / Feedback / Restart / Difficulty share one pill radius.
   .zenius-browser-btn, .restart-btn, and .difficulty-select all hard-code
   0.75rem. <share-button> and <feedback-button> read border-radius from
   --radius, which brand.css sets to 4px — much sharper than the other
   controls. Override it on both hosts so it cascades through shadow DOM. */
share-button,
feedback-button {
  --radius: 0.75rem;
}

/* Restart button — share the same pill shape as .zenius-browser-btn and
   the <feedback-button> so the Songs / Feedback / Restart row reads as
   one consistent control group. Mobile collapses to an icon-only square,
   matching the other two buttons. */
.restart-btn {
  background: linear-gradient(to right, var(--accent-primary), var(--accent-primary-bg));
  color: var(--text-on-accent);
  font-weight: bold;
  padding: 0.5rem 1.5rem;
  border-radius: 0.75rem;
  transition: all 0.2s;
  transform: scale(1);
  border: none;
  cursor: pointer;
  font-size: 14px;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  line-height: 1.2;
  white-space: nowrap;
}

.restart-btn:hover {
  background: linear-gradient(
    to right,
    var(--accent-primary-hover),
    var(--accent-primary-bg-hover)
  );
  transform: scale(1.05);
}

.restart-btn:active {
  transform: scale(0.95);
}

.restart-btn:focus-visible {
  outline: 2px solid var(--focus-ring-inner);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--focus-ring-outer);
}

.restart-btn .restart-icon-only {
  display: none;
}

.restart-btn .restart-text-label {
  display: inline;
}

/* Keyboard remaps and the gamepad-connected chip are desktop-only.
   Mobile play is on-screen arrows; those controls just crowd the toolbar. */
@media (max-width: 768px) {
  #settings-btn,
  #gamepad-status {
    display: none !important;
  }
}

body.mobile #settings-btn,
body.mobile #gamepad-status {
  display: none !important;
}

@media (max-width: 768px) {
  .restart-btn {
    padding: 0.25rem 0.75rem;
    font-size: 12px;
    height: 2rem;
  }
}

@media (max-width: 640px) {
  .restart-btn {
    padding: 0.5rem;
    min-width: 2.5rem;
    min-height: 2.5rem;
  }

  .restart-btn .restart-text-label {
    display: none;
  }

  .restart-btn .restart-icon-only {
    display: inline-block;
    font-size: 1.25rem;
  }
}

/* Extra small screen optimizations */
@media (max-width: 480px) {
  #sm-micro {
    min-height: 80px;
    max-height: 40vh;
  }

  .step-button-container {
    width: 180px !important;
    height: 100px !important;
  }

  /* Smaller step buttons on very small screens */
  step-button {
    --button-size: 40px;
  }
}

/* Custom animations for game elements */
@keyframes pulse-neon {
  0%,
  100% {
    box-shadow: 0 0 5px currentColor;
  }
  50% {
    box-shadow: 0 0 20px currentColor, 0 0 30px currentColor;
  }
}

.pulse-neon {
  animation: pulse-neon 2s ease-in-out infinite;
}

/* Backdrop blur support */
@supports (backdrop-filter: blur(10px)) {
  .backdrop-blur-custom {
    backdrop-filter: blur(10px);
  }
}

/* High contrast mode improvements */
@media (prefers-contrast: high) {
  .button {
    border-width: 3px;
  }
}

/* Reduced motion support */
/* Button pressed state for visual feedback */
.button-pressed {
  transform: scale(0.85) !important;
  box-shadow: inset 0 4px 8px color-mix(in srgb, var(--pure-black) 30%, transparent) !important;
  filter: brightness(0.8) !important;
}

@media (prefers-reduced-motion: reduce) {
  .button,
  #logo,
  #alert,
  .pulse-neon {
    animation: none;
    transition: none;
  }
}

/* Main container claims the leftover viewport height via flex layout on
   the <body> (see index.html). The `padding-bottom` keeps clear of the
   home indicator / safe-area on iOS. Flex direction is left to the
   Tailwind classes on the element so we don't fight them here. */
.main-game-container {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Step button container styling */
.step-button-container {
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

/* Audio controls container */
.audio-controls-container {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

/* Ensure audio element doesn't interfere with layout */
.audio-controls-container audio {
  position: relative;
  z-index: 1;
  width: 100%;
}

/* Game Over Modal - host element styles */
game-over-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--surface-0) 70%, transparent); /* surface-0 @ 0.7 */
  z-index: 50;
}

game-over-modal.visible {
  display: flex;
}

/* Utility class for hiding elements */
.hidden {
  display: none !important;
}

/* Allow responsive show/hide to work properly with Tailwind */
.show-lg-only {
  display: none;
}

@media (min-width: 1024px) {
  .show-lg-only {
    display: block;
  }
}

/* Gamepad debug panel */
.gamepad-debug {
  position: fixed;
  top: 20px;
  right: 20px;
  background: color-mix(in srgb, var(--surface-0) 80%, transparent); /* surface-0 @ 0.8 */
  color: var(--success);
  padding: 10px;
  border-radius: 5px;
  font-family: monospace;
  font-size: 12px;
  z-index: 1000;
  pointer-events: none;
}

/* Fullscreen toggle button */
#fullscreen-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  cursor: pointer;
  color: var(--accent-primary-hover);
}

#fullscreen-toggle:hover {
  color: var(--text-1);
  box-shadow: 0 0 15px color-mix(in srgb, var(--accent-primary) 50%, transparent); /* accent-primary @ 0.5 */
}

/* Hide button text, show only icon */
#fullscreen-toggle .fullscreen-icon {
  font-size: 1.25rem;
}

#fullscreen-toggle .exit-fullscreen-icon {
  font-size: 1.25rem;
}

/* Fullscreen mode icon toggle - when the fullscreen button is inside fullscreen element */
#sm-micro:fullscreen ~ * #fullscreen-toggle .fullscreen-icon,
#sm-micro:-webkit-full-screen ~ * #fullscreen-toggle .fullscreen-icon {
  display: none;
}

#sm-micro:fullscreen ~ * #fullscreen-toggle .exit-fullscreen-icon,
#sm-micro:-webkit-full-screen ~ * #fullscreen-toggle .exit-fullscreen-icon {
  display: inline !important;
}

/* Game container fullscreen styles */
#sm-micro:fullscreen,
#sm-micro:-webkit-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background-color: var(--surface-0) !important;
  background-size: cover !important;
  background-position: center !important;
}

/* Canvas fills the fullscreen container */
#sm-micro:fullscreen canvas,
#sm-micro:-webkit-full-screen canvas {
  width: auto !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  object-fit: contain !important;
}

/* Hide video conversion status in fullscreen */
#sm-micro:fullscreen #video-conversion-status,
#sm-micro:-webkit-full-screen #video-conversion-status {
  top: 10px;
  right: 10px;
}

/* ============================================
   FULLSCREEN TOGGLE BUTTON (inside canvas)
   ============================================ */

.fullscreen-toggle-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 100;
  /* On-canvas scrim: pure black @ 0.5 keeps the icon legible against
     bright video/song backgrounds; brand surface-0 would tint cool. */
  background: color-mix(in srgb, var(--pure-black) 50%, transparent);
  backdrop-filter: blur(4px);
  border: 1px solid var(--hairline-strong);
  color: var(--text-2);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.25rem;
  opacity: 0;
  pointer-events: none;
}

/* Show on hover of the game container */
#sm-micro:hover .fullscreen-toggle-btn {
  opacity: 1;
  pointer-events: auto;
}

.fullscreen-toggle-btn:hover {
  background: color-mix(in srgb, var(--accent-primary) 70%, transparent); /* accent-primary @ 0.7 */
  border-color: color-mix(
    in srgb,
    var(--accent-primary) 50%,
    transparent
  ); /* accent-primary @ 0.5 */
  color: var(--text-1);
  transform: scale(1.1);
  box-shadow: 0 0 20px color-mix(in srgb, var(--accent-primary) 50%, transparent); /* accent-primary @ 0.5 */
}

.fullscreen-toggle-btn:active {
  transform: scale(0.95);
}

/* Always show in fullscreen mode */
#sm-micro:fullscreen .fullscreen-toggle-btn,
#sm-micro:-webkit-full-screen .fullscreen-toggle-btn {
  opacity: 0.3;
  pointer-events: auto;
}

#sm-micro:fullscreen .fullscreen-toggle-btn:hover,
#sm-micro:-webkit-full-screen .fullscreen-toggle-btn:hover {
  opacity: 1;
}

/* ============================================
   FULLSCREEN-ONLY CONTROLS (step buttons)
   ============================================ */

/* Fullscreen controls - hidden by default, shown via JS when in fullscreen */
#fullscreen-controls,
#fullscreen-score {
  display: none !important;
}

#fullscreen-controls.visible {
  display: block !important;
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
}

@media (min-height: 800px) {
  #fullscreen-controls.visible {
    bottom: 120px;
  }
}

#fullscreen-score.visible {
  display: block !important;
}

/* Fullscreen Score Overlay */
.fullscreen-score-overlay {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 100;
  background: color-mix(in srgb, var(--surface-0) 70%, transparent); /* surface-0 @ 0.7 */
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 16px 20px;
  border: 1px solid var(--hairline-accent);
  min-width: 140px;
  text-align: center;
}

.fs-score-percent {
  font-size: 2rem;
  font-weight: bold;
  color: var(--sm-judgment-perfect-pop);
  text-shadow: 0 0 10px color-mix(in srgb, var(--sm-judgment-perfect-pop) 50%, transparent);
  margin-bottom: 12px;
}

.fs-score-stats {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.fs-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.fs-stat-label {
  font-size: 0.7rem;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fs-stat-value {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--sm-judgment-great-pop);
}

/* Larger score on bigger screens */
@media (min-width: 1200px) {
  .fullscreen-score-overlay {
    padding: 20px 28px;
    min-width: 180px;
  }

  .fs-score-percent {
    font-size: 2.5rem;
  }

  .fs-stat-value {
    font-size: 1.3rem;
  }
}

.fullscreen-step-buttons {
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: center;
  padding: 20px 32px;
  background: var(--scrim); /* surface-0 @ 0.6 */
  backdrop-filter: blur(8px);
  border-radius: 20px;
  border: 1px solid var(--hairline-strong);
}

.fullscreen-step-buttons step-button {
  --button-size: 90px;
}

/* Even larger on bigger screens */
@media (min-width: 1200px) {
  .fullscreen-step-buttons step-button {
    --button-size: 110px;
  }

  .fullscreen-step-buttons {
    gap: 32px;
    padding: 24px 40px;
  }
}

/* Fullscreen exit button - top right corner */
.fullscreen-exit-button {
  display: none;
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 200;
  background: color-mix(in srgb, var(--danger) 80%, transparent); /* danger @ 0.8 */
  backdrop-filter: blur(4px);
  color: var(--text-on-accent);
  border: 1px solid var(--hairline-strong);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fullscreen-exit-button.visible {
  display: flex;
  align-items: center;
  justify-content: center;
}

.fullscreen-exit-button:hover {
  background: var(--danger);
  transform: scale(1.1);
  box-shadow: 0 0 20px color-mix(in srgb, var(--danger) 50%, transparent); /* danger @ 0.5 */
}
