/*
  11+ Non-Verbal & Spatial Reasoning Gym
  Styles & Blueprints Design System
*/

@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 300;
  font-stretch: normal;
  font-display: swap;
  src: url('../fonts/fredoka-300.ttf') format('truetype');
}
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 400;
  font-stretch: normal;
  font-display: swap;
  src: url('../fonts/fredoka-400.ttf') format('truetype');
}
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 500;
  font-stretch: normal;
  font-display: swap;
  src: url('../fonts/fredoka-500.ttf') format('truetype');
}
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 600;
  font-stretch: normal;
  font-display: swap;
  src: url('../fonts/fredoka-600.ttf') format('truetype');
}
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 700;
  font-stretch: normal;
  font-display: swap;
  src: url('../fonts/fredoka-700.ttf') format('truetype');
}

:root {
  --font-main: 'Fredoka', system-ui, -apple-system, sans-serif;
  
  /* Cyber Space Academy Theme */
  --bg-gradient: linear-gradient(135deg, #020813 0%, #0c1a30 100%);
  --panel-bg: rgba(10, 25, 47, 0.85);
  --panel-border: rgba(0, 245, 212, 0.35);
  
  --primary: #0077b6; /* Space Blue */
  --primary-hover: #0096c7;
  --accent-cyan: #00f5d4; /* Glowing Neon Cyan */
  --accent-purple: #9d4edd; /* Space Magic Purple */
  --accent-orange: #f77f00; /* Warm Accent */
  
  --success: #2ecc71;
  --danger: #e74c3c;
  --text-dark: #f5f6fa;
  --text-light: #ffffff;
  --text-muted: #8ecae6;
  
  /* Shadows & Radius */
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 40px rgba(0, 245, 212, 0.15);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  
  /* Transitions */
  --transition-bounce: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --transition-smooth: all 0.2s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scrollbar-gutter: stable;
}

body {
  font-family: var(--font-main);
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-x: hidden;
  padding: 1rem;
}

/* Header Dashboard */
header {
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.logo-icon {
  font-size: 3rem;
  animation: float 3.5s ease-in-out infinite;
}

h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent-cyan);
  text-shadow: 0 0 12px rgba(0, 245, 212, 0.4);
  letter-spacing: 0.5px;
}

nav {
  display: flex;
  background: var(--panel-bg);
  padding: 0.5rem;
  border-radius: 50px;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--panel-border);
  gap: 0.5rem;
  width: 100%;
  max-width: 600px;
  backdrop-filter: blur(10px);
  z-index: 10;
}

nav button {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.75rem 0.5rem;
  border-radius: 50px;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-bounce);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

nav button.active {
  background: var(--accent-purple);
  color: var(--text-light);
  box-shadow: 0 0 15px rgba(157, 78, 221, 0.5);
  transform: scale(1.05);
}

nav button:hover:not(.active) {
  background: rgba(0, 245, 212, 0.15);
  color: var(--accent-cyan);
}

/* Star/Streak Dashboard */
.progress-bar-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  width: 100%;
  max-width: 600px;
  background: rgba(0, 119, 182, 0.15);
  padding: 0.5rem 1.5rem;
  border-radius: 30px;
  border: 1px dashed var(--panel-border);
  font-size: 1.1rem;
}

.progress-stat {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-dark);
}

.star-count {
  color: #ffd166;
  text-shadow: 0 0 8px rgba(255, 209, 102, 0.5);
}

.streak-count {
  color: #ff007f;
  text-shadow: 0 0 8px rgba(255, 0, 127, 0.5);
}

/* Main layouts */
main {
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
}

.screen {
  display: none;
  width: 100%;
}

.screen.active {
  display: block;
}

/* Cards & Blueprint Designs */
.card {
  background: var(--panel-bg);
  border: 2px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
  backdrop-filter: blur(15px);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 80% 20%, rgba(0, 245, 212, 0.05) 0%, transparent 60%);
  pointer-events: none;
}

