/*
  Toy Shop Money Trainer
  Styles & Visual Design
*/

@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;
  
  /* Warm Toy Shop Palette */
  --bg-gradient: linear-gradient(135deg, #fefae0 0%, #faedcd 100%);
  --panel-bg: rgba(255, 255, 255, 0.9);
  --panel-border: rgba(212, 163, 89, 0.4);
  
  --primary: #d4a373; /* Wood brown */
  --primary-hover: #ccd5ae; /* Pastel Sage Green */
  --accent-pink: #ffb5a7; /* Rose Pastel */
  --accent-cream: #faedcd;
  
  --success: #2ecc71;
  --danger: #e74c3c;
  --text-dark: #4a3b32; /* Warm Dark Brown for child readability */
  --text-light: #ffffff;
  --text-muted: #7f6a5b;
  
  /* Shadows & Radius */
  --shadow-sm: 0 4px 6px rgba(127, 106, 91, 0.1);
  --shadow-md: 0 10px 25px rgba(127, 106, 91, 0.2);
  --shadow-lg: 0 20px 40px rgba(127, 106, 91, 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: #7f6a5b;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  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: #ccd5ae; /* Pastel green */
  color: #4a3b32;
  box-shadow: 0 4px 12px rgba(204, 213, 174, 0.5);
  transform: scale(1.05);
}

nav button:hover:not(.active) {
  background: rgba(212, 163, 89, 0.15);
  color: #7f6a5b;
}

/* Star/Streak Dashboard */
.progress-bar-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  width: 100%;
  max-width: 600px;
  background: rgba(212, 163, 89, 0.12);
  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);
  font-weight: bold;
}

.star-count {
  color: #e2b13c;
}

.streak-count {
  color: #ff007f;
}

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

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

.screen.active {
  display: block;
}

/* Cards & Shop Displays */
.card {
  background: var(--panel-bg);
  border: 3px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
  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(254, 250, 224, 0.4) 0%, transparent 60%);
  pointer-events: none;
}

.section-title {
  font-size: 1.6rem;
  color: #7f6a5b;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

/* EXPLORE SCREEN (LAB) */
.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(254, 250, 224, 0.4);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid rgba(212, 163, 89, 0.2);
}

/* Sub 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(212, 163, 89, 0.3);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.7);
  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: #ccd5ae;
  color: #4a3b32;
  border-color: #ccd5ae;
}

.lab-panel {
  display: none;
}

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

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

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

.piggy-container-box {
  background: rgba(255, 255, 255, 0.65);
  border: 2px dashed rgba(212, 163, 89, 0.4);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 250px;
  position: relative;
  overflow: hidden;
}

.piggy-coins-pile {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  top: 0;
  pointer-events: none;
  z-index: 1;
}

.piggy-pile-coin {
  position: absolute;
  transform-origin: center;
  animation: coinFallDown 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

@keyframes coinFallDown {
  0% { transform: translateY(-180px) scale(1.6) rotate(0deg); opacity: 0; }
  100% { transform: translateY(0) scale(1) rotate(var(--r-rot)); opacity: 1; }
}

.coin-real-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.2s ease;
}

.coin-media-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.piggy-display-icon {
  font-size: 5rem;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.piggy-display-icon.bounce-pig {
  animation: pigJump 0.4s ease;
}

@keyframes pigJump {
  0% { transform: scale(1); }
  50% { transform: scale(1.15) translateY(-10px); }
  100% { transform: scale(1); }
}

.piggy-total-box {
  position: absolute;
  bottom: 1.2rem;
  font-size: 2.2rem;
  font-weight: 800;
  color: #7f6a5b;
  z-index: 10;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

#btn-piggy-clear {
  position: absolute;
  top: 1rem;
  right: 1rem;
  margin: 0;
  z-index: 10;
  padding: 0.5rem 0.8rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(239, 83, 80, 0.15);
  color: #e53935;
  border: 1px solid rgba(229, 57, 53, 0.3);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

#btn-piggy-clear:hover {
  background: #e53935;
  color: white;
  transform: scale(1.05);
}

.piggy-breakdown-list {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  text-align: center;
  min-height: 30px;
  line-height: 1.4;
}

/* Coin Tray / Wallet Grids */
.coin-selection-wallet {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  width: 100%;
}

.wallet-section-title {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.wallet-coins-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  width: 100%;
}

.wallet-note-row {
  display: flex;
  gap: 0.6rem;
  width: 100%;
}

/* Coin items interactive */
.wallet-coin-item {
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid rgba(212, 163, 89, 0.2);
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: var(--transition-bounce);
  padding: 4px;
}

.wallet-coin-item:hover {
  transform: scale(1.1);
  border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(212,163,89,0.25);
}

.wallet-coin-item svg {
  max-width: 100%;
  max-height: 100%;
}

.wallet-note-item {
  flex: 1;
  height: 55px;
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid rgba(212, 163, 89, 0.2);
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: var(--transition-bounce);
}

.wallet-note-item:hover {
  transform: translateY(-3px) scale(1.03);
  border-color: var(--primary);
}

.wallet-note-item svg {
  max-width: 90%;
  max-height: 90%;
}

/* Coin Glossary Details Layout */
.glossary-lab-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  width: 100%;
}

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

.glossary-magnify-box {
  background: white;
  border: 2px dashed rgba(212, 163, 89, 0.3);
  border-radius: var(--radius-md);
  padding: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}

