/* THE MUMMY — EGYPTIAN TEMPLE SKIN */

@font-face {
  font-family: 'FontNotas';
  src: url('../fonts/fontnotas.ttf') format('truetype');
  font-display: swap;
}

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  --stone-bg: #0d1118;
  --stone-deep: #111620;
  --stone-panel: #161d2a;
  --stone-mid: #1e2838;
  --stone-sand: #c8a96e;
  --stone-light: #e8d5a3;
  --gold: #f0c040;
  --gold-dark: #c8861a;
  --teal: #3dd6c8;
  --teal-dark: #1aa898;
  --teal-glow: rgba(61, 214, 200, 0.35);
  --text-main: #ede0c0;
  --text-muted: #8a9ab5;
  --danger: #e05555;
  --success: #4dcc7a;
  --radius-lg: 18px;
  --radius-md: 11px;
}

/* Reset */
html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'DM Sans', 'Segoe UI', sans-serif;
  color: var(--text-main);
  background: var(--stone-bg);
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(61, 214, 200, 0.08), transparent 55%),
    radial-gradient(ellipse at 20% 100%, rgba(240, 192, 64, 0.06), transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(61, 214, 200, 0.05), transparent 50%);
}

* {
  box-sizing: border-box;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* ── CONFETTI CANVAS ── */
#confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
}

/* ── UTILITIES ── */
.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

.bounce-hover {
  transition: transform 0.1s;
}

.bounce-hover:active {
  transform: scale(0.95);
}

/* ── TOPBAR ── */
.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  pointer-events: none;
}

.logo-area,
.controls {
  pointer-events: auto;
}

.logo-area h1 {
  margin: 0;
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  font-size: 1.35rem;
  background: var(--stone-panel);
  border: 1px solid rgba(240, 192, 64, 0.35);
  color: var(--gold);
  padding: 8px 18px;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(240, 192, 64, 0.15), inset 0 0 12px rgba(0, 0, 0, 0.3);
  text-shadow: 0 0 16px rgba(240, 192, 64, 0.5);
  letter-spacing: .12em;
}

.btn-icon {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: var(--stone-panel);
  border: 1px solid rgba(61, 214, 200, 0.3);
  color: var(--teal);
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(61, 214, 200, 0.1);
  transition: box-shadow .2s, border-color .2s;
}

.btn-icon:hover {
  border-color: var(--teal);
  box-shadow: 0 0 18px rgba(61, 214, 200, 0.35);
}

.controls {
  display: flex;
  gap: 8px;
}

/* ── GAME AREA ── */
.stage-full {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.stage-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.game-container-border {
  padding: 10px;
  background: #0a0e14;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(61, 214, 200, 0.2);
  box-shadow:
    0 0 50px rgba(61, 214, 200, 0.1),
    0 20px 0 #070a0f,
    inset 0 0 20px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 1;
}

canvas#game {
  border-radius: 10px;
  background: #111820;
  display: block;
  max-width: 95vw;
  max-height: 75vh;
}

/* ── HUD ── */
.hud-top-center {
  position: absolute;
  top: 80px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 5;
  pointer-events: none;
}

.hud-bubble {
  background: var(--stone-panel);
  border: 1px solid rgba(240, 192, 64, 0.3);
  padding: 7px 18px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
  box-shadow: 0 0 18px rgba(240, 192, 64, 0.1);
}

.bubble-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .14em;
  margin-bottom: 4px;
  text-shadow: 0 0 8px rgba(240, 192, 64, 0.5);
  font-family: 'Bebas Neue', sans-serif;
}

.collected-row {
  display: flex;
  gap: 8px;
}

