/* =============================================================================
   [PairReaction] 페어 반응 훈련 스타일
   ============================================================================= */

/* ── 스크롤 활성화 (rot-sub overflow:hidden 오버라이드) ── */
#pr-config,
#pr-play,
#pr-result {
  overflow-y: auto !important;
  overflow-x: hidden;
  padding: 16px;
  padding-bottom: 80px;
}

/* ── 설정 화면 ── */
.pr-title {
  font-size: 22px;
  font-weight: 900;
  color: #1a1a1a;
  text-align: center;
  margin-bottom: 4px;
}

.pr-subtitle {
  font-size: 14px;
  color: #999;
  text-align: center;
  margin-bottom: 20px;
}

/* ── 신호 카드 ── */
.pr-signal-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}

.pr-signal-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #fff;
  border: 2px solid;
  border-radius: 10px;
}

.pr-signal-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 12px currentColor;
}

.pr-signal-name {
  font-size: 14px;
  font-weight: 900;
}

.pr-signal-desc {
  font-size: 11px;
  color: #666;
  margin-top: 2px;
}

/* ── 설정 행 ── */
.pr-setting-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  background: #f8f8f8;
  border-radius: 10px;
}

.pr-setting-label {
  font-size: 14px;
  font-weight: 700;
  color: #333;
  min-width: 100px;
}

.pr-setting-input {
  flex: 1;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  outline: none;
  font-family: 'Noto Sans KR', sans-serif;
}

.pr-setting-input:focus {
  border-color: #1a1a1a;
}

/* ── Python 연결 상태 배지 ── */
.pr-python-status {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  white-space: nowrap;
}

.pr-status-off       { background: #e0e0e0; color: #555; }
.pr-status-connecting { background: #FFF9C4; color: #F57F17; }
.pr-status-connected { background: #C8E6C9; color: #2E7D32; }

/* ── 팀 구성 패널 ── */
.pr-team-panel-title {
  font-size: 16px;
  font-weight: 800;
  color: #333;
  margin: 20px 0 8px 4px;
}

.pr-team-panel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.pr-player-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 6px;
  background: #fff;
  border: 3px solid;
  border-radius: 12px;
  cursor: pointer;
  font-family: 'Noto Sans KR', sans-serif;
  transition: transform 0.1s;
  position: relative;
}

.pr-player-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.pr-player-num {
  font-size: 18px;
  font-weight: 900;
}

.pr-player-team {
  font-size: 13px;
  font-weight: 800;
}

.pr-player-pair {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 10px;
  font-weight: 700;
  color: #999;
  background: #f0f0f0;
  padding: 1px 6px;
  border-radius: 8px;
}

/* ── 버튼 ── */
.pr-btn-connect,
.pr-btn-start,
.pr-btn-back {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  font-family: 'Noto Sans KR', sans-serif;
  margin-bottom: 8px;
}

.pr-btn-connect {
  background: #2196F3;
  color: #fff;
}

.pr-btn-start {
  background: #1a1a1a;
  color: #00FF88;
}

.pr-btn-start:disabled {
  background: #ccc;
  color: #888;
  cursor: not-allowed;
}

.pr-btn-back {
  background: transparent;
  border: 1px solid #e0e0e0;
  color: #999;
  font-size: 14px;
  padding: 10px;
}

/* ── 플레이 화면 ── */
#pr-play {
  text-align: center;
}

#pr-play-content {
  padding: 40px 20px;
}

.pr-play-main {
  font-size: 140px;
  font-weight: 900;
  font-family: 'Share Tech Mono', monospace;
  text-shadow: 0 0 40px currentColor;
  letter-spacing: 4px;
  line-height: 1.1;
  margin-bottom: 12px;
  animation: pr-pulse 0.6s ease-in-out infinite alternate;
}

@keyframes pr-pulse {
  from { transform: scale(1); }
  to { transform: scale(1.05); }
}

.pr-play-sub {
  font-size: 24px;
  font-weight: 700;
  color: #555;
  margin-top: 8px;
}

.pr-round-indicator {
  font-size: 18px;
  color: #999;
  font-weight: 700;
  margin-top: 20px;
}

/* ── 라운드 결과 ── */
.pr-round-result {
  padding: 40px 20px;
}

.pr-round-num {
  font-size: 18px;
  color: #999;
  font-weight: 700;
  margin-bottom: 12px;
}

.pr-winner {
  font-size: 56px;
  font-weight: 900;
  color: #1a1a1a;
  margin-bottom: 16px;
}

.pr-reaction-time {
  font-family: 'Share Tech Mono', monospace;
  font-size: 48px;
  color: #00C853;
  font-weight: 900;
  text-shadow: 0 0 20px rgba(0, 200, 83, 0.3);
}

/* ── 결과 화면 ── */
.pr-result-title {
  font-size: 24px;
  font-weight: 900;
  color: #1a1a1a;
  text-align: center;
  margin-bottom: 20px;
}

.pr-result-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.pr-result-card {
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}

.pr-result-rank {
  font-size: 24px;
  margin-bottom: 4px;
}

.pr-result-name {
  font-size: 16px;
  font-weight: 900;
  margin-bottom: 6px;
}

.pr-result-wins {
  font-family: 'Share Tech Mono', monospace;
  font-size: 20px;
  font-weight: 900;
  color: #1a1a1a;
}

.pr-result-avg {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
}

.pr-result-actions {
  margin-top: 16px;
}

/* ── 모바일 반응형 ── */
@media (max-width: 768px) {
  .pr-team-panel { grid-template-columns: repeat(4, 1fr); }
  .pr-play-main { font-size: 90px; }
  .pr-play-sub { font-size: 18px; }
  .pr-winner { font-size: 40px; }
  .pr-reaction-time { font-size: 36px; }
}

@media (max-width: 480px) {
  .pr-signal-info { grid-template-columns: 1fr; }
  .pr-result-cards { grid-template-columns: 1fr; }
  .pr-play-main { font-size: 70px; }
  .pr-player-num { font-size: 14px; }
  .pr-player-team { font-size: 11px; }
}