.section-title {
  font-size: 1.6rem;
  color: var(--accent-cyan);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.large-gap {
  margin-bottom: 1.5rem;
}

/* LAB SCREEN (EXPLORE) */
.welcome-card p {
  line-height: 1.6;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

.explore-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.explore-interface {
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid rgba(0, 245, 212, 0.15);
}

/* Sub-selector tabs inside Lab */
.lab-sub-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.lab-sub-tab {
  flex: 1;
  padding: 0.6rem;
  border: 1px solid rgba(0, 245, 212, 0.2);
  border-radius: var(--radius-sm);
  background: rgba(0, 119, 182, 0.1);
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.lab-sub-tab.active {
  background: var(--accent-cyan);
  color: #020813;
  border-color: var(--accent-cyan);
}

.lab-panel {
  display: none;
}

.lab-panel.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

/* Mirror Lab Layout */
.mirror-lab-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  width: 100%;
}

@media(min-width: 768px) {
  .mirror-lab-layout {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}

.lab-visual-box {
  background: rgba(2, 8, 19, 0.6);
  border: 2px dashed rgba(0, 245, 212, 0.25);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 220px;
}

.lab-visual-box svg {
  max-width: 200px;
  max-height: 200px;
  overflow: visible;
}

.lab-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.control-group label {
  font-size: 0.9rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

.controls-row-btn {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn-control {
  flex: 1;
  min-width: 80px;
  padding: 0.6rem;
  border: 1px solid var(--panel-border);
  background: rgba(12, 26, 48, 0.8);
  border-radius: var(--radius-sm);
  color: var(--text-dark);
  font-family: var(--font-main);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-control:hover {
  background: var(--accent-cyan);
  color: #020813;
}

.btn-control.active {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
  color: var(--text-light);
}

/* Paper Fold Lab Layout */
.fold-lab-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  width: 100%;
}

@media(min-width: 768px) {
  .fold-lab-layout {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}

.fold-instructions {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.unfold-result-title {
  color: var(--accent-cyan);
  margin-top: 0.8rem;
  font-size: 1rem;
  font-weight: bold;
}

/* Paper Interactive SVG classes */
.grid-line {
  stroke: rgba(0, 245, 212, 0.15);
  stroke-dasharray: 2, 2;
  stroke-width: 1;
}

.fold-line {
  stroke: #ffd166;
  stroke-dasharray: 5, 5;
  stroke-width: 2.5;
}

.paper-bg {
  fill: #102a43;
  stroke: var(--accent-cyan);
  stroke-width: 2;
}

.punch-cell {
  fill: transparent;
  stroke: rgba(0, 245, 212, 0.1);
  stroke-width: 1;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.punch-cell:hover {
  fill: rgba(0, 245, 212, 0.2);
}

.punch-hole {
  fill: #ff007f;
  stroke: #ffffff;
  stroke-width: 1;
  filter: drop-shadow(0 0 4px #ff007f);
}

.ghost-punch {
  fill: rgba(255, 0, 127, 0.35);
  stroke: rgba(255, 255, 255, 0.3);
  stroke-width: 1;
  stroke-dasharray: 2, 2;
}

/* Mascot Advisor */
.speech-bubble-container {
  display: flex;
  flex-direction: column;
  background: rgba(0, 119, 182, 0.1);
  border: 1px solid rgba(0, 245, 212, 0.2);
  border-radius: var(--radius-md);
  padding: 1rem;
  position: relative;
  margin-top: 1rem;
}

.speech-bubble {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
  min-height: 45px;
}

.mascot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mascot-character {
  font-size: 2.2rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.mascot-character:hover {
  transform: scale(1.1) rotate(5deg);
}

.voice-btn {
  background: rgba(0, 245, 212, 0.12);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.voice-btn:hover {
  background: var(--accent-cyan);
  color: #020813;
}

.btn-primary {
  background: linear-gradient(135deg, #0077b6 0%, #00f5d4 100%);
  border: none;
  color: #020813;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-family: var(--font-main);
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-bounce);
  box-shadow: 0 5px 15px rgba(0, 245, 212, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 245, 212, 0.5);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-explore-launch {
  width: 100%;
  margin-top: 1rem;
}

/* QUIZ SCREEN */
.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

#quiz-question-number {
  font-size: 1.1rem;
  color: var(--accent-cyan);
  font-weight: bold;
}

.progress-tracker {
  display: flex;
  gap: 0.4rem;
}

.tracker-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(0, 245, 212, 0.2);
}

.tracker-dot.active {
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}

.tracker-dot.correct {
  background: var(--success);
}

.tracker-dot.incorrect {
  background: var(--danger);
}

.timer-box {
  background: rgba(231, 76, 60, 0.12);
  border: 1px solid rgba(231, 76, 60, 0.4);
  color: var(--danger);
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 75px;
  justify-content: center;
}

.timer-box.warning {
  animation: pulse 1s infinite alternate;
  background: rgba(231, 76, 60, 0.25);
  box-shadow: 0 0 10px rgba(231, 76, 60, 0.4);
}

@keyframes pulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}

.quiz-card {
  background: rgba(2, 8, 19, 0.5);
  border: 1px solid rgba(0, 245, 212, 0.15);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
  min-height: 260px;
  justify-content: center;
  position: relative;
}

.quiz-prompt-text {
  font-size: 1.15rem;
  line-height: 1.6;
  text-align: center;
  margin-bottom: 1.2rem;
  color: var(--text-dark);
}

.quiz-visual-render-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.5rem;
}

.quiz-visual-render-wrapper svg {
  max-width: 210px;
  max-height: 210px;
  overflow: visible;
}

/* SVG Shapes */
.nvr-stroke {
  stroke: var(--text-light);
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.nvr-fill-accent { fill: #00b4d8; }
.nvr-fill-pink { fill: #ff007f; }
.nvr-fill-yellow { fill: #ffd166; }
.nvr-fill-green { fill: #06d6a0; }
.nvr-fill-purple { fill: #9d4edd; }
.nvr-fill-orange { fill: #f77f00; }
.nvr-fill-none { fill: none; }

.nvr-hint-line {
  stroke: #ffb703;
  stroke-dasharray: 4, 4;
  stroke-width: 2;
}

/* Matrix 2x2 design */
.matrix-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-width: 240px;
  background: rgba(0, 245, 212, 0.08);
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 245, 212, 0.2);
}

.matrix-cell {
  background: rgba(2, 8, 19, 0.75);
  border: 1px solid rgba(0, 245, 212, 0.15);
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 1;
  padding: 8px;
}

.matrix-cell svg {
  max-width: 85px;
  max-height: 85px;
}

.matrix-question-mark {
  font-size: 2.2rem;
  color: #ffb703;
  font-weight: bold;
  animation: pulse-glow 1.5s infinite alternate;
}

@keyframes pulse-glow {
  0% { text-shadow: 0 0 4px rgba(255, 183, 3, 0.3); }
  100% { text-shadow: 0 0 15px rgba(255, 183, 3, 0.8); }
}

/* Quiz Option Pickers */
.quiz-options-container {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media(min-width: 600px) {
  .quiz-options-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

.option-card {
  background: rgba(12, 26, 48, 0.6);
  border: 2px solid rgba(0, 245, 212, 0.2);
  border-radius: var(--radius-md);
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-bounce);
  min-height: 140px;
  position: relative;
}

.option-card:hover {
  border-color: var(--accent-cyan);
  background: rgba(0, 245, 212, 0.08);
  transform: translateY(-4px);
  box-shadow: 0 5px 15px rgba(0, 245, 212, 0.15);
}

.option-card.selected {
  border-color: var(--accent-purple);
  background: rgba(157, 78, 221, 0.18);
  box-shadow: 0 0 18px rgba(157, 78, 221, 0.35);
  transform: scale(1.03);
}

.option-badge {
  position: absolute;
  top: 6px;
  left: 10px;
  background: rgba(0, 245, 212, 0.2);
  color: var(--accent-cyan);
  font-weight: bold;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  border: 1px solid rgba(0, 245, 212, 0.3);
}

.option-card.selected .option-badge {
  background: var(--accent-purple);
  color: white;
  border-color: var(--accent-purple);
}

.option-card svg {
  max-width: 105px;
  max-height: 105px;
  overflow: visible;
}

.submit-btn-row {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  width: 100%;
}

.btn-submit-answer {
  width: 100%;
  max-width: 320px;
}

/* STICKER ALBUM SHOP */
.sticker-book-intro {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.sticker-shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1.2rem;
}

.sticker-card {
  background: rgba(2, 8, 19, 0.55);
  border: 2px solid rgba(0, 245, 212, 0.12);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  min-height: 180px;
  transition: var(--transition-bounce);
  position: relative;
}

.sticker-card.locked {
  filter: grayscale(85%);
  opacity: 0.75;
}

.sticker-card.locked:hover {
  filter: grayscale(40%);
  opacity: 0.95;
  border-color: var(--accent-cyan);
}

.sticker-visual {
  font-size: 2.8rem;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
  transition: transform 0.2s ease;
}

.sticker-card:hover .sticker-visual {
  transform: scale(1.15) rotate(5deg);
}

.sticker-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.sticker-buy-btn {
  background: var(--accent-cyan);
  border: none;
  color: #020813;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: var(--transition-smooth);
}

.sticker-buy-btn:hover {
  background: #ffffff;
  transform: scale(1.05);
}

.sticker-owned-badge {
  background: rgba(46, 204, 113, 0.15);
  border: 1px solid var(--success);
  color: var(--success);
  font-size: 0.75rem;
  padding: 0.3rem 0.6rem;
  border-radius: 20px;
  font-weight: 600;
}

/* PARENTS CORNER */
.settings-container {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(2, 8, 19, 0.3);
  padding: 1rem 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 245, 212, 0.1);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-dark);
}

/* Toggle Switch Slider */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .4s;
  border-radius: 34px;
  border: 1px solid rgba(0, 245, 212, 0.25);
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-muted);
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent-purple);
  border-color: var(--accent-purple);
}

input:checked + .slider:before {
  transform: translateX(22px);
  background-color: var(--text-light);
}

/* Dropdowns */
.difficulty-dropdown {
  background: rgba(12, 26, 48, 0.9);
  color: var(--text-dark);
  border: 1px solid var(--panel-border);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.95rem;
  cursor: pointer;
  outline: none;
}

.difficulty-dropdown:focus {
  border-color: var(--accent-cyan);
}

.parents-warning-card {
  margin-top: 1.5rem;
  background: rgba(231, 76, 60, 0.08) !important;
  border: 1.5px solid rgba(231, 76, 60, 0.3) !important;
}

.parents-warning-card h2 {
  color: var(--danger);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.parents-warning-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.reset-btn {
  background: var(--danger);
  border: none;
  color: var(--text-light);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: bold;
  padding: 0.6rem 1.2rem;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.reset-btn:hover {
  background: #c0392b;
  transform: scale(1.03);
}

/* OVERLAYS & MODALS */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(2, 8, 19, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

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

.modal {
  background: var(--panel-bg);
  border: 2px solid var(--accent-cyan);
  border-radius: var(--radius-lg);
  padding: 2.2rem 2rem;
  max-width: 440px;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 245, 212, 0.25);
  transform: scale(0.85);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.overlay.active .modal {
  transform: scale(1);
}

.modal-mascot {
  font-size: 4rem;
  margin-bottom: 0.8rem;
  animation: bob 2s ease-in-out infinite;
}

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

.modal-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 0.8rem;
}

.text-danger {
  color: var(--danger) !important;
}

.modal-stars {
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffd166;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.modal-desc {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.w-full {
  width: 100%;
}

.confirm-modal-buttons {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  width: 100%;
}

.confirm-modal-buttons button {
  flex: 1;
}

.key-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-dark);
  font-family: var(--font-main);
  font-weight: 600;
  padding: 0.75rem 1.2rem;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.key-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Floating animation */
@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(3deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

/* Hint tooltips and helper elements */
.alphabet-guide-bar {
  background: rgba(2, 8, 19, 0.8);
  border: 1px dashed rgba(0, 245, 212, 0.3);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--accent-cyan);
  text-align: center;
  margin-bottom: 1rem;
  letter-spacing: 2px;
  display: none; /* Only show in EASY */
}

/* Make sure matrices scale nicely */
.matrix-options {
  margin-top: 1rem;
}
