:root {
  color-scheme: dark;
  --bg: #1a0b2e;
  --surface: rgba(36, 17, 61, 0.86);
  --surface-strong: rgba(56, 23, 89, 0.95);
  --text: #ffffff;
  --muted: #bda4d6;
  --accent: #00e5ff;
  --accent-2: #ff4785;
  --accent-3: #ffc82c;
  --danger: #ff3366;
  --warning: #ffb400;
  --border: rgba(255, 255, 255, 0.14);
  --shadow: 0 24px 60px rgba(26, 11, 46, 0.5);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #e0f2fe;
  --surface: rgba(255, 255, 255, 0.95);
  --surface-strong: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --accent: #0ea5e9;
  --accent-2: #f43f5e;
  --accent-3: #f59e0b;
  --danger: #ef4444;
  --warning: #f59e0b;
  --border: rgba(15, 23, 42, 0.1);
  --shadow: 0 20px 55px rgba(14, 165, 233, 0.15);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Nunito", "Comic Sans MS", "Chalkboard SE", "Marker Felt", sans-serif;
  background: linear-gradient(135deg, var(--bg) 0%, var(--surface-strong) 100%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(94, 227, 200, 0.16), transparent 30%);
  pointer-events: none;
  z-index: -1;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(94, 227, 200, 0.35);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #03111a;
  padding: 0.7rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.site-header,
.section-card,
.panel,
.dialog-content,
.loading-card {
  backdrop-filter: blur(22px);
}

.background-cloud,
.background-orb,
.starfield {
  position: fixed;
  pointer-events: none;
  z-index: -1;
}

.background-cloud {
  width: 18rem;
  height: 6.4rem;
  background: rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  filter: blur(4px);
  animation: drift 16s ease-in-out infinite alternate;
}

.cloud-one { top: 12%; left: -5%; }
.cloud-two { top: 38%; right: -2%; animation-duration: 20s; }

.background-orb {
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  filter: blur(24px);
  opacity: 0.35;
  animation: pulse 10s ease-in-out infinite;
}

.orb-one { top: 6%; right: 8%; background: var(--accent-2); }
.orb-two { bottom: 10%; left: 4%; background: var(--accent-3); animation-delay: 2s; }

.starfield {
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.9) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.2;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.15rem clamp(1rem, 3vw, 2rem);
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 16, 33, 0.76);
  border-bottom: 1px solid var(--border);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  font-size: 1.25rem;
  box-shadow: 0 14px 26px rgba(94, 227, 200, 0.24);
}

.eyebrow {
  margin: 0 0 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.72rem;
  color: var(--accent);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.header-actions,
.hero-actions,
.support-links,
.game-actions,
.chip-group,
.switch {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  align-items: center;
}

.button {
  border: 0;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 400ms ease, background 400ms ease, filter 400ms ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 26px rgba(6, 12, 25, 0.18);
}

.button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.22);
  transform: scale(0);
  border-radius: 50%;
  opacity: 0;
}

.button:active::after {
  animation: ripple 0.4s ease-out;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 20px 40px rgba(6, 12, 25, 0.35);
  filter: brightness(1.1);
  animation: jelly 0.5s ease;
}

.button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
}

.button.secondary {
  background: var(--surface-strong);
  color: var(--text);
  border: 1px solid var(--border);
}

main {
  padding: clamp(1rem, 3vw, 2rem);
  display: grid;
  gap: 1.2rem;
}

.section-card,
.panel,
.dialog-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 1rem;
  padding: clamp(1.2rem, 3vw, 2.3rem);
  min-height: 27rem;
  align-items: center;
}

.hero-copy h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.7rem);
  margin-bottom: 0.8rem;
}

.hero-copy p {
  color: var(--muted);
  max-width: 44rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.badge-pill,
.reward-pill,
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  color: var(--text);
}

.hero-card {
  padding: 1.2rem;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(94, 227, 200, 0.2), rgba(124, 127, 255, 0.2));
  border: 1px solid rgba(255,255,255,0.16);
  animation: floaty 4s ease-in-out infinite;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1), filter 400ms ease;
}

