* {
  box-sizing: border-box;
}

:root {
  --bg-top: #90e5ff;
  --bg-bottom: #fff6d9;
  --panel: rgba(255, 255, 255, 0.84);
  --panel-strong: rgba(255, 255, 255, 0.92);
  --text: #234364;
  --text-soft: rgba(35, 67, 100, 0.76);
  --accent: #ff9f43;
  --accent-dark: #ea7720;
  --green: #7fd567;
  --green-dark: #4ca93b;
  --pink: #ff7fb5;
  --yellow: #ffe37a;
  --shadow: 0 24px 54px rgba(72, 120, 160, 0.18);
  --ring: 0 0 0 5px rgba(255, 255, 255, 0.55);
  --clock-face: #fffdf8;
  --clock-edge: #ffe0a3;
  --success: #50c878;
  --error: #ff7a70;
  --scene-name: "Pradera";
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Nunito", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.8), transparent 28%),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.62), transparent 26%),
    linear-gradient(180deg, var(--bg-top) 0%, #dff7ff 48%, var(--bg-bottom) 100%);
  overflow-x: hidden;
}

body.scene-meadow {
  --bg-top: #90e5ff;
  --bg-bottom: #fff6d9;
}

body.scene-jungle {
  --bg-top: #77d9c8;
  --bg-bottom: #fff7cb;
}

body.scene-sunset {
  --bg-top: #ffbf8f;
  --bg-bottom: #ffe7c4;
}

button {
  font: inherit;
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 1220px;
  margin: 0 auto;
  padding: 24px 18px 42px;
}

.screen {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel {
  border: 2px solid rgba(255, 255, 255, 0.86);
  background: var(--panel);
  border-radius: 32px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 360px);
  gap: 24px;
  align-items: center;
  padding: 28px;
}

.hero-copy h1,
.control-card h2,
.question-heading h2,
.mascot-name {
  font-family: "Baloo 2", cursive;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 24px rgba(78, 124, 164, 0.14);
  font-weight: 900;
}

.eyebrow::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 20px 0 0 var(--green), 40px 0 0 var(--pink);
}

.hero-copy h1 {
  margin: 12px 0 0;
  font-size: clamp(3rem, 6vw, 4.9rem);
  line-height: 0.92;
}

.hero-copy p {
  margin: 16px 0 0;
  max-width: 680px;
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.6;
  font-weight: 800;
}

.speech-bubble {
  position: relative;
  margin-top: 18px;
  max-width: 590px;
  padding: 18px 22px;
  border-radius: 24px;
  background: #fffdf2;
  border: 2px solid rgba(255, 226, 145, 0.7);
  font-weight: 800;
  color: var(--text);
}

.speech-bubble::after {
  content: "";
  position: absolute;
  left: 24px;
  bottom: -12px;
  width: 22px;
  height: 22px;
  background: #fffdf2;
  border-right: 2px solid rgba(255, 226, 145, 0.7);
  border-bottom: 2px solid rgba(255, 226, 145, 0.7);
  transform: rotate(45deg);
}

.mascot-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.75), transparent 44%),
    linear-gradient(180deg, #fff7d7 0%, #f8ffdc 100%);
  box-shadow: inset 0 -10px 18px rgba(153, 199, 65, 0.1);
}

.mascot {
  position: relative;
  width: 220px;
  height: 220px;
}

.mascot .face {
  position: absolute;
  inset: 28px 26px 20px;
  border-radius: 48% 48% 46% 46%;
  background: linear-gradient(180deg, #b97b4d 0%, #915329 100%);
}

.ear {
  position: absolute;
  top: 10px;
  width: 66px;
  height: 82px;
  border-radius: 12px 54px 12px 54px;
  background: #8f4f22;
}

.ear-left {
  left: 34px;
  transform: rotate(-16deg);
}

.ear-right {
  right: 34px;
  transform: scaleX(-1) rotate(-16deg);
}

.eye {
  position: absolute;
  top: 58px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #fffaf2;
  box-shadow: inset 0 -6px 0 rgba(220, 194, 164, 0.22);
}

.eye-left {
  left: 30px;
}

.eye-right {
  right: 30px;
}

.pupil {
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background: #20384f;
}

.pupil::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
}

.beak {
  position: absolute;
  left: 50%;
  top: 96px;
  width: 28px;
  height: 28px;
  background: linear-gradient(180deg, #ffd66b 0%, #f4ab2b 100%);
  transform: translateX(-50%) rotate(45deg);
  border-radius: 4px;
}

.cheek {
  position: absolute;
  top: 114px;
  width: 22px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 194, 190, 0.7);
}

.cheek-left {
  left: 42px;
}

.cheek-right {
  right: 42px;
}

