* { box-sizing: border-box; }
body { margin: 0; font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; }

.cn-outer {
  min-height: 100vh;
  background: radial-gradient(circle, #4ec5e0 0%, #2ba8c9 100%);
  background-image: radial-gradient(circle, rgba(255,255,255,0.25) 2px, transparent 2px);
  background-size: 26px 26px;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}

.cn-container {
  width: 100%; max-width: 720px; background: #fff8ec; border-radius: 22px; overflow: hidden;
  box-shadow: 0 18px 45px rgba(0,0,0,0.2);
}

.cn-header {
  background: #ffca3a; color: #4a3200; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.cn-instruction { font-size: 13px; font-weight: 700; }
.cn-header-right { display: flex; align-items: center; gap: 14px; }
.cn-progress, .cn-life { font-size: 13px; font-weight: 800; }
.cn-home-btn { background: #2ecc71; color: #fff; border: none; border-radius: 20px; padding: 6px 16px; font-size: 12px; font-weight: 700; cursor: pointer; }

.cn-loading, .cn-warning { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; gap: 14px; color: #3a3a3a; }
.cn-spinner { width: 36px; height: 36px; border: 4px solid #cfe8ff; border-top-color: #2ba8c9; border-radius: 50%; animation: cn-spin 0.8s linear infinite; }
@keyframes cn-spin { to { transform: rotate(360deg); } }
.cn-warning-icon { font-size: 40px; }

.cn-question-panel { padding: 34px 20px 10px; text-align: center; }
.cn-question-text { font-size: 40px; font-weight: 900; color: #2c3e50; letter-spacing: 4px; }

.cn-balloons { display: flex; justify-content: center; gap: 26px; padding: 20px 20px 34px; flex-wrap: wrap; }
.cn-balloon {
  position: relative;
  width: 96px; height: 116px;
  border: none;
  border-radius: 50% 50% 50% 50% / 58% 58% 42% 42%;
  background: radial-gradient(circle at 35% 30%, #ff9ecb, #e0448a 75%);
  color: #fff; font-size: 34px; font-weight: 900;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
  transition: transform 0.15s;
}
.cn-balloon::after {
  content: ''; position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%);
  width: 2px; height: 18px; background: #999;
}
.cn-balloon:nth-child(2) { background: radial-gradient(circle at 35% 30%, #9ecbff, #4477e0 75%); }
.cn-balloon:nth-child(3) { background: radial-gradient(circle at 35% 30%, #b7f0a0, #4aa844 75%); }
.cn-balloon:hover { transform: translateY(-6px) scale(1.05); }
.cn-balloon.correct { background: radial-gradient(circle at 35% 30%, #baffce, #2ecc71 75%); animation: cn-float 0.5s; }
.cn-balloon.incorrect { background: radial-gradient(circle at 35% 30%, #ffb3ab, #e74c3c 75%); animation: cn-shake 0.4s; }
.cn-balloon:disabled { cursor: default; }
@keyframes cn-float { 0% { transform: translateY(0); } 100% { transform: translateY(-40px); opacity: 0; } }
@keyframes cn-shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

.cn-feedback { text-align: center; font-size: 14px; font-weight: 700; padding: 10px; margin: 0 20px 20px; border-radius: 10px; }
.cn-feedback-correct { background: #e6f9ee; color: #1e8449; }
.cn-feedback-incorrect { background: #fdecea; color: #c0392b; }

.cn-result { text-align: center; padding: 50px 30px; }
.cn-result-icon { font-size: 56px; margin-bottom: 8px; }
.cn-result h2 { margin: 0 0 8px; color: #2f3542; }
.cn-result p { color: #6b6b6b; margin: 0 0 20px; }
.cn-result-stats { display: flex; justify-content: center; gap: 30px; margin-bottom: 24px; }
.cn-result-stats span { display: block; font-size: 26px; font-weight: 800; color: #ff9f1c; }
.cn-result-stats small { color: #999; font-size: 12px; }
.cn-result-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

.cn-btn { border: none; border-radius: 12px; padding: 12px 26px; font-size: 14px; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.cn-btn-primary { background: #2ecc71; color: #fff; }
.cn-btn-secondary { background: #5b8def; color: #fff; }

.cn-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.cn-modal { background: #fff; border-radius: 16px; padding: 26px 24px; max-width: 340px; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,0.3); }
.cn-modal p { font-size: 15px; font-weight: 600; color: #2f3542; margin: 0 0 18px; }
.cn-modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 560px) {
  .cn-instruction { flex-basis: 100%; text-align: center; order: 1; font-size: 11px; }
  .cn-header-right { order: 2; margin: 0 auto; }
  .cn-question-text { font-size: 28px; }
  .cn-balloon { width: 74px; height: 90px; font-size: 26px; }
  .cn-btn { width: 100%; justify-content: center; }
}
