﻿:root {
  --bg-top: #fff5ee;
  --bg-bottom: #eef8ff;
  --panel: rgba(255, 255, 255, 0.88);
  --text: #355070;
  --text-soft: #627696;
  --primary: #ff8fab;
  --primary-dark: #f15b85;
  --secondary: #8ecae6;
  --secondary-dark: #4f93c2;
  --accent: #ffd166;
  --accent-dark: #d69a00;
  --success: #7bd389;
  --success-dark: #42b883;
  --danger: #ff7b7b;
  --danger-dark: #d64d4d;
  --shadow: 0 18px 40px rgba(111, 131, 166, 0.18);
  --shadow-soft: 0 10px 25px rgba(111, 131, 166, 0.12);
  --radius-xl: 34px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Nunito", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 214, 165, 0.5), transparent 35%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(6px);
  opacity: 0.45;
  pointer-events: none;
}

.orb-a {
  top: -80px;
  left: -60px;
  width: 280px;
  height: 280px;
  background: #ffd6e0;
}

.orb-b {
  top: 180px;
  right: -40px;
  width: 240px;
  height: 240px;
  background: #cdeffd;
}

.orb-c {
  bottom: -90px;
  left: 12%;
  width: 300px;
  height: 300px;
  background: #fff1bf;
}

.top-banner {
  position: relative;
  z-index: 1;
  padding: 24px 20px 0;
}

.brand-lockup {
  max-width: 1120px;
  margin: 0 auto;
}

.top-tools {
  margin-top: 18px;
  display: flex;
  justify-content: flex-start;
}

.brand-badge,
.section-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--primary-dark);
  box-shadow: var(--shadow-soft);
  font-size: 0.95rem;
  font-weight: 800;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Baloo 2", cursive;
  line-height: 1;
}

h1 {
  margin-top: 8px;
  font-size: clamp(2.8rem, 5vw, 4.6rem);
  color: #3d5a80;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.brand-lockup p,
.screen-copy {
  margin: 12px 0 0;
  max-width: 760px;
  color: var(--text-soft);
  font-size: 1.05rem;
  line-height: 1.5;
}

.screen-stack {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 20px 48px;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
  animation: rise-in 0.45s ease;
}

.panel,
.hero-panel {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
}

.hero-panel {
  position: relative;
  border-radius: 38px;
  padding: 32px;
  display: grid;
  gap: 28px;
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.65), transparent 18%),
    radial-gradient(circle at 82% 24%, rgba(255, 209, 102, 0.25), transparent 20%),
    radial-gradient(circle at 72% 82%, rgba(142, 202, 230, 0.2), transparent 16%);
  pointer-events: none;
}

.hero-copy,
.preview-card,
.hero-actions {
  position: relative;
  z-index: 1;
}

.preview-card,
.panel {
  border-radius: var(--radius-xl);
  padding: 28px;
}

.panel-heading {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.hidden {
  display: none !important;
}

.blank-box {
  min-height: 110px;
  border-radius: 28px;
  border: 3px dashed rgba(61, 90, 128, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 255, 0.96));
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  font-family: "Baloo 2", cursive;
  font-size: clamp(1.45rem, 2.6vw, 2.2rem);
}

.blank-box.idle {
  color: var(--text-soft);
}

.blank-box.correct {
  color: var(--success-dark);
  border-color: rgba(66, 184, 131, 0.4);
  background: linear-gradient(180deg, #f3fff7, #edfff5);
}

.blank-box.wrong {
  color: var(--danger-dark);
  border-color: rgba(214, 77, 77, 0.36);
  background: linear-gradient(180deg, #fff6f6, #fff0f0);
}

.blank-box.hinting {
  color: rgba(61, 90, 128, 0.35);
}

.analyzer-box {
  margin-top: 16px;
  min-height: 86px;
  display: grid;
  grid-template-columns: 54px 1fr 36px;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(246, 249, 255, 0.98), rgba(234, 244, 255, 0.98));
  border: 2px solid rgba(142, 202, 230, 0.28);
}

.analyzer-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: white;
  box-shadow: var(--shadow-soft);
  font-size: 1.25rem;
}

.analyzer-canvas {
  width: 100%;
  height: 54px;
}

.record-dot {
  width: 18px;
  height: 18px;
  margin: 0 auto;
  border-radius: 50%;
  background: rgba(255, 123, 123, 0.4);
  box-shadow: 0 0 0 8px rgba(255, 123, 123, 0.08);
  transition: transform 0.2s ease, background 0.2s ease;
}

.record-dot.active {
  background: #ff4d4d;
  transform: scale(1.16);
  animation: pulse 1s ease infinite;
}

