/* Kid Games & Lessons Common Stylesheet */
:root {
  --primary-purple: #6c5ce7;
  --secondary-purple: #a29bfe;
  --accent-orange: #ff7675;
  --accent-yellow: #fdcb6e;
  --accent-green: #00b894;
  --accent-blue: #0984e3;
  --bg-soft: #f8fafc;
  --navy: #2d3436;
}

body {
  margin: 0;
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  background: #f0f4f8;
  color: var(--navy);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header Navbar */
.game-nav {
  height: 70px;
  background: #ffffff;
  border-bottom: 2px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  sticky: top;
  z-index: 100;
}

.game-nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 20px;
  font-weight: 900;
  color: var(--primary-purple);
}

.game-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-back-hub {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #edf2f7;
  color: #4a5568;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.2s ease;
}

.btn-back-hub:hover {
  background: var(--primary-purple);
  color: #ffffff;
}

/* Game Main Layout */
.game-container {
  max-width: 960px;
  width: calc(100% - 32px);
  margin: 24px auto 40px;
  flex-grow: 1;
}

.game-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 28px 24px;
  box-shadow: 0 16px 40px rgba(108, 92, 231, 0.12), 0 0 0 1px rgba(108, 92, 231, 0.08);
  position: relative;
  overflow: hidden;
}

.game-header {
  text-align: center;
  margin-bottom: 24px;
}

.game-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent-orange), #d63031);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  padding: 4px 14px;
  border-radius: 16px;
  letter-spacing: 1px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.game-title {
  font-size: 32px;
  font-weight: 900;
  color: #2d3436;
  margin: 4px 0 8px;
}

.game-subtitle {
  font-size: 16px;
  font-weight: 700;
  color: #636e72;
  margin: 0;
}

/* Score HUD */
.game-hud-bar {
  display: flex;
  justify-content: space-around;
  background: #f8f9fe;
  border-radius: 16px;
  padding: 12px 16px;
  margin-bottom: 24px;
  border: 1px solid #e9e5ff;
}

.hud-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
}

.hud-box span {
  font-size: 20px;
}

.hud-box strong {
  font-size: 20px;
  color: var(--primary-purple);
  font-weight: 900;
}

/* Interactive Stage */
.stage-area {
  min-height: 320px;
  background: linear-gradient(180deg, #fdfbfb 0%, #ebedee 100%);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 2px dashed #dcdde1;
}

/* Controls & Bottom Nav */
.game-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #edf2f7;
}

.btn-nav-prev, .btn-nav-next {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-nav-prev {
  background: #edf2f7;
  color: #4a5568;
}

.btn-nav-prev:hover {
  background: #cbd5e0;
}

.btn-nav-next {
  background: linear-gradient(135deg, var(--primary-purple), #574b90);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(108, 92, 231, 0.3);
}

.btn-nav-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(108, 92, 231, 0.45);
}

/* Sound Button */
.btn-speaker {
  background: #ffeaa7;
  border: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(253, 203, 110, 0.4);
  transition: transform 0.2s ease;
  display: grid;
  place-items: center;
}

.btn-speaker:hover {
  transform: scale(1.1);
}

/* Cards Grid for Hub */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.hub-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 20px;
  border: 1px solid #edf2f7;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.hub-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 36px rgba(108, 92, 231, 0.15);
  border-color: var(--secondary-purple);
}

.hub-card-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 26px;
  margin-bottom: 12px;
}

.bg-purple { background: #f0eaff; color: #6c5ce7; }
.bg-orange { background: #fff0e6; color: #ff7675; }
.bg-green { background: #e6f9f0; color: #00b894; }
.bg-blue { background: #e6f3ff; color: #0984e3; }
.bg-yellow { background: #fffdf0; color: #fdcb6e; }

.hub-card-title {
  font-size: 18px;
  font-weight: 900;
  margin: 0 0 6px;
}

.hub-card-desc {
  font-size: 13px;
  color: #636e72;
  margin: 0 0 16px;
  flex-grow: 1;
}

.hub-card-btn {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary-purple);
  display: flex;
  align-items: center;
  gap: 4px;
}

@media (max-width: 600px) {
  .game-title { font-size: 24px; }
  .stage-area { padding: 16px; min-height: 260px; }
}