.collected-fig {
  font-family: 'FontNotas', monospace;
  font-size: 1.8rem;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.collected-fig:not(.pending) {
  background: rgba(61, 214, 200, 0.12);
  color: var(--teal);
  border: 1px solid var(--teal);
  transform: scale(1.1);
  box-shadow: 0 0 12px var(--teal-glow);
}

/* Beat Indicator */
.beat-indicator {
  position: absolute;
  top: 80px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.beat-ring {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(61, 214, 200, 0.35);
  background: rgba(61, 214, 200, 0.03);
  transition: all 0.1s;
}

.beat-ring.pulse {
  transform: scale(1.25);
  border-color: var(--teal);
  background: rgba(61, 214, 200, 0.15);
  box-shadow: 0 0 14px var(--teal-glow);
}

.beat-count {
  display: flex;
  gap: 4px;
}

.beat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.beat-dot.active {
  background: var(--teal);
  border-color: var(--teal);
  box-shadow: 0 0 6px var(--teal-glow);
  transform: scale(1.2);
}

/* Bottom HUD */
.canvas-hud {
  position: absolute;
  bottom: 20px;
  width: 90%;
  max-width: 600px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: none;
  z-index: 5;
}

.hud-panel {
  background: var(--stone-panel);
  border: 1px solid rgba(240, 192, 64, 0.25);
  padding: 7px 14px;
  border-radius: var(--radius-md);
  box-shadow: 0 0 14px rgba(240, 192, 64, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
  min-width: 80px;
}

.hud-label {
  font-size: 0.72rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--gold);
  text-shadow: 0 0 6px rgba(240, 192, 64, 0.4);
  font-family: 'Bebas Neue', sans-serif;
}

#lives {
  font-size: 1.1rem;
  color: var(--danger);
  letter-spacing: 2px;
}

#time {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  font-size: 1.4rem;
  color: var(--text-main);
  letter-spacing: .08em;
}

.progress-pips {
  display: flex;
  gap: 5px;
  margin-top: 4px;
}

.pip {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.pip.filled {
  background: var(--teal);
  border-color: var(--teal-dark);
  box-shadow: 0 0 8px var(--teal-glow);
  transform: scale(1.1);
}

/* ── OVERLAYS ── */
.overlay,
.pause-overlay,
.results-screen,
.countdown-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(5, 8, 14, 0.82);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
}

/* ── LOGO en el menú ── */
.menu-logo {
  width: min(340px, 90%);
  margin: 0 auto 8px;
  display: block;
  filter: drop-shadow(0 8px 32px rgba(61, 214, 200, 0.25)) drop-shadow(0 0 60px rgba(240, 192, 64, 0.15));
  animation: float 4s ease-in-out infinite;
}

/* Panel base */
.panel {
  width: 90%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--stone-panel);
  border: 1px solid rgba(240, 192, 64, 0.25);
  border-radius: var(--radius-lg);
  padding: 20px 24px 32px;
  text-align: center;
  box-shadow:
    0 0 80px rgba(61, 214, 200, 0.08),
    0 40px 80px rgba(0, 0, 0, 0.7);
  position: relative;
}

/* Borde interior grabado */
.panel::before {
  content: '';
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(240, 192, 64, 0.1);
  border-radius: 12px;
  pointer-events: none;
}

/* Decoración jeroglífica inferior */
.panel::after {
  content: '𓂀  𓆣  𓂀';
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: .9rem;
  color: rgba(240, 192, 64, 0.18);
  pointer-events: none;
  letter-spacing: .4em;
}

.panel-header {
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}

/* Ojo de Horus en lugar del emoji */
.chibi-explorer-icon {
  font-size: 3rem;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(240, 192, 64, 0.5));
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(-8px)
  }
}

h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  font-weight: 400;
  margin: 0 0 6px;
  color: var(--gold);
  text-shadow: 0 0 24px rgba(240, 192, 64, 0.5);
  letter-spacing: .14em;
}

.ov-sub {
  font-size: .88rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  font-weight: 600;
  line-height: 1.45;
  position: relative;
  z-index: 1;
}