.hero-card:hover {
  transform: scale(1.03) translateY(-4px);
  filter: brightness(1.1);
}

.hero-card-top,
.hero-tray,
.progress-row,
.progress-row.compact,
.mission-meta,
.world-card,
.inventory-item,
.stat-item,
.shop-item,
.leaderboard-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.hero-card-top {
  margin-bottom: 1rem;
}

.player-avatar {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  font-size: 1.3rem;
}

.hero-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  width: 100%;
  margin-bottom: 0.8rem;
}

.hero-tray {
  flex-wrap: wrap;
}

.dashboard-shell,
.game-grid,
.info-grid,
.settings-grid {
  display: grid;
  gap: 1rem;
}

.dashboard-shell {
  grid-template-columns: 1.4fr 0.9fr;
}

.panel {
  padding: 1rem;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.panel-header.compact {
  margin-bottom: 0.7rem;
}

.status-pill {
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: rgba(94, 227, 200, 0.16);
  color: var(--accent);
  font-weight: 700;
}

.progress-bar {
  width: 100%;
  height: 0.7rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  overflow: hidden;
  margin: 0.6rem 0 1rem;
}

.progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 280ms ease;
}

.trait-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.trait-card,
.hud-card {
  padding: 0.9rem;
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
}

.trait-label,
.hud-label,
.stat-label {
  color: var(--muted);
  font-size: 0.8rem;
  display: block;
  margin-bottom: 0.2rem;
}

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

.world-list {
  display: grid;
  gap: 0.65rem;
}

.world-card {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(255,255,255,0.09), rgba(255,255,255,0.04));
  color: var(--text);
  text-align: left;
  justify-content: space-between;
  transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1), border-color 400ms ease, box-shadow 400ms ease;
}

.world-card:hover,
.world-card:focus-visible {
  transform: translateY(-6px) scale(1.03);
  border-color: var(--accent);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
  animation: bounceHover 1s ease-in-out infinite;
}

.world-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(94, 227, 200, 0.25);
}

.world-card.locked {
  opacity: 0.7;
}

.world-card .world-details {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.game-shell {
  padding: 1.2rem;
}

.mission-meta {
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.hud {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.game-grid {
  grid-template-columns: 1.3fr 0.8fr;
  margin-top: 1rem;
}

.options {
  display: grid;
  gap: 0.7rem;
  margin: 1rem 0;
}

.option-btn {
  width: 100%;
  text-align: left;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1), border-color 400ms ease, background 400ms ease, box-shadow 400ms ease;
}

.option-btn:hover,
.option-btn:focus-visible {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--accent);
  box-shadow: 0 10px 20px rgba(94, 227, 200, 0.15);
  background: rgba(255,255,255,0.1);
  animation: wiggle 0.4s ease-in-out;
}

.option-btn.correct {
  background: rgba(94, 227, 200, 0.2);
  border-color: var(--accent);
}

.option-btn.wrong {
  background: rgba(255, 107, 127, 0.18);
  border-color: var(--danger);
}

.feedback {
  min-height: 1.4rem;
  color: var(--accent);
  font-weight: 700;
}

.chip-button {
  padding: 0.72rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1), background 400ms ease, box-shadow 400ms ease;
}

.chip-button:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.chip-button.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
}

