/* BeatRush Keys by ManiRush — Ultra-Responsive Mobile, iPad & Desktop Styles */
.beatrush-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.br-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(124, 58, 237, 0.22));
  border: 1px solid rgba(56, 189, 248, 0.42);
  font-family: 'Outfit', sans-serif;
  font-size: 0.96rem;
}

.br-mr-dot {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  color: #020617;
  font-weight: 900;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.br-song-now {
  font-size: 0.78rem;
  color: var(--yellow);
  font-weight: 700;
  padding-left: 6px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.br-hint {
  margin: 10px 0 0;
  font-size: 0.84rem;
  color: var(--muted);
  text-align: center;
}

.piano-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}

.piano-stage-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.piano-canvas-wrap {
  position: relative;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 9 / 14;
  max-height: 70dvh;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid rgba(56, 189, 248, 0.5);
  box-shadow: 0 20px 44px rgba(2, 6, 23, 0.68), 0 0 28px rgba(56, 189, 248, 0.14);
  background: #060919;
  touch-action: none;
}

.piano-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.progress-strip {
  width: 100%;
  max-width: 440px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.progress-track {
  flex: 1;
  height: 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #38bdf8, #39ff6e, #ffd84d);
  transition: width 0.12s ease;
}

.trophy-badges {
  font-size: 0.98rem;
  letter-spacing: 2px;
  white-space: nowrap;
}

.song-panel {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
}

.song-panel h2 {
  margin: 0 0 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
}

.song-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 440px;
  overflow-y: auto;
}

.song-item {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: rgba(11, 16, 36, 0.78);
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  transition: border-color 0.12s ease, transform 0.08s ease, background 0.12s ease;
}

.song-item:hover { border-color: var(--cyan); }
.song-item:active { transform: scale(0.98); }
.song-item.active {
  border-color: var(--green);
  background: rgba(57, 255, 110, 0.14);
}

.song-title { font-weight: 800; font-size: 0.92rem; display: block; }
.song-meta { font-size: 0.75rem; color: var(--muted); }
.song-diff {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.18);
  color: var(--cyan);
  white-space: nowrap;
}
.song-diff.pro, .song-diff.master {
  background: rgba(255, 92, 168, 0.22);
  color: #f9a8d4;
}

.speed-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.speed-btn {
  flex: 1;
  min-height: 40px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: rgba(11, 16, 36, 0.85);
  color: var(--muted);
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  touch-action: manipulation;
}
.speed-btn.active {
  border-color: var(--yellow);
  color: var(--yellow);
  background: rgba(255, 216, 77, 0.14);
}

.game-shell.is-expanded .piano-layout,
.game-shell:fullscreen .piano-layout {
  grid-template-columns: 1fr;
  flex: 1;
  align-items: center;
}
.game-shell.is-expanded .song-panel,
.game-shell:fullscreen .song-panel { display: none; }
.game-shell.is-expanded .piano-canvas-wrap,
.game-shell:fullscreen .piano-canvas-wrap { max-height: 78dvh; max-width: 520px; }

@media (max-width: 860px) {
  .piano-layout { grid-template-columns: 1fr; }
  .piano-canvas-wrap { max-width: 460px; max-height: 66dvh; }
  .song-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    max-height: none;
  }
}

@media (max-width: 480px) {
  .br-song-now { display: none; }
  .piano-canvas-wrap { max-width: 100%; aspect-ratio: 9 / 13.5; max-height: 68dvh; }
}
