* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f7f9fc;
  color: #222;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 16px;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

h1 {
  font-size: 28px;
  text-align: center;
  margin: 20px 0 8px;
  color: #2b6cb0;
}

h2 {
  font-size: 18px;
  margin: 12px 0;
}

.subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 20px;
}

.card {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

button {
  border: none;
  border-radius: 12px;
  font-size: 16px;
  padding: 14px 16px;
  margin: 8px 0;
  width: 100%;
  min-height: 44px;
  cursor: pointer;
  background: #e2e8f0;
  color: #222;
}

button:active {
  transform: scale(0.98);
}

.age-btn {
  background: #bee3f8;
  font-weight: bold;
}

.big-btn {
  background: #38a169;
  color: #fff;
  font-size: 18px;
  font-weight: bold;
}

.small-btn {
  width: auto;
  min-width: 44px;
  padding: 8px 12px;
  font-size: 14px;
  margin: 0 4px;
  background: #edf2f7;
}

.back-btn {
  background: #cbd5e0;
}

.theme-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.theme-item {
  background: #fff;
  border-radius: 14px;
  padding: 18px 10px;
  text-align: center;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  cursor: pointer;
}

.theme-item:active {
  background: #ebf8ff;
}

.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.game-header span {
  font-size: 14px;
  color: #555;
}

.stars {
  text-align: center;
  font-size: 20px;
  margin: 8px 0 16px;
}

.question-area {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  min-height: 220px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.question-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 12px;
  text-align: center;
}

.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.option {
  background: #f7fafc;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 8px;
  text-align: center;
  font-size: 16px;
  cursor: pointer;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.option.correct {
  border-color: #38a169;
  background: #f0fff4;
}

.option.wrong {
  border-color: #e53e3e;
  background: #fff5f5;
}

.option .emoji {
  font-size: 36px;
  margin-bottom: 6px;
}

.feedback {
  min-height: 48px;
  text-align: center;
  font-size: 16px;
  margin: 12px 0;
  color: #2b6cb0;
}

.game-footer {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hidden {
  display: none !important;
}

@media (max-width: 360px) {
  .options {
    grid-template-columns: 1fr;
  }
  .theme-list {
    grid-template-columns: 1fr;
  }
}