.hero-actions,
.setup-actions,
.modal-actions,
.leaderboard-actions,
.game-controls,
.menu-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: center;
}

.hero-actions {
  justify-content: flex-start;
}

.game-button,
.icon-button {
  border: none;
  border-radius: 999px;
  min-height: 56px;
  padding: 0 26px;
  font-weight: 800;
  color: white;
  box-shadow: 0 12px 20px rgba(101, 128, 163, 0.16);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.game-button:hover,
.icon-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 24px rgba(101, 128, 163, 0.22);
}

.game-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.game-button.primary {
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
}

.game-button.secondary {
  background: linear-gradient(180deg, var(--secondary), var(--secondary-dark));
}

.game-button.accent {
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
}

.game-button.success {
  background: linear-gradient(180deg, var(--success), var(--success-dark));
}

.game-button.danger {
  background: linear-gradient(180deg, var(--danger), var(--danger-dark));
}

.game-button.ghost,
.icon-button {
  color: var(--text);
  background: linear-gradient(180deg, #ffffff, #edf6ff);
}

.icon-button {
  min-width: 64px;
  padding: 0;
  font-size: 1.4rem;
  color: var(--secondary-dark);
}

.setup-panel,
.menu-panel,
.leaderboard-panel {
  max-width: 960px;
  margin: 0 auto;
}

.field-label {
  display: block;
  margin-bottom: 10px;
  font-weight: 800;
  color: var(--text-soft);
}

.name-input {
  width: 100%;
  min-height: 60px;
  border-radius: 20px;
  border: 2px solid rgba(142, 202, 230, 0.42);
  padding: 0 20px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
  outline: none;
}

.name-input:focus {
  border-color: rgba(255, 143, 171, 0.8);
}

.avatar-group {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.avatar-card {
  border: 3px solid transparent;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(242, 248, 255, 0.95));
  padding: 18px 14px;
  display: grid;
  gap: 10px;
  justify-items: center;
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.avatar-card img {
  width: 86px;
  height: 86px;
  object-fit: contain;
}

.avatar-card.selected {
  border-color: rgba(255, 143, 171, 0.7);
  transform: translateY(-2px);
}

.setup-actions {
  margin-top: 22px;
  justify-content: space-between;
}

.player-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #f1f8ff);
  box-shadow: var(--shadow-soft);
  font-weight: 800;
}

.player-chip img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.review-chip {
  color: var(--secondary-dark);
}

.round-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.round-card {
  position: relative;
  border: none;
  border-radius: 28px;
  padding: 22px;
  text-align: left;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.75), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.96));
  box-shadow: var(--shadow-soft);
}

.round-card h3 {
  font-size: 1.75rem;
}

.round-card p {
  margin: 10px 0 0;
  color: var(--text-soft);
  line-height: 1.45;
}

.round-card span {
  display: inline-flex;
  margin-top: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  font-weight: 800;
  color: var(--primary-dark);
}

.round-card.completed {
  opacity: 0.78;
}

.round-card.completed::after {
  content: "Done";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: "Baloo 2", cursive;
  font-size: 4.5rem;
  color: rgba(66, 184, 131, 0.78);
  background: rgba(255, 255, 255, 0.32);
  border-radius: inherit;
}

.game-layout {
  display: grid;
  gap: 18px;
}

.hud-row,
.level-copy,
.question-card,
.hud-cluster {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.round-badge-wrap h2 {
  margin-top: 4px;
}

.hud-cluster {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.hud-pill,
.level-panel {
  background: rgba(255, 255, 255, 0.82);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
}

.hud-pill {
  min-width: 105px;
  padding: 14px 16px;
  text-align: center;
}

.hud-label {
  display: block;
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 800;
}

.hud-pill strong {
  display: block;
  margin-top: 4px;
  font-size: 1.5rem;
}

.timer-pill strong {
  color: var(--danger-dark);
}

.level-panel {
  padding: 16px 18px;
}

.level-copy {
  font-weight: 800;
  color: var(--text-soft);
}

.progress-track {
  margin-top: 10px;
  width: 100%;
  height: 16px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(142, 202, 230, 0.22);
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8ecae6, #ff8fab, #ffd166);
  transition: width 0.25s ease;
}

.game-panel {
  padding: 24px;
}

.question-card {
  gap: 20px;
  align-items: stretch;
}

.question-media {
  flex: 1;
  min-height: 280px;
  border-radius: 28px;
  padding: 18px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.9), transparent 18%),
    linear-gradient(180deg, rgba(255, 249, 251, 0.98), rgba(238, 248, 255, 0.98));
  display: grid;
  place-items: center;
}