.glossary-magnify-box svg,
.glossary-magnify-box .coin-media-container {
  max-width: 160px;
  max-height: 160px;
  width: 160px !important;
  height: 160px !important;
}

.glossary-details-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.5);
  padding: 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(212, 163, 89, 0.2);
}

.glossary-coin-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #7f6a5b;
}

.glossary-coin-value {
  font-size: 1.1rem;
  color: #d4a373;
  font-weight: bold;
}

.glossary-coin-desc {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* Mascot Advisor bubble */
.speech-bubble-container {
  display: flex;
  flex-direction: column;
  background: rgba(212, 163, 89, 0.08);
  border: 2px solid rgba(212, 163, 89, 0.25);
  border-radius: var(--radius-md);
  padding: 1rem;
  position: relative;
  margin-top: 1rem;
}

.speech-bubble {
  font-size: 1.05rem;
  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: #ccd5ae;
  border: 1px solid rgba(212, 163, 89, 0.3);
  color: #4a3b32;
  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: #e9f5db;
}

.btn-primary {
  background: linear-gradient(135deg, #ccd5ae 0%, #d4a373 100%);
  border: none;
  color: #4a3b32;
  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(212, 163, 89, 0.3);
  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(212, 163, 89, 0.45);
}

.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: #7f6a5b;
  font-weight: bold;
}

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

.tracker-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(127, 106, 91, 0.15);
  border: 1px solid rgba(212, 163, 89, 0.2);
}

.tracker-dot.active {
  background: #ccd5ae;
  box-shadow: 0 0 8px #ccd5ae;
}

.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);
}

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

.quiz-card {
  background: white;
  border: 2px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
  min-height: 240px;
  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;
}

/* Toy Shelf & Visual render */
.toy-shelf-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.toy-character {
  font-size: 4rem;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

.price-tag {
  background: #ffb5a7;
  color: #4a3b32;
  font-weight: bold;
  font-size: 1.3rem;
  padding: 0.3rem 1rem;
  border-radius: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  border: 1px dashed rgba(127,106,91,0.4);
}

/* Cashier Visual display */
.cashier-desk-display {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
  max-width: 400px;
  align-items: center;
}

.desk-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #faedcd;
  padding: 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(212, 163, 89, 0.3);
}

.desk-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.desk-val {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--text-dark);
}

.desk-item svg {
  max-width: 50px;
  max-height: 50px;
  margin-top: 0.4rem;
}

/* Quiz Working Tray (Payment workspace) */
.quiz-working-tray {
  width: 100%;
  background: rgba(254, 250, 224, 0.6);
  border: 2px dashed rgba(212, 163, 89, 0.3);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  min-height: 120px;
  margin-bottom: 1.5rem;
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-content: flex-start;
  align-items: center;
}

.tray-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
}

.tray-item {
  width: 55px;
  height: 55px;
  cursor: pointer;
  transition: var(--transition-bounce);
  animation: coinDrop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes coinDrop {
  0% { transform: translateY(-20px) scale(0.6); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.tray-item svg {
  max-width: 100%;
  max-height: 100%;
}

.tray-item-note {
  width: 100px;
  height: 50px;
  cursor: pointer;
  transition: var(--transition-bounce);
  animation: coinDrop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tray-item-note svg {
  max-width: 100%;
  max-height: 100%;
}

.tray-counter-badge {
  position: absolute;
  bottom: 8px;
  right: 12px;
  background: #ccd5ae;
  color: #4a3b32;
  font-weight: bold;
  font-size: 1.05rem;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.clear-tray-btn {
  position: absolute;
  top: 8px;
  right: 12px;
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.3);
  color: var(--danger);
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: var(--font-main);
  font-weight: bold;
  transition: var(--transition-smooth);
}

.clear-tray-btn:hover {
  background: var(--danger);
  color: white;
}

.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(255, 255, 255, 0.85);
  border: 2px solid rgba(212, 163, 89, 0.2);
  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;
  box-shadow: var(--shadow-sm);
}

.sticker-card.locked {
  filter: grayscale(80%);
  opacity: 0.8;
}

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

.sticker-visual {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.08));
}

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

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

.sticker-buy-btn {
  background: #ccd5ae;
  border: none;
  color: #4a3b32;
  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);
  box-shadow: 0 2px 5px rgba(204,213,174,0.4);
}

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

.sticker-owned-badge {
  background: rgba(46, 204, 113, 0.1);
  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(255, 255, 255, 0.8);
  padding: 1rem 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(212, 163, 89, 0.2);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-dark);
}

/* Toggle switches */
.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(127,106,91,0.1);
  transition: .4s;
  border-radius: 34px;
  border: 1px solid rgba(212,163,89,0.3);
}

.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: #ccd5ae;
  border-color: #ccd5ae;
}

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

/* Dropdowns */
.difficulty-dropdown {
  background: white;
  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(--primary);
}

.parents-warning-card {
  margin-top: 1.5rem;
  background: rgba(231, 76, 60, 0.04) !important;
  border: 1.5px solid rgba(231, 76, 60, 0.25) !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;
}

/* OVERLAYS & MODALS */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(127, 106, 91, 0.55);
  backdrop-filter: blur(4px);
  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: 3px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 2.2rem 2rem;
  max-width: 440px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  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: #7f6a5b;
  margin-bottom: 0.8rem;
}

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

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

.modal-desc {
  font-size: 1.05rem;
  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.8);
  border: 1px solid rgba(127, 106, 91, 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: white;
}

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