/* ============================================
   反応速度テスト - スタイル
   ============================================ */

#rt-area {
  text-align: center;
  padding: 1.5rem 1rem 2rem;
  user-select: none;
  -webkit-user-select: none;
}

/* 進行状況ドット */
#rt-progress {
  margin-bottom: 0.8rem;
  min-height: 1rem;
}

.rt-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e2e8f0;
  margin: 0 4px;
  transition: background 0.2s, transform 0.2s;
}

.rt-dot.done {
  background: #48bb78;
  transform: scale(1.15);
}

/* タップゾーン */
#rt-zone {
  min-height: 320px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

#rt-zone-main {
  font-size: 2.4rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
}

#rt-zone-sub {
  font-size: 1.05rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 0.6rem;
}

#rt-zone-ms {
  font-size: 1.2rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  margin-top: 0.5rem;
  min-height: 1.5rem;
}

/* 状態別の色 */
.rt-idle {
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.rt-waiting {
  background: #e53e3e;
}

.rt-ready {
  background: #38a169;
  animation: rt-pop 0.15s ease-out;
}

.rt-between {
  background: #4a5568;
}

.rt-false {
  background: #dd6b20;
  animation: rt-shake 0.3s ease-out;
}

@keyframes rt-pop {
  0% { transform: scale(0.97); }
  100% { transform: scale(1); }
}

@keyframes rt-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

/* 計測履歴 */
#rt-history {
  margin-top: 0.8rem;
  font-size: 0.9rem;
  color: #718096;
  min-height: 1.3rem;
}

/* 結果表示 */
#rt-result {
  padding: 2rem 1rem;
}

#rt-result-avg {
  font-size: 1.6rem;
  font-weight: 700;
  color: #2d3748;
}

.rt-avg-value {
  font-size: 3.5rem;
  font-weight: 900;
  font-family: 'Courier New', Courier, monospace;
  color: #2b6cb0;
}

#rt-result-rank {
  font-size: 1.6rem;
  font-weight: 900;
  margin: 0.8rem 0;
}

.rank-s { color: #d53f8c; }
.rank-a { color: #dd6b20; }
.rank-b { color: #d69e2e; }
.rank-c { color: #38a169; }
.rank-d { color: #3182ce; }
.rank-e { color: #718096; }
.rank-f { color: #a0aec0; }

#rt-result-detail {
  font-size: 0.95rem;
  color: #718096;
  margin-bottom: 0.6rem;
}

#rt-result-best {
  font-size: 1.05rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 1.2rem;
}

/* ボタン */
.rt-btn {
  font-size: 1.2rem;
  font-weight: 700;
  padding: 0.8rem 2.5rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}

.rt-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

/* スマホ調整 */
@media (max-width: 600px) {
  #rt-zone {
    min-height: 280px;
  }

  #rt-zone-main {
    font-size: 1.9rem;
  }

  .rt-avg-value {
    font-size: 2.8rem;
  }
}