.menu-section {
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.menu-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: .9rem;
  text-transform: uppercase;
  color: var(--teal);
  letter-spacing: .18em;
  border-bottom: 1px solid rgba(61, 214, 200, 0.2);
  display: inline-block;
  padding-bottom: 3px;
  margin-bottom: 10px;
  text-shadow: 0 0 8px var(--teal-glow);
}

/* Customizer */
.customizer {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.customizer label {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(240, 192, 64, 0.2);
  color: var(--text-main);
  padding: 5px 12px;
  border-radius: 6px;
  font-weight: 700;
  font-size: .85rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

input[type="color"] {
  border: none;
  width: 28px;
  height: 28px;
  cursor: pointer;
  background: none;
  padding: 0;
  border-radius: 4px;
}

/* ── MODE BUTTONS ── */
.big-btn {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 11px 14px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.15s, border-color .2s, background .2s;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.big-btn:active {
  transform: translateY(2px);
  box-shadow: none !important;
}

.big-btn.success {
  border-color: rgba(77, 204, 122, 0.3);
  box-shadow: 0 0 14px rgba(77, 204, 122, 0.1), 0 3px 0 rgba(0, 0, 0, 0.4);
}

.big-btn.success:hover {
  background: rgba(77, 204, 122, 0.08);
  border-color: var(--success);
  box-shadow: 0 0 22px rgba(77, 204, 122, 0.2), 0 3px 0 rgba(0, 0, 0, 0.4);
}

.big-btn.primary {
  border-color: rgba(240, 192, 64, 0.3);
  box-shadow: 0 0 14px rgba(240, 192, 64, 0.1), 0 3px 0 rgba(0, 0, 0, 0.4);
}

.big-btn.primary:hover {
  background: rgba(240, 192, 64, 0.07);
  border-color: var(--gold);
  box-shadow: 0 0 22px rgba(240, 192, 64, 0.2), 0 3px 0 rgba(0, 0, 0, 0.4);
}

.big-btn.secondary {
  border-color: rgba(61, 214, 200, 0.3);
  box-shadow: 0 0 14px rgba(61, 214, 200, 0.08), 0 3px 0 rgba(0, 0, 0, 0.4);
}

.big-btn.secondary:hover {
  background: rgba(61, 214, 200, 0.07);
  border-color: var(--teal);
  box-shadow: 0 0 22px rgba(61, 214, 200, 0.2), 0 3px 0 rgba(0, 0, 0, 0.4);
}

.btn-emoji {
  font-size: 1.8rem;
  margin-right: 12px;
  filter: drop-shadow(0 0 5px rgba(240, 192, 64, 0.35));
}

.btn-text strong {
  display: block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: .1em;
}

.btn-text .btn-desc {
  font-size: .8rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Settings */
.settings-box {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(240, 192, 64, 0.15);
  padding: 10px 12px;
  border-radius: var(--radius-md);
}

.settings-trigger {
  cursor: pointer;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .1em;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
}

.settings-grid {
  display: grid;
  gap: 12px;
  margin-top: 10px;
  text-align: left;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

legend {
  font-size: .85rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--teal);
  margin-bottom: 6px;
  font-family: 'Bebas Neue', sans-serif;
}

.radio-group,
.suboptions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.radio-group label,
.suboptions label {
  font-size: .84rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.tempo-setting label {
  font-size: .84rem;
  color: var(--text-muted);
  font-weight: 700;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--teal);
  margin-top: 6px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .84rem;
  color: var(--text-main);
}

input[type="checkbox"] {
  accent-color: var(--teal);
}

/* Scorebox */
.scorebox {
  margin-top: 16px;
}

.score-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--gold);
  margin-bottom: 10px;
  text-shadow: 0 0 12px rgba(240, 192, 64, 0.5);
  letter-spacing: .12em;
}

.score-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(240, 192, 64, 0.15);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 12px;
}

.score-row {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-main);
  padding: 4px 0;
}

