/* =========================
   /keepthebeatstyle.css
   Keep To The Beat! - Local Styles
   ========================= */

   .gameMainTitle {
    text-align: center; font-size: calc(22px * var(--font-scale)); font-weight: 900; color: var(--text-main); margin: 0; padding: 0 12px;
  }
  
  .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: 12px; width: 100%; }
  .actionsGrid .flex-text-btn { flex: 1; height: calc(44px * var(--control-scale)); padding: 0 4px; font-size: calc(13px * var(--font-scale)); font-weight: 800; white-space: nowrap; display: flex; align-items: center; justify-content: center; }
  
  .mainActionRow { display: flex; gap: 12px; }
  .mainActionRow #beginBtn { flex: 2; }
  .mainActionRow #pauseBtn { flex: 1.2; }
  
  .bpmRow { display: flex; gap: 12px; align-items: center; width: 100%; }
  
  /* Status Area & Beat indicators */
  .statusPanel {
    background: var(--bg-surface); border: 2px solid rgba(255, 255, 255, 0.08); padding: 16px; border-radius: var(--radius-md); box-shadow: var(--shadow-soft); display: flex; flex-direction: column; gap: 12px; margin-top: 12px;
  }
  body.light-theme .statusPanel { border-color: rgba(0, 0, 0, 0.06); }
  .statusRow { display: flex; flex-direction: column; align-items: center; width: 100%; }
  
  .statusText {
    text-align: center; width: 100%; background: var(--bg-base); padding: 14px; border-radius: var(--radius-sm); margin-top: 10px;
  }
  .phaseTitle { font-size: calc(22px * var(--font-scale)); font-weight: 900; margin-bottom: 4px; }
  .phaseSub { font-size: calc(14px * var(--font-scale)); color: var(--text-muted); font-weight: 500; }
  
  .beatLights { display: flex; gap: 6px; justify-content: center; width: 100%; min-height: 16px; flex-wrap: wrap; }
  .beatDot {
    width: 14px; height: 14px; border-radius: 50%; background: var(--bg-elevated); transition: background-color 0.08s ease, box-shadow 0.08s ease;
  }
  .beatDot.on[data-color="green"]  { background: #10b981 !important; box-shadow: 0 0 8px #10b981; }
  .beatDot.on[data-color="purple"] { background: #a855f7 !important; box-shadow: 0 0 8px #a855f7; }
  .beatDot.on[data-color="orange"] { background: #f97316 !important; box-shadow: 0 0 8px #f97316; }
  
  /* Score pills row — flex so the Live Accuracy pill can be 2× wide */
  .scoreInline { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }

  .scorePill {
    flex: 1 1 60px;
    background: var(--bg-base); border-radius: var(--radius-sm); padding: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 2px solid rgba(255,255,255,0.04);
    transition: border-color 0.25s ease;
  }
  body.light-theme .scorePill { border-color: rgba(0,0,0,0.06); }
  .scoreLabel { font-size: calc(11px * var(--font-scale)); font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
  .scoreValue { font-size: calc(16px * var(--font-scale)); font-weight: 900; }

  /* Live Accuracy pill — double width, coloured background when scored */
  .liveAccPill {
    flex: 2 1 120px;
    transition: background-color 0.25s ease, border-color 0.25s ease;
  }
  .liveAccPill.has-score { color: #fff; border-color: transparent !important; }
  .liveAccPill.has-score .scoreLabel { color: rgba(255,255,255,0.75); }
  .liveMsValue { font-size: calc(16px * var(--font-scale)); font-weight: 900; color: var(--text-muted); margin-bottom: 2px; }
  .liveAccPill.has-score .liveMsValue { color: rgba(255,255,255,0.80); }
  
  /* Drum Pads Grid */
  .padsPanel { width: 100%; margin-top: 12px; }
  .padsRow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .padBtn {
    height: calc(96px * var(--control-scale)); border-radius: var(--radius-md); border: 2px solid transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; user-select: none; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.2); background: var(--bg-surface); color: var(--text-main); transition: transform 0.05s, box-shadow 0.05s;
  }
  body.light-theme .padBtn { box-shadow: 0 6px 0 #cbd5e1; }
  .padBtn:active:not(:disabled), .padBtn.flash { transform: translateY(6px); box-shadow: 0 0px 0 transparent !important; }
  .padBtn:disabled { opacity: 0.35; cursor: not-allowed; transform: none !important; }
  
  .kickPad { border: 2px solid var(--accent); }
  .snarePad { border: 2px solid #f472b6; }
  .padTitle { font-size: calc(18px * var(--font-scale)); font-weight: 900; letter-spacing: 0.5px; }
  .padKey { font-size: calc(11px * var(--font-scale)); font-weight: 700; color: var(--text-muted); }
  
  /* Analysis Component (Now embedded) */
  .analysisGrid { display: flex; flex-direction: column; gap: 12px; }
  .fixedFeedbackCard {
    background: var(--bg-base); border: 2px dashed var(--bg-elevated); border-radius: var(--radius-md); padding: 12px 16px; width: 100%; display: flex; flex-direction: column; gap: 8px; transition: border-color 0.2s, background 0.2s;
  }
  body.light-theme .fixedFeedbackCard { border-color: rgba(0, 0, 0, 0.1); }
  .analysisLabel { font-size: calc(14px * var(--font-scale)); font-weight: 900; color: var(--text-muted); text-transform: uppercase; text-align: center; letter-spacing: 0.5px; }
  .analysisBody { text-align: center; font-size: calc(15px * var(--font-scale)); font-weight: 600; min-height: calc(48px * var(--font-scale)); display: flex; flex-direction: column; align-items: center; justify-content: center; }
  
  .scoreBarWrap { width: 100%; height: 6px; background: var(--bg-elevated); border-radius: 99px; overflow: hidden; margin-top: 4px; }
  .scoreBar { width: 0%; height: 100%; transition: width 0.2s ease, background-color 0.2s; }
  
  /* Inline Score Updates */
  .scoreBigWrap { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin-bottom: 4px; }
  .scoreBigLine { font-size: calc(32px * var(--font-scale)); font-weight: 900; color: var(--accent); }
  .scoreBigWord { font-size: calc(18px * var(--font-scale)); font-weight: 800; color: var(--text-main); }
  .scoreBelow { font-size: calc(14px * var(--font-scale)); line-height: 1.4; color: var(--text-muted); }
  .dim { opacity: 0.65; font-size: calc(12px * var(--font-scale)); margin-top: 2px; display: inline-block; }
  
  /* Scorecard formatting */
  .scoreGrid { display: grid; gap: 8px; width: 100%; }
  .scoreItem {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 14px; background: var(--bg-base);
    border-radius: var(--radius-sm); border: 2px solid var(--bg-elevated);
  }
  .scoreK { font-size: calc(13px * var(--font-scale)); font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
  .scoreV { font-size: calc(18px * var(--font-scale)); font-weight: 900; }

  .secondary-btn {
    background: var(--bg-elevated); color: var(--text-main);
    border: 2px solid var(--bg-elevated);
    box-shadow: 0 4px 0 rgba(0,0,0,0.2); font-size: calc(14px * var(--font-scale));
  }
  .secondary-btn:active:not(:disabled) { box-shadow: 0 0px 0 transparent; transform: translateY(4px); }

  .btn-purple {
    background: #a78bfa; color: #fff;
    border: 2px solid #7c3aed;
    box-shadow: 0 4px 0 #7c3aed;
  }
  body.light-theme .btn-purple { box-shadow: 0 4px 0 #7c3aed; }

  /* Viewing-size: let control rows stack instead of overflowing */
  .actionsGrid, .mainActionRow, .bpmRow, .scoreInline { flex-wrap: wrap; }