/* 시간 맞히기 — 10초 정확히 멈추기 (5라운드) */

.round-progress {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
}

.round-progress .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transition: background 0.2s, transform 0.2s;
}

.round-progress .dot[data-state="active"] {
  background: var(--accent);
  transform: scale(1.3);
  box-shadow: 0 0 12px var(--accent);
}

.round-progress .dot[data-state="done"] {
  background: #2ed573;
}

.stoptime-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: min(60vh, 460px);
  border-radius: 24px;
  cursor: pointer;
  user-select: none;
  text-align: center;
  padding: 40px 24px;
  transition: background 0.15s ease;
  color: #fff;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.stoptime-area[data-status="idle"]    { background: linear-gradient(135deg, #6b5fff, #9d80ff); }
.stoptime-area[data-status="running"] { background: linear-gradient(135deg, #2c3e9c, #4655c4); }
.stoptime-area[data-status="result"]  { background: linear-gradient(135deg, #2c3e50, #57606f); }

.stoptime-area:active {
  transform: scale(0.99);
}

.stoptime-icon {
  font-size: clamp(3.5rem, 12vw, 5rem);
  margin-bottom: 12px;
  line-height: 1;
}

.stoptime-area[data-status="running"] .stoptime-icon {
  animation: tick 1s ease-in-out infinite;
}

@keyframes tick {
  0%, 100% { transform: rotate(-3deg); }
  50%      { transform: rotate(3deg); }
}

.stoptime-title {
  font-size: clamp(1.1rem, 4vw, 1.4rem);
  margin-bottom: 8px;
  font-weight: 600;
  opacity: 0.95;
}

.stoptime-msg {
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 800;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.stoptime-sub {
  font-size: 0.95rem;
  opacity: 0.9;
  max-width: 320px;
}

.hint {
  text-align: center;
  margin-top: 20px;
  color: var(--text-dim);
  font-size: 0.9rem;
  padding: 0 16px;
}

/* ===== 결과 모달 ===== */

.result-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 41, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
  animation: fadeIn 0.25s ease;
}

.result-modal.hidden { display: none; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.result-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px 28px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.result-emoji { font-size: 4rem; margin-bottom: 8px; }
.result-card h2 { font-size: 1.5rem; margin-bottom: 8px; }
.result-msg { color: var(--text-dim); margin-bottom: 24px; }

.result-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.result-stats > div {
  background: rgba(255,255,255,0.05);
  padding: 14px;
  border-radius: 12px;
}
.result-stats span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.result-stats strong {
  font-size: 1.6rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.result-rank {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 8px 0 16px;
  color: var(--accent);
}

.rounds-detail {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.rounds-detail .pill {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
}

.rounds-detail .pill.best {
  background: rgba(46, 213, 115, 0.15);
  border-color: rgba(46, 213, 115, 0.4);
  color: #2ed573;
  font-weight: 700;
}

.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

.result-actions .btn {
  padding: 12px 16px;
  text-align: center;
  font-size: 0.95rem;
}