.score-win {
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--teal);
  margin-bottom: 14px;
  text-shadow: 0 0 16px var(--teal-glow);
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: .1em;
}

/* ── PAUSE ── */
.pause-panel {
  max-width: 340px;
}

.pause-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  font-weight: 400;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(240, 192, 64, 0.5);
  margin-bottom: 8px;
  letter-spacing: .14em;
}

.pause-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

/* ── Figuras toggles ── */
.figuras-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.toggle-figura {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  /* Momia surface */
  border: 1px solid transparent;
  transition: border-color 0.15s, background 0.15s;
}

.toggle-figura:has(input:checked) {
  border-color: var(--gold);
  background: rgba(240, 192, 64, 0.15);
}

.toggle-figura input {
  display: none;
}

.figura-label {
  font-size: 2rem;
  line-height: 1;
}

.fontnotas {
  font-family: 'FontNotas', sans-serif;
}

/* Generic btn */
.btn {
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  transition: all .2s;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.07);
}

.btn.primary {
  border-color: rgba(240, 192, 64, 0.4);
  color: var(--gold);
}

.btn.primary:hover {
  background: rgba(240, 192, 64, 0.08);
  box-shadow: 0 0 16px rgba(240, 192, 64, 0.2);
}

.btn.secondary {
  border-color: rgba(61, 214, 200, 0.35);
  color: var(--teal);
}

.btn.secondary:hover {
  background: rgba(61, 214, 200, 0.07);
  box-shadow: 0 0 16px rgba(61, 214, 200, 0.2);
}

.btn.success {
  border-color: rgba(77, 204, 122, 0.35);
  color: var(--success);
}

.btn.success:hover {
  background: rgba(77, 204, 122, 0.08);
  box-shadow: 0 0 16px rgba(77, 204, 122, 0.2);
}

/* ── RESULTS ── */
.results-panel {
  max-width: 460px;
}

.results-header {
  position: relative;
  z-index: 1;
  margin-bottom: 16px;
}

.results-emoji {
  font-size: 4.5rem;
  animation: popIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 0 16px rgba(240, 192, 64, 0.5));
}

.results-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  font-weight: 400;
  color: var(--gold);
  text-shadow: 0 0 24px rgba(240, 192, 64, 0.5);
  margin: 8px 0 0;
  letter-spacing: .14em;
}

.results-stats-container {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.stat-box {
  border: 1px solid rgba(240, 192, 64, 0.2);
  background: rgba(0, 0, 0, 0.2);
  padding: 10px 18px;
  border-radius: 10px;
  min-width: 90px;
}

.stat-label {
  font-size: .8rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--gold);
  display: block;
  margin-bottom: 4px;
  font-family: 'Bebas Neue', sans-serif;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 400;
  font-family: 'Bebas Neue', sans-serif;
  color: var(--text-main);
  letter-spacing: .06em;
}

.pattern-review {
  position: relative;
  z-index: 1;
  text-align: center;
}

.result-pattern {
  font-family: 'FontNotas', monospace;
  font-size: 2.5rem;
  letter-spacing: 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px dashed rgba(61, 214, 200, 0.25);
  padding: 10px;
  border-radius: 10px;
  margin: 10px 0 20px;
  display: block;
  color: var(--teal);
  text-shadow: 0 0 12px var(--teal-glow);
}