.inventory-list,
.stats-list,
.leaderboard-list,
.shop-list {
  display: grid;
  gap: 0.6rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.inventory-item,
.stat-item,
.shop-item,
.leaderboard-item {
  padding: 0.75rem 0.8rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.info-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-form {
  display: grid;
  gap: 0.8rem;
}

.settings-form label {
  display: grid;
  gap: 0.35rem;
}

input[type="text"],
select {
  padding: 0.75rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.dialog-content {
  padding: 1.2rem;
  max-width: 34rem;
  width: min(90vw, 34rem);
}

dialog::backdrop {
  background: rgba(255, 255, 255, 0.6);
}

.unlock-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(4px);
  z-index: 1500;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 240ms ease, visibility 240ms ease;
}

.unlock-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.unlock-card {
  padding: 1.8rem;
  border-radius: 28px;
  text-align: center;
  background: linear-gradient(135deg, rgba(94, 227, 200, 0.16), rgba(124, 127, 255, 0.24));
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: var(--shadow);
  animation: burst 0.7s ease-out;
}

.celebration-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1200;
}

.confetti-piece {
  position: absolute;
  width: 0.6rem;
  height: 1rem;
  border-radius: 999px;
  animation: fall 1.3s linear forwards;
}

.reward-pop {
  position: fixed;
  color: var(--warning);
  font-weight: 800;
  animation: popUp 0.9s ease-out forwards;
  pointer-events: none;
  z-index: 1300;
}

@keyframes drift {
  from { transform: translateX(-5%); }
  to { transform: translateX(8%); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes ripple {
  to {
    transform: scale(2.3);
    opacity: 0;
  }
}

@keyframes burst {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes popUp {
  0% { transform: translateY(0) scale(0.8); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateY(-55px); opacity: 0; }
}

@keyframes fall {
  from { transform: translateY(0) rotate(0deg); opacity: 1; }
  to { transform: translateY(100vh) rotate(420deg); opacity: 0; }
}

@keyframes wiggle {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
  75% { transform: rotate(-5deg); }
  100% { transform: rotate(0deg); }
}

@keyframes jelly {
  0%, 100% { transform: scale(1, 1); }
  25% { transform: scale(1.05, 0.95); }
  50% { transform: scale(0.95, 1.05); }
  75% { transform: scale(1.02, 0.98); }
}

@keyframes bounceHover {
  0% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0); }
}

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

@media (max-width: 960px) {
  .hero,
  .dashboard-shell,
  .game-grid,
  .info-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .hud {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-card-grid,
  .trait-grid,
  .hud {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }
}

/* ==========================================================================
   EduPlay Premium Upgrades: Setup, Cosmetics, Lucky Wheel & UI Components
   ========================================================================== */

/* Character / Player Creator Onboarding */
.setup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 7, 26, 0.95);
  backdrop-filter: blur(28px);
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  overflow-y: auto;
}

.setup-card {
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 32px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  width: min(100%, 500px);
  box-shadow: 0 0 50px rgba(0, 229, 255, 0.25);
  text-align: center;
  animation: burst 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.setup-card h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.setup-grid {
  display: grid;
  gap: 1.5rem;
  margin: 1.5rem 0;
  text-align: left;
}

.setup-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.setup-field span {
  font-weight: 700;
  color: var(--muted);
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.8rem;
}

.avatar-btn {
  font-size: 2rem;
  padding: 0.6rem;
  border-radius: 16px;
  border: 2px solid var(--border);
  background: rgba(255,255,255,0.06);
  transition: all 0.3s ease;
}

.avatar-btn:hover, .avatar-btn.selected {
  border-color: var(--accent);
  background: rgba(94, 227, 200, 0.16);
  transform: translateY(-4px) scale(1.1);
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.8rem;
}

.color-btn {
  height: 2.8rem;
  border-radius: 14px;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 0.3s ease;
}

.color-btn.selected, .color-btn:hover {
  border-color: #ffffff;
  transform: scale(1.08) translateY(-2px);
}

.setup-validation {
  color: #ff6b7f;
  background: rgba(255, 107, 127, 0.1);
  border: 1px solid rgba(255, 107, 127, 0.2);
  padding: 0.75rem;
  border-radius: 12px;
  margin-top: 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.setup-card.shake {
  animation: shake 0.4s ease-in-out;
}

/* Cosmetic Avatar Frames & Badges */
.player-avatar {
  position: relative;
  transition: all 0.4s ease;
}

.player-avatar.frame-gold {
  border: 4px solid var(--accent-3);
  box-shadow: 0 0 20px var(--accent-3);
  animation: shineGold 2s infinite alternate;
}

.player-avatar.frame-neon {
  border: 4px dashed var(--accent-2);
  box-shadow: 0 0 20px var(--accent-2);
  animation: flashNeon 1.5s infinite linear;
}

@keyframes shineGold {
  0% { box-shadow: 0 0 5px var(--accent-3), inset 0 0 5px var(--accent-3); }
  100% { box-shadow: 0 0 25px var(--accent-3), inset 0 0 10px var(--accent-3); }
}

@keyframes flashNeon {
  0% { transform: rotate(0deg); box-shadow: 0 0 5px var(--accent-2); }
  50% { box-shadow: 0 0 25px var(--accent-2); }
  100% { transform: rotate(360deg); box-shadow: 0 0 5px var(--accent-2); }
}

.player-title {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-2);
  margin-top: 0.25rem;
}

/* Lucky Wheel (Daily Spin) Widget */
.lucky-wheel-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.5rem;
  text-align: center;
  gap: 1rem;
}

.wheel-container {
  position: relative;
  width: 180px;
  height: 180px;
}

.wheel-graphic {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 8px solid var(--surface-strong);
  background: conic-gradient(
    var(--accent) 0deg 45deg,
    var(--accent-2) 45deg 90deg,
    var(--accent-3) 90deg 135deg,
    var(--danger) 135deg 180deg,
    var(--warning) 180deg 225deg,
    #9333ea 225deg 270deg,
    var(--accent) 270deg 315deg,
    var(--accent-3) 315deg 360deg
  );
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  transition: transform 4s cubic-bezier(0.15, 0.85, 0.35, 1.02);
}

.wheel-pointer {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 22px solid #ffffff;
  z-index: 10;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

/* Pause Overlay */
.game-card-wrapper {
  position: relative;
}

.pause-overlay {
  position: absolute;
  inset: 0;
  background: rgba(14, 7, 26, 0.88);
  backdrop-filter: blur(16px);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.2rem;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.pause-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.pause-overlay h4 {
  font-size: 1.8rem;
  margin: 0;
  color: var(--accent);
}

/* Audio control volume sliders */
.volume-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.5rem;
}

.volume-slider {
  flex-grow: 1;
  height: 6px;
  -webkit-appearance: none;
  background: rgba(255,255,255,0.15);
  border-radius: 999px;
  outline: none;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Shop and Inventory styling */
.shop-item-btn {
  width: 100%;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.cosmetic-card {
  padding: 0.8rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.cosmetic-card.equipped {
  border-color: var(--accent);
  background: rgba(94, 227, 200, 0.1);
}

.cosmetic-card h5 {
  margin: 0;
  font-size: 0.85rem;
}

.cosmetic-card button {
  width: 100%;
  padding: 0.4rem;
  font-size: 0.75rem;
  border-radius: 8px;
}

/* Spinning Coin and Visuals */
.spinning-coin {
  display: inline-block;
  animation: spinCoin 1.8s linear infinite;
  margin-right: 0.3rem;
}

@keyframes spinCoin {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(360deg); }
}

/* Voice Toggle & Read Aloud */
.voice-toggle-btn {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.voice-toggle-btn.active {
  opacity: 1;
  color: var(--accent);
}

/* Treasure Chest Popup */
.treasure-dialog-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.chest-icon {
  font-size: 4.5rem;
  cursor: pointer;
  animation: bob 2s ease-in-out infinite;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chest-icon.opened {
  transform: scale(1.15) rotate(5deg);
}

.chest-prize {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-3);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.chest-prize.visible {
  opacity: 1;
}

/* Level Selection Map */
.levels-map {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.level-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.9rem;
  border-radius: 20px;
  background: rgba(255,255,255,0.06);
  border: 2px solid var(--border);
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.level-node.unlocked:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(94, 227, 200, 0.2);
}

.level-node.unlocked {
  border-color: var(--accent);
}

.level-node.completed {
  background: rgba(94, 227, 200, 0.1);
  border-color: var(--accent);
}

.level-node.active-node {
  border-color: var(--accent-2);
  box-shadow: 0 0 15px var(--accent-2);
}

.level-node.locked {
  opacity: 0.4;
  cursor: not-allowed;
}

.level-node .node-num {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.level-node .node-label {
  font-size: 0.72rem;
  color: var(--muted);
}

@media (max-width: 768px) {
  .levels-map {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .levels-map {
    grid-template-columns: repeat(2, 1fr);
  }
}