.wing {
  position: absolute;
  bottom: 10px;
  width: 46px;
  height: 88px;
  border-radius: 999px;
  background: linear-gradient(180deg, #d79a62 0%, #9a602f 100%);
}

.wing-left {
  left: -10px;
  transform: rotate(18deg);
}

.wing-right {
  right: -10px;
  transform: rotate(-18deg);
}

.mascot-name {
  margin: 0;
  font-size: 1.35rem;
  text-align: center;
}

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

.control-card {
  padding: 22px;
}

.control-card-wide {
  grid-column: 1 / -1;
}

.control-card h2 {
  margin: 0 0 14px;
  font-size: 1.8rem;
}

.toggle-row,
.toggle-grid,
.mini-language-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.mode-grid .toggle-chip {
  flex: 1 1 220px;
}

.toggle-chip {
  min-height: 58px;
  padding: 14px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  box-shadow: 0 12px 20px rgba(72, 120, 160, 0.12);
  font-weight: 900;
  text-align: center;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.toggle-chip.active {
  background: linear-gradient(180deg, #b7ff97 0%, #7add5b 100%);
  box-shadow: 0 12px 0 #4fb234, 0 18px 26px rgba(79, 178, 52, 0.28);
  transform: translateY(-2px);
}

.toggle-chip.small {
  min-height: 46px;
  min-width: 70px;
  padding: 10px 16px;
  font-size: 0.95rem;
}

.start-actions {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 26px;
}

.primary-button,
.secondary-button,
.option-button,
.clock-option {
  width: 100%;
  border-radius: 999px;
  font-weight: 900;
}

.menu-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-button {
  color: #163624;
  background: linear-gradient(180deg, #b8ff99 0%, #75de4e 100%);
  box-shadow: 0 16px 0 #4db933, 0 24px 34px rgba(77, 185, 51, 0.28);
}

.big-button {
  max-width: 420px;
  min-height: 74px;
  padding: 18px 28px;
  font-size: 1.4rem;
}

.secondary-button {
  background: linear-gradient(180deg, #fffaf1 0%, #ffe7af 100%);
  box-shadow: 0 10px 0 #efc65e;
  color: #7d6121;
}

.small-button {
  padding: 14px 18px;
  font-size: 1rem;
}

.helper-text {
  margin: 0;
  text-align: center;
  max-width: 720px;
  font-weight: 800;
  color: var(--text-soft);
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
}

.score-cluster,
.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.score-pill {
  min-width: 108px;
  padding: 12px 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 18px rgba(72, 120, 160, 0.12);
  text-align: center;
}

.score-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 900;
  color: var(--text-soft);
}

.score-pill strong {
  font-size: 1.2rem;
}

.round-button {
  min-width: 52px;
  min-height: 52px;
  padding: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 18px rgba(72, 120, 160, 0.14);
  font-size: 1.25rem;
}

.question-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.side-panel,
.question-panel {
  padding: 22px;
}

.mascot-mini {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mini-avatar {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 22px;
  background: linear-gradient(180deg, #fff0ba 0%, #ffd16c 100%);
  font-size: 2rem;
}

.side-title,
.side-subtitle {
  margin: 0;
  font-weight: 900;
}

.side-title {
  font-size: 1.15rem;
}

.side-subtitle {
  margin-top: 6px;
  color: var(--text-soft);
}

.speech-bubble-small {
  margin-top: 18px;
  max-width: none;
}

.status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.status-strip span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  font-weight: 900;
}

.question-heading {
  text-align: center;
}

.question-kicker {
  margin: 0;
  font-weight: 900;
  color: var(--text-soft);
}

.question-heading h2 {
  margin: 8px 0 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}

.question-heading > p:last-child {
  margin: 10px auto 0;
  max-width: 700px;
  font-weight: 800;
  color: var(--text-soft);
}

.target-stage {
  display: grid;
  place-items: center;
  min-height: 290px;
  margin-top: 20px;
  padding: 18px;
  border-radius: 30px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.82), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 251, 232, 0.92));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.72);
}

.clock-stage,
.clock-option-inner {
  display: grid;
  place-items: center;
}

.clock-label {
  margin-top: 12px;
  font-weight: 900;
  text-align: center;
}

.digital-display,
.text-display {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(100%, 520px);
  min-height: 120px;
  padding: 24px 30px;
  border-radius: 34px;
  text-align: center;
  box-shadow: 0 18px 36px rgba(72, 120, 160, 0.12);
}

.digital-display {
  background: linear-gradient(180deg, #203955 0%, #2b4e73 100%);
  color: #fefefe;
  font-family: "Baloo 2", cursive;
  font-size: clamp(2.8rem, 8vw, 5rem);
  letter-spacing: 0.08em;
}

.text-display {
  background: linear-gradient(180deg, #fff7d8 0%, #fffdf4 100%);
  font-size: clamp(1.4rem, 4vw, 2.15rem);
  font-weight: 900;
  line-height: 1.3;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

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

.option-button {
  min-height: 90px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 22px rgba(72, 120, 160, 0.12);
  color: var(--text);
  font-size: 1.12rem;
  line-height: 1.4;
}

.clock-option {
  padding: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 22px rgba(72, 120, 160, 0.12);
}

.option-button.correct,
.clock-option.correct {
  background: linear-gradient(180deg, #d4ffd0 0%, #b6f2a8 100%);
}

.option-button.wrong,
.clock-option.wrong {
  background: linear-gradient(180deg, #ffd7d1 0%, #ffbeb6 100%);
}

.builder-panel {
  margin-top: 20px;
  padding: 18px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.72);
}

.builder-answer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 76px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 252, 245, 0.94);
  border: 2px dashed rgba(255, 211, 104, 0.84);
}

.builder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.builder-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.token-chip {
  padding: 12px 16px;
  border-radius: 999px;
  background: #fffef7;
  box-shadow: 0 10px 18px rgba(72, 120, 160, 0.12);
  font-weight: 900;
}

.token-chip.used {
  opacity: 0.45;
}

.feedback-banner {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 24px;
  font-weight: 900;
  text-align: center;
}

.feedback-banner.success {
  background: linear-gradient(180deg, #d8ffd6 0%, #b8f0b6 100%);
  color: #23533f;
}

.feedback-banner.error {
  background: linear-gradient(180deg, #ffe0da 0%, #ffc3ba 100%);
  color: #823532;
}

.celebration-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.spark {
  position: absolute;
  top: -24px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  opacity: 0;
  animation: fall 1.3s ease forwards;
}

.spark.star {
  clip-path: polygon(50% 0%, 63% 36%, 100% 36%, 71% 58%, 82% 95%, 50% 72%, 18% 95%, 29% 58%, 0% 36%, 37% 36%);
}

.spark.paw {
  border-radius: 16px 16px 12px 12px;
}

@keyframes fall {
  0% {
    transform: translateY(-10px) scale(0.7) rotate(0deg);
    opacity: 0;
  }

  15% {
    opacity: 1;
  }

  100% {
    transform: translateY(100vh) scale(1.05) rotate(220deg);
    opacity: 0;
  }
}

.clock-svg {
  width: min(78vw, 290px);
  height: auto;
}

.clock-svg.small {
  width: min(32vw, 164px);
}

.clock-face {
  fill: var(--clock-face);
  stroke: var(--clock-edge);
  stroke-width: 4;
}

.clock-ring {
  fill: none;
  stroke: rgba(255, 183, 77, 0.5);
  stroke-width: 6;
  stroke-dasharray: 2 10;
}

.clock-number {
  fill: var(--text);
  font-family: "Baloo 2", cursive;
  font-size: 11px;
  dominant-baseline: middle;
  text-anchor: middle;
}

.tick {
  stroke: rgba(35, 67, 100, 0.36);
  stroke-linecap: round;
}

.hour-hand {
  stroke: #27466d;
  stroke-width: 5.4;
  stroke-linecap: round;
}

.minute-hand {
  stroke: #ff8e48;
  stroke-width: 3.5;
  stroke-linecap: round;
}

.clock-center {
  fill: #27466d;
}

.clock-glow {
  fill: rgba(255, 227, 122, 0.18);
}

.sky-decor,
.cloud {
  position: fixed;
  pointer-events: none;
}

.sky-decor {
  width: 220px;
  height: 220px;
  border-radius: 34% 66% 40% 60%;
  background: rgba(130, 215, 106, 0.22);
  filter: blur(10px);
}

.sky-decor-left {
  left: -50px;
  bottom: 60px;
}

.sky-decor-right {
  right: -40px;
  top: 180px;
  background: rgba(255, 162, 67, 0.22);
}

.cloud {
  background: rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  filter: drop-shadow(0 12px 18px rgba(70, 122, 166, 0.12));
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  background: inherit;
  border-radius: 50%;
}

.cloud-one {
  top: 78px;
  left: 8%;
  width: 134px;
  height: 46px;
}

.cloud-one::before {
  width: 56px;
  height: 56px;
  top: -18px;
  left: 20px;
}

.cloud-one::after {
  width: 64px;
  height: 64px;
  top: -24px;
  right: 16px;
}

.cloud-two {
  top: 110px;
  right: 11%;
  width: 162px;
  height: 52px;
}

.cloud-two::before {
  width: 68px;
  height: 68px;
  top: -22px;
  left: 22px;
}

.cloud-two::after {
  width: 72px;
  height: 72px;
  top: -28px;
  right: 16px;
}

@media (max-width: 980px) {
  .hero-card,
  .question-layout {
    grid-template-columns: 1fr;
  }

  .settings-grid,
  .options-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    justify-content: center;
  }

  .side-panel {
    order: 2;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 16px 14px 34px;
  }

  .hero-card,
  .control-card,
  .start-actions,
  .side-panel,
  .question-panel {
    padding: 18px;
    border-radius: 26px;
  }

  .hero-copy h1 {
    font-size: clamp(2.7rem, 15vw, 4rem);
  }

  .mascot {
    width: 180px;
    height: 180px;
  }

  .big-button {
    min-height: 68px;
  }

  .options-grid.clocks,
  .options-grid {
    grid-template-columns: 1fr;
  }

  .clock-svg.small {
    width: min(52vw, 180px);
  }

  .score-pill {
    min-width: 94px;
    flex: 1 1 94px;
  }

  .mini-language-toggle {
    width: 100%;
    justify-content: center;
  }
}
