/* =========================================================
   LOCAL GAME STYLES: Got Rhythm?!
   Builds cleanly on top of global styles framework.
   ========================================================= */

   :root {
    --game-pink:        #f472b6;
    --game-pink-shadow: #db2777;
  
    /* Metric Tones */
    --score1: #ef4444;
    --score2: #f59e0b;
    --score3: #3b82f6;
    --score4: #8b5cf6;
    --score5: #10b981;
  }
  
  .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: 10px; box-shadow: var(--shadow-soft); padding-bottom: 14px;
  }
  body.light-theme .controlsPanel { border-color: rgba(0, 0, 0, 0.06); }
  
  .actionsGrid { display: flex; gap: 6px; margin-bottom: 12px; width: 100%; }
  .actionsGrid .icon-btn { flex: 0 0 calc(52px * var(--control-scale)); height: calc(52px * var(--control-scale)); padding: 0; font-size: calc(22px * var(--font-scale)); }
  .actionsGrid .flex-text-btn { flex: 1 1 0; padding: 0 4px; font-size: calc(14px * var(--font-scale)); white-space: nowrap; }
  
  .mainActionRow { display: flex; gap: 6px; }
  .mainActionRow #beginBtn { flex: 2; }
  .mainActionRow #pauseBtn { flex: 1.2; }
  .mainActionRow #stopBtn  { flex: 1; }
  
  .btn-pink { background: var(--game-pink); color: #fff; border: 2px solid var(--game-pink-shadow); box-shadow: 0 4px 0 var(--game-pink-shadow); }
  
  /* 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;
  }
  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; }
  .beatDot {
    width: 14px; height: 14px; border-radius: 50%; background: var(--bg-elevated); transition: background-color 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 display grid */
  .scoreInline { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; width: 100%; }
  @media (min-width: 440px) { .scoreInline { grid-template-columns: repeat(4, 1fr); } }
  
  .scorePill {
    background: var(--bg-base); border-radius: var(--radius-sm); padding: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,0.03);
  }
  .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; }
  
  /* Drum Pads Grid */
  .padsPanel { width: 100%; }
  .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 var(--game-pink); }
  .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); }
  
  /* Local Feedback Component Overrides */
  .analysis {
    width: 100%;
  }
  .analysisGrid {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .fixedFeedbackCard {
    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); width: 100%; display: flex; flex-direction: column; gap: 10px;
  }
  body.light-theme .fixedFeedbackCard { border-color: rgba(0, 0, 0, 0.06); }
  .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(--control-scale)); display: flex; flex-direction: column; align-items: center; justify-content: center; }
  
  .scoreBarWrap { width: 100%; height: 6px; background: var(--bg-base); border-radius: 99px; overflow: hidden; margin-top: 4px; }
  .scoreBar { width: 0%; height: 100%; transition: width 0.2s ease, background-color 0.2s; }
  
  /* Segmented Inputs & Groups */
  .settingsGroup { margin-bottom: 16px; }
  .bpmRow { display: flex; gap: 12px; align-items: center; }
  #bpmRange { flex: 1; height: 8px; }
  #bpmNum { width: 72px; text-align: center; }
  
  .segmented { display: flex; background: var(--bg-base); padding: 4px; border-radius: var(--radius-sm); width: 100%; }
  .segBtn {
    flex: 1; height: calc(38px * var(--control-scale)); border: none; background: transparent; color: var(--text-muted); font-size: calc(14px * var(--font-scale)); font-weight: 700; border-radius: 8px; cursor: pointer; transition: background 0.15s, color 0.15s;
  }
  .segBtn.selected { background: var(--bg-elevated); color: var(--text-main); }
  
  .diffGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
  .diffOption {
    height: calc(42px * var(--control-scale)); border-radius: var(--radius-sm); border: 2px solid var(--bg-elevated); background: transparent; color: var(--text-muted); font-size: calc(14px * var(--font-scale)); font-weight: 700; cursor: pointer;
  }
  .diffOption.selected { background: var(--accent); border-color: var(--accent-shadow); color: #fff; }
  
  /* Inline score adjustments */
  .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; }

  /* ── Chromatic-style Scorecard (shared layout) ── */
  .scoreGrid { display: grid; gap: 8px; }
  .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(20px * var(--font-scale)); font-weight: 900; }
  .text-correct { color: var(--info-teal); }
  .text-incorrect { color: var(--danger); }
  .text-accent { color: var(--accent); }
  .scoreMeta { text-align: center; font-size: calc(13px * var(--font-scale)); font-weight: 700; color: var(--text-muted); margin-bottom: 10px; }
  .scoreActions { display: flex; gap: 8px; margin-bottom: 12px; align-items: center; }
  .scoreActions input { flex: 1; height: calc(44px * var(--control-scale)); background: var(--bg-base); border: 2px solid var(--bg-elevated); color: var(--text-main); border-radius: var(--radius-sm); padding: 0 12px; font-family: var(--font-main); font-size: calc(13px * var(--font-scale)); font-weight: 700; outline: none; }
  .scoreActions input:focus { border-color: var(--accent); }

  /* ── Summary Modal extras ── */
  .summaryNameRow { display: flex; gap: 8px; align-items: center; }

  .summ-settings {
    text-align: center; font-size: calc(12px * var(--font-scale)); font-weight: 700; color: var(--text-muted);
    background: var(--bg-base); border-radius: var(--radius-sm); padding: 8px;
    margin-bottom: 12px; letter-spacing: 0.3px;
  }

  .summ-history-label {
    font-size: calc(11px * var(--font-scale)); font-weight: 800; color: var(--text-muted); text-transform: uppercase;
    letter-spacing: 0.5px; margin-bottom: 6px; text-align: center; margin-top: 12px;
  }
  .summ-history { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; }
  .summ-dot {
    width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center;
    justify-content: center; font-size: calc(11px * var(--font-scale)); font-weight: 900; color: #fff;
  }

  /* ── Secondary / Cancel button ── */
  .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); }

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