/* =========================================
   LOCAL GAME STYLES: Audiation: Hum The Note
   Builds on top of ../../shared/global.css
   ========================================= */

/* ─── Game title ─── */
.gameMainTitle {
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  color: var(--text-main);
  margin: 0;
  padding: 0 12px;
}

.modalGameTitle {
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  line-height: 1.2;
}

.modalGameSubtitle {
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-muted);
}

/* ─── Controls panel ─── */
.controlsPanel {
  background: var(--bg-surface);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

body.light-theme .controlsPanel {
  border-color: rgba(0, 0, 0, 0.06);
}

.actionsGrid {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.actionsGrid .icon-btn {
  flex: 1;
  height: 52px;
  padding: 0;
  font-size: 20px;
}

.mainActionRow {
  display: flex;
  gap: 10px;
}

.mainActionRow #beginBtn { flex: 2; }
.mainActionRow #pauseBtn { flex: 1; }

/* Begin button — active game state (red) */
#beginBtn.game-active {
  background: var(--danger) !important;
  border-color: var(--danger-shadow) !important;
  box-shadow: 0 4px 0 var(--danger-shadow) !important;
  animation: none !important;
}
#beginBtn.game-active:active:not(:disabled) {
  box-shadow: 0 0 0 transparent !important;
  transform: translateY(4px);
}

/* Pause button — always orange */
.pause-btn {
  background: var(--next-orange);
  color: #fff;
  border: 2px solid var(--next-shadow);
  box-shadow: 0 4px 0 var(--next-shadow);
  font-size: 15px;
}

.btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  transform: none !important;
}

/* ─── Game display panel ─── */
.gameDisplayPanel {
  background: var(--bg-surface);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
}

body.light-theme .gameDisplayPanel {
  border-color: rgba(0, 0, 0, 0.06);
}

/* All phase elements share the same vertical slot via absolute positioning.
   The container is sized by min-height (fits the largest fixed element —
   the countdown digit). Feedback text stays in normal flow so it can expand
   when it has content; all others collapse to zero when invisible. */
.gameTextWrap {
  text-align: center;
  width: 100%;
  position: relative;
  min-height: 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.idleHint {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1.5;
}

.idleHint strong {
  color: var(--text-main);
  font-weight: 800;
}

.mainPhaseText {
  position: absolute;
  left: 0; right: 0;
  top: 50%; transform: translateY(-50%);
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.4;
  /* opacity controlled by JS */
}

.countdownNum {
  position: absolute;
  left: 0; right: 0;
  top: 50%; transform: translateY(-50%);
  font-size: 68px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  /* opacity controlled by JS */
}

.feedbackText {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
  padding: 0 4px;
  width: 100%;
  /* opacity controlled by JS; content cleared between rounds so this
     element contributes zero height outside the FEEDBACK phase */
}

/* Feedback states */
.feedbackText.perfect  { color: #22c55e; }
.feedbackText.good     { color: var(--accent); }
.feedbackText.okay     { color: var(--next-orange); }
.feedbackText.miss     { color: var(--danger); }
.feedbackText.no-voice { color: var(--text-muted); }

/* ─── Tuner section ─── */
.tunerSection {
  background: var(--bg-surface);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 14px 16px 12px;
  box-shadow: var(--shadow-soft);
  transition: opacity 0.5s ease;
}

body.light-theme .tunerSection {
  border-color: rgba(0, 0, 0, 0.06);
}

.tunerSection.inactive {
  opacity: 0.28;
  pointer-events: none;
}

.tunerHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  padding: 0 2px;
}

.tunerTitle {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.tunerTargetLabel {
  font-size: 15px;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: 0.2px;
  min-height: 20px;
}

.tunerSection.inactive .tunerTargetLabel {
  color: var(--text-muted);
}

#tunerCanvas {
  width: 100%;
  height: 210px;
  display: block;
  border-radius: 8px;
}

.tunerCentsLabel {
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-muted);
  margin-top: 6px;
  min-height: 22px;
  letter-spacing: 0.1px;
  transition: color 0.2s;
}

/* ─── Modal extras ─── */
.secondary-btn {
  background: var(--bg-elevated);
  color: var(--text-main);
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25);
}

body.light-theme .secondary-btn {
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 0 #cbd5e1;
}

.secondary-btn:active:not(:disabled) {
  transform: translateY(4px);
  box-shadow: 0 0 0 transparent;
}

/* ─── Settings / form elements ─── */
.settingsGrid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
}

.inlineControl {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.settingsLabel {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.settingsHint {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 2px;
  margin-bottom: 4px;
}

input:not([type='checkbox']):not([type='radio']),
select {
  width: 100%;
  height: 50px;
  background: var(--bg-base);
  border: 2px solid var(--bg-elevated);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  padding: 0 16px;
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 700;
  outline: none;
  -webkit-appearance: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:focus,
select:focus { border-color: var(--accent); }
select       { cursor: pointer; }
.compactSelect { cursor: pointer; }

/* ─── Session Score Card ─── */
.scoreCard {
  background: var(--bg-surface);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-soft);
}
body.light-theme .scoreCard { border-color: rgba(0, 0, 0, 0.06); }

.scoreCard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
body.light-theme .scoreCard-header { border-bottom-color: rgba(0, 0, 0, 0.07); }

.scoreCard-title {
  font-size: 13px;
  font-weight: 900;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.scoreCard-hint {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.scoreCard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.scoreCard-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  background: var(--bg-base);
  border-radius: var(--radius-sm);
}

.scoreCard-val {
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.scoreCard-lbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.text-correct   { color: var(--info-teal); }
.text-incorrect { color: var(--danger); }
.text-accent    { color: var(--accent); }