.results-buttons {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@keyframes popIn {
  from {
    transform: scale(0);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ── COUNTDOWN ── */
.countdown-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.countdown-listen-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--teal);
  text-shadow: 0 0 20px var(--teal-glow);
  letter-spacing: .18em;
  animation: float 2s ease-in-out infinite;
}

.countdown-pattern {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.countdown-fig {
  font-family: 'FontNotas', monospace;
  font-size: 2.8rem;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(61, 214, 200, 0.04);
  color: rgba(61, 214, 200, 0.2);
  border-radius: 8px;
  border: 1px dashed rgba(61, 214, 200, 0.2);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.countdown-fig.beat-active {
  background: rgba(240, 192, 64, 0.15);
  color: var(--gold);
  border: 1px solid var(--gold);
  transform: scale(1.2);
  box-shadow: 0 0 24px rgba(240, 192, 64, 0.4);
}

.countdown-number {
  font-size: 9rem;
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  color: var(--gold);
  text-shadow: 0 0 50px rgba(240, 192, 64, 0.7), 4px 4px 0 rgba(0, 0, 0, 0.6);
  letter-spacing: .05em;
  animation: popIn 0.5s;
}

/* ── TOASTS ── */
.toast-container {
  position: fixed;
  bottom: 80px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  pointer-events: none;
  z-index: 99;
}

.toast {
  background: var(--stone-panel);
  border: 1px solid rgba(240, 192, 64, 0.3);
  color: var(--text-main);
  padding: 9px 22px;
  border-radius: 8px;
  margin-top: 8px;
  font-weight: 700;
  box-shadow: 0 0 18px rgba(240, 192, 64, 0.1);
  animation: slideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.ok {
  border-color: rgba(77, 204, 122, 0.4);
  color: var(--success);
  box-shadow: 0 0 18px rgba(77, 204, 122, 0.15);
}

.toast.warn {
  border-color: rgba(224, 85, 85, 0.4);
  color: var(--danger);
  box-shadow: 0 0 18px rgba(224, 85, 85, 0.15);
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Replay pulse */
.listening-pulse {
  animation: ear-pulse 0.5s ease-in-out 3;
  border-color: var(--teal) !important;
  box-shadow: 0 0 20px var(--teal-glow) !important;
}

@keyframes ear-pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.25);
  }
}

/* Layout helpers */
.menu-buttons.column {
  display: flex;
  flex-direction: column;
}

.menu-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── MOBILE ── */
@media (max-height: 600px) {
  .topbar {
    height: 50px;
  }

  .logo-area h1 {
    font-size: 1rem;
  }

  .game-container-border {
    padding: 7px;
  }

  .hud-top-center {
    top: 55px;
  }

  .beat-indicator {
    top: 55px;
  }

  .canvas-hud {
    bottom: 10px;
  }

  .btn-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
}

/* ── Premium Locks ── */
.locked-premium {
  position: relative !important;
  opacity: 0.65;
  cursor: not-allowed !important;
}

.locked-premium>* {
  pointer-events: none;
}

.locked-premium::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background-color: rgba(255, 255, 255, 0.45);
  mask-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 2C9.243 2 7 4.243 7 7V10H6V20H18V10H17V7C17 4.243 14.757 2 12 2ZM9 7C9 5.346 10.346 4 12 4C13.654 4 15 5.346 15 7V10H9V7ZM12 17C10.895 17 10 16.105 10 15C10 13.895 10.895 13 12 13C13.105 13 14 13.895 14 15C14 16.105 13.105 17 12 17Z" fill="white"/></svg>');
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 2C9.243 2 7 4.243 7 7V10H6V20H18V10H17V7C17 4.243 14.757 2 12 2ZM9 7C9 5.346 10.346 4 12 4C13.654 4 15 5.346 15 7V10H9V7ZM12 17C10.895 17 10 16.105 10 15C10 13.895 10.895 13 12 13C13.105 13 14 13.895 14 15C14 16.105 13.105 17 12 17Z" fill="white"/></svg>');
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-position: center;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

/* For form inputs and labels specifically */
label:has(input.locked-premium) {
  opacity: 0.65;
  cursor: not-allowed !important;
  position: relative;
}

label:has(input.locked-premium)::after {
  content: '🔒';
  position: absolute;
  top: 50%;
  right: -10px;
  transform: translate(0, -50%);
  font-size: 1rem;
  z-index: 10;
  pointer-events: none;
}