.question-media img {
  width: min(100%, 320px);
  max-height: 320px;
  object-fit: contain;
  filter: drop-shadow(0 12px 20px rgba(74, 97, 128, 0.16));
}

.question-controls {
  width: 170px;
  display: grid;
  gap: 12px;
  align-content: center;
}

.robot-feedback {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(242, 255, 245, 0.96), rgba(231, 255, 237, 0.98));
  border: 2px solid rgba(123, 211, 137, 0.32);
}

.robot-feedback-image {
  width: 90px;
  height: 90px;
  object-fit: contain;
}

.robot-feedback p {
  margin: 8px 0 0;
  color: var(--text-soft);
}

.progress-dots {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.progress-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(142, 202, 230, 0.28);
}

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

.progress-dot.wrong {
  background: var(--danger);
}

.game-controls {
  margin-top: 20px;
}

.leaderboard-list {
  display: grid;
  gap: 14px;
}

.leaderboard-card {
  border: none;
  width: 100%;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 248, 255, 0.98));
  box-shadow: var(--shadow-soft);
  padding: 16px 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  text-align: left;
  color: var(--text);
}

.leaderboard-rank {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #ffd166, #f6b73c);
  color: white;
  font-family: "Baloo 2", cursive;
  font-size: 1.45rem;
}

.leaderboard-player {
  display: flex;
  align-items: center;
  gap: 14px;
}

.leaderboard-player img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 50%;
  background: white;
}

.leaderboard-player strong {
  display: block;
  font-size: 1.1rem;
}

.leaderboard-player span,
.leaderboard-score span,
.modal-card p {
  color: var(--text-soft);
}

.leaderboard-score {
  text-align: right;
}

.leaderboard-score strong {
  display: block;
  font-size: 1.35rem;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(53, 80, 112, 0.36);
  backdrop-filter: blur(5px);
}

.modal-card {
  width: min(540px, 100%);
  border-radius: 32px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  text-align: center;
}

.values-modal {
  width: min(760px, 100%);
  text-align: left;
}

.values-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  align-items: center;
}

.values-graphic {
  position: relative;
  min-height: 240px;
  border-radius: 28px;
  padding: 18px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.92), transparent 20%),
    linear-gradient(180deg, rgba(255, 242, 229, 0.95), rgba(233, 246, 255, 0.98));
}

.values-graphic-ring {
  position: absolute;
  inset: 18px;
  border-radius: 24px;
  border: 4px dashed rgba(255, 143, 171, 0.28);
}

.values-graphic img {
  position: relative;
  z-index: 1;
  width: min(100%, 180px);
  max-height: 190px;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(74, 97, 128, 0.15));
}

.values-content {
  display: grid;
  gap: 12px;
}

.values-grid {
  display: grid;
  gap: 14px;
}

.value-card {
  border-radius: 24px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.value-card strong {
  display: block;
  font-family: "Baloo 2", cursive;
  font-size: 1.35rem;
}

.value-card p {
  margin: 8px 0 0;
  color: var(--text-soft);
  line-height: 1.55;
}

.knowledge-card {
  background: linear-gradient(180deg, rgba(233, 246, 255, 0.98), rgba(244, 251, 255, 0.98));
}

.care-card {
  background: linear-gradient(180deg, rgba(255, 243, 232, 0.98), rgba(255, 250, 243, 0.98));
}

.summary-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.summary-chip,
.detail-item {
  border-radius: 22px;
  padding: 16px;
  background: linear-gradient(180deg, #fffaf3, #f5fbff);
}

.summary-chip span,
.detail-item span {
  display: block;
  color: var(--text-soft);
  font-weight: 800;
}

.summary-chip strong,
.detail-item strong {
  display: block;
  margin-top: 8px;
  font-size: 1.35rem;
}

.detail-list {
  margin: 18px 0;
  display: grid;
  gap: 12px;
  text-align: left;
}

@keyframes pulse {
  50% {
    box-shadow: 0 0 0 14px rgba(255, 123, 123, 0.08);
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

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

@media (max-width: 840px) {
  .question-card,
  .hud-row,
  .level-copy {
    flex-direction: column;
    align-items: stretch;
  }

  .question-controls {
    width: 100%;
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-panel,
  .preview-card,
  .panel,
  .modal-card {
    padding: 20px;
  }

  .values-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .screen-stack {
    padding: 16px 14px 40px;
  }

  .top-banner {
    padding: 18px 14px 0;
  }

  h1 {
    font-size: 2.6rem;
  }

  h2 {
    font-size: 2rem;
  }

  .avatar-group,
  .round-grid {
    grid-template-columns: 1fr;
  }

  .leaderboard-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .leaderboard-player,
  .leaderboard-score {
    justify-content: center;
    text-align: center;
  }
}

