/* ==========================================================================
   Orbit Signal (轨道信号对齐) - 交互式时序小游戏样式
   Design: Editorial Technology with Warm Ivory, Dark Plum & Copper Bezel
   Features: Circular Track, Generous Target Zone, Responsive, Reduced Motion
   ========================================================================== */

.orbit-game-section {
  background: radial-gradient(circle at 50% 30%, #F5EFE6 0%, #EFE7DC 100%);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}

.game-container-card {
  background-color: var(--color-ivory-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow-card);
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

/* Header & Status Bar */
.game-top-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px dashed var(--color-border);
  margin-bottom: 2rem;
}

.game-round-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-copper-dark);
  background-color: var(--color-copper-soft);
  border: 1px solid var(--color-border-copper);
  padding: 0.4rem 0.95rem;
  border-radius: var(--radius-full);
}

.game-score-display {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-family: var(--font-mono);
}

.game-score-label {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.game-score-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-plum-deep);
  line-height: 1;
}

.game-mode-toggle-btn {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.85rem;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--color-text-body);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.game-mode-toggle-btn:hover {
  background-color: var(--color-ivory-subtle);
  border-color: var(--color-copper);
  color: var(--color-plum-deep);
}

.game-mode-toggle-btn.active {
  background-color: var(--color-copper-soft);
  border-color: var(--color-copper);
  color: var(--color-copper-dark);
}

/* Instructions Banner */
.game-instructions-box {
  background-color: var(--color-ivory-subtle);
  border-left: 3px solid var(--color-copper);
  padding: 0.85rem 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.88rem;
  color: var(--color-text-body);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.game-instructions-text {
  line-height: 1.5;
}

.game-shortcut-hint {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background-color: var(--color-ivory-surface);
  border: 1px solid var(--color-border);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  color: var(--color-plum-primary);
  white-space: nowrap;
}

/* Arena & Circular Track Stage */
.game-stage-arena {
  position: relative;
  width: 320px;
  height: 320px;
  margin: 1.5rem auto 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.game-track-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 8px 24px rgba(37, 18, 36, 0.08));
}

/* Circular Track SVG Elements */
.track-bg {
  fill: none;
  stroke: rgba(56, 27, 52, 0.12);
  stroke-width: 14;
}

.track-inner-grid {
  fill: none;
  stroke: rgba(56, 27, 52, 0.05);
  stroke-width: 1;
  stroke-dasharray: 4 6;
}

.target-zone-arc {
  fill: none;
  stroke: var(--color-copper);
  stroke-width: 18;
  stroke-linecap: round;
  filter: drop-shadow(0 0 8px rgba(200, 109, 81, 0.45));
  transition: stroke 0.2s ease;
}

.target-zone-arc.hit-pulse {
  stroke: var(--color-success);
  filter: drop-shadow(0 0 16px rgba(46, 125, 82, 0.7));
}

.target-zone-arc.miss-pulse {
  stroke: #C23E3E;
  filter: drop-shadow(0 0 14px rgba(194, 62, 62, 0.5));
}

/* Moving Signal Marker */
.signal-marker {
  fill: #FFFFFF;
  stroke: var(--color-plum-deep);
  stroke-width: 4;
  filter: drop-shadow(0 0 10px rgba(200, 109, 81, 0.9));
  transition: r 0.1s ease;
}

.signal-marker-halo {
  fill: rgba(200, 109, 81, 0.35);
  animation: haloPulse 1.2s infinite alternate ease-in-out;
}

@keyframes haloPulse {
  from { r: 16; opacity: 0.4; }
  to { r: 24; opacity: 0.8; }
}

/* Center Telemetry Readout */
.arena-center-readout {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, #FFFFFF 0%, #F5F0E8 100%);
  border: 1px solid var(--color-border-copper);
  box-shadow: 0 4px 18px rgba(37, 18, 36, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.center-speed-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.center-status-text {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-plum-deep);
  line-height: 1.2;
  margin: 0.2rem 0;
}

.center-diff-value {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-copper-dark);
}

/* Feedback Banner / Immediate Result */
.game-feedback-bar {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  text-align: center;
}

.feedback-toast {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.5rem 1.4rem;
  border-radius: var(--radius-full);
  animation: feedbackPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feedback-toast.perfect {
  background-color: rgba(46, 125, 82, 0.12);
  color: var(--color-success);
  border: 1px solid rgba(46, 125, 82, 0.3);
}

.feedback-toast.good {
  background-color: var(--color-copper-soft);
  color: var(--color-copper-dark);
  border: 1px solid var(--color-border-copper);
}

.feedback-toast.miss {
  background-color: rgba(194, 62, 62, 0.1);
  color: #C23E3E;
  border: 1px solid rgba(194, 62, 62, 0.25);
}

.feedback-toast.ready {
  background-color: var(--color-ivory-subtle);
  color: var(--color-text-body);
  border: 1px solid var(--color-border);
}

@keyframes feedbackPop {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Control Buttons & Triggers */
.game-controls-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.game-lock-btn {
  width: 100%;
  max-width: 380px;
  height: 56px;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-plum-primary) 0%, var(--color-plum-deep) 100%);
  color: #FFFFFF;
  border: 2px solid var(--color-copper);
  box-shadow: 0 8px 24px rgba(37, 18, 36, 0.22);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
}

.game-lock-btn:hover {
  background: linear-gradient(135deg, var(--color-plum-deep) 0%, #1A0B19 100%);
  box-shadow: 0 12px 28px rgba(37, 18, 36, 0.32);
  transform: translateY(-2px);
}

.game-lock-btn:active {
  transform: translateY(1px);
  box-shadow: 0 4px 12px rgba(37, 18, 36, 0.18);
}

/* Reduced Motion Turn-Based Alternative Interface */
.turn-based-panel {
  display: none;
  background-color: var(--color-ivory-subtle);
  border: 1px solid var(--color-border-copper);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  margin-top: 1rem;
  text-align: center;
}

.turn-based-panel.visible {
  display: block;
}

.turn-based-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 0.8rem;
  flex-wrap: wrap;
}

/* Game Modal / Replay Summary Screen */
.game-summary-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(250, 247, 242, 0.96);
  backdrop-filter: blur(8px);
  z-index: 10;
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.game-summary-overlay.active {
  display: flex;
}

.summary-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-copper-dark);
  background-color: var(--color-copper-soft);
  border: 1px solid var(--color-border-copper);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.2rem;
}

.summary-title {
  font-family: var(--font-serif);
  font-size: 2.1rem;
  color: var(--color-plum-deep);
  margin-bottom: 0.5rem;
}

.summary-score-large {
  font-family: var(--font-mono);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--color-copper);
  line-height: 1.1;
  margin-bottom: 0.8rem;
}

.summary-rank {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--color-plum-primary);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.summary-rounds-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  width: 100%;
  max-width: 480px;
  margin-bottom: 2rem;
}

.summary-round-cell {
  background-color: var(--color-ivory-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.round-cell-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

.round-cell-pts {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-plum-deep);
}

/* Disclaimer at footer of game */
.game-disclaimer-note {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: 1.8rem;
  line-height: 1.5;
}

/* Responsiveness for Game */
@media (max-width: 600px) {
  .game-container-card {
    padding: 2rem 1.25rem;
  }

  .game-stage-arena {
    width: 270px;
    height: 270px;
  }

  .arena-center-readout {
    width: 120px;
    height: 120px;
  }

  .summary-rounds-grid {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .summary-score-large {
    font-size: 2.8rem;
  }
}
