/* g45 五秒说三个 - 样式 */

.g45-root {
  --cream: #fff8e8;
  --ink: #24233a;
  --pink: #ffb8c9;
  --purple: #bfc3ff;
  --yellow: #ffe26f;
  --mint: #aee8df;
  --red: #ff6b6b;
  --radius: 16px;
  --border: 3px solid var(--ink);
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--cream);
  color: var(--ink);
  min-height: 100%;
  padding: 16px;
  box-sizing: border-box;
}

.g45-root * { box-sizing: border-box; }

.g45-setup, .g45-game, .g45-finish {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px 16px;
}

.g45-setup h2, .g45-finish h2 {
  font-size: 1.5rem;
  margin: 0;
  text-align: center;
}

.g45-field {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.g45-field label {
  font-size: 1rem;
  font-weight: 600;
}

.g45-field input {
  width: 80px;
  height: 48px;
  font-size: 1.2rem;
  text-align: center;
  border: var(--border);
  border-radius: var(--radius);
  background: white;
}

.g45-btn {
  min-height: 48px;
  min-width: 48px;
  padding: 12px 24px;
  font-size: 1.1rem;
  font-weight: 700;
  border: var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
  touch-action: manipulation;
}

.g45-btn:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.g45-btn:active {
  transform: translateY(2px);
  box-shadow: none;
}

.g45-btn--primary {
  background: var(--pink);
  box-shadow: 0 4px 0 var(--ink);
}

.g45-btn--secondary {
  background: var(--purple);
  box-shadow: 0 4px 0 var(--ink);
}

.g45-btn--warn {
  background: var(--yellow);
  box-shadow: 0 4px 0 var(--ink);
}

.g45-btn--mint {
  background: var(--mint);
  box-shadow: 0 4px 0 var(--ink);
}

.g45-btn--danger {
  background: var(--red);
  color: white;
  box-shadow: 0 4px 0 var(--ink);
}

.g45-btn--ghost {
  background: transparent;
  border: 2px solid var(--ink);
  box-shadow: none;
}

.g45-turn-info {
  background: var(--yellow);
  border: var(--border);
  border-radius: var(--radius);
  padding: 8px 16px;
  font-size: 1.1rem;
  font-weight: 600;
}

.g45-question-card {
  background: white;
  border: var(--border);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 360px;
  width: 100%;
  text-align: center;
}

.g45-question-label {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  color: #666;
}

.g45-question-text {
  font-size: 1.4rem;
  line-height: 1.5;
  font-weight: 700;
}

/* 大倒计时 */
.g45-countdown {
  font-size: 6rem;
  font-weight: 900;
  text-align: center;
  line-height: 1;
  padding: 24px;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.g45-countdown--urgent {
  color: var(--red);
  animation: g45-pulse 0.5s ease-in-out infinite alternate;
}

@keyframes g45-pulse {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

/* 裁定页 */
.g45-judge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.g45-judge-title {
  font-size: 1.3rem;
  font-weight: 700;
}

.g45-judge-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* 进度 */
.g45-progress {
  display: flex;
  gap: 8px;
}

.g45-progress-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: transparent;
}

.g45-progress-dot--done {
  background: var(--mint);
}

/* 排行榜 */
.g45-scoreboard {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 300px;
}

.g45-score-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  border: var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
}

.g45-score-row--top {
  background: var(--yellow);
}

.g45-score-name {
  font-weight: 600;
}

.g45-score-value {
  font-weight: 800;
  font-size: 1.2rem;
}

.g45-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

@media (prefers-reduced-motion: reduce) {
  .g45-btn { transition: none; }
  .g45-btn:active { transform: none; }
  .g45-countdown--urgent { animation: none; }
}

@media (max-width: 360px) {
  .g45-root { padding: 12px 8px; }
  .g45-countdown { font-size: 4rem; min-height: 120px; }
  .g45-question-card { padding: 16px; }
  .g45-actions { gap: 8px; }
  .g45-btn { padding: 10px 16px; font-size: 1rem; }
}
