* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #1a1a1a;
  color: #e0e0e0;
  min-height: 100vh;
}

a { color: #6cb4ee; text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 1024px;
  margin: 0 auto;
  padding: 16px;
}

/* === Index page === */

.page-title {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 24px;
  color: #fff;
}

.solo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.solo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 8px;
  background: #2a2a2a;
  border-radius: 8px;
  text-decoration: none;
  color: #e0e0e0;
  transition: background 0.15s;
}

.solo-card:hover {
  background: #3a3a3a;
  text-decoration: none;
}

.solo-card .solo-number {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
}

.solo-card .solo-bpm {
  font-size: 0.85rem;
  color: #999;
  margin-top: 4px;
}

/* === Solo page layout === */

.solo-page {
  overflow: hidden;
  height: 100vh;
}

.solo-layout {
  display: flex;
  height: 100vh;
}

.main-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 10px 12px;
}

.sidebar {
  width: 15%;
  min-width: 120px;
  max-width: 200px;
  background: #222;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 6px;
  gap: 12px;
  border-left: 1px solid #333;
}

.sidebar video {
  width: 100%;
  border-radius: 4px;
  background: #000;
}

/* === Transport controls === */

.transport-controls {
  display: flex;
  gap: 6px;
  width: 100%;
  justify-content: center;
}

.transport-btn {
  flex: 1;
  padding: 8px 0;
  background: #333;
  color: #e0e0e0;
  border: 1px solid #444;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s;
}

.transport-btn:hover {
  background: #444;
}

.transport-btn.active {
  background: #6cb4ee;
  color: #000;
  border-color: #6cb4ee;
}

/* === Sidebar shortcuts === */

.sidebar-shortcuts {
  display: flex;
  gap: 4px;
  width: 100%;
}

.shortcut-btn {
  flex: 1;
  padding: 6px 0;
  background: #333;
  color: #ccc;
  border: 1px solid #444;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.15s;
}

.shortcut-btn:hover {
  background: #444;
}

.shortcut-btn.active {
  background: #6cb4ee;
  color: #000;
  border-color: #6cb4ee;
}

.sidebar-index-link {
  display: block;
  width: 100%;
  text-align: center;
  padding: 6px 0;
  background: #333;
  border: 1px solid #444;
  border-radius: 4px;
  font-size: 0.8rem;
  color: #ccc;
}

.sidebar-index-link:hover {
  background: #444;
  text-decoration: none;
}

.sidebar-bpm {
  text-align: center;
}

.bpm-current {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.bpm-label {
  font-size: 0.75rem;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bpm-original {
  font-size: 0.7rem;
  color: #666;
  margin-top: 4px;
}

/* === Solo header === */

.solo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  flex-shrink: 0;
}

.solo-header h1 {
  font-size: 1.1rem;
  color: #fff;
}

.nav-link {
  padding: 4px 10px;
  background: #333;
  border-radius: 4px;
  font-size: 0.85rem;
  min-width: 40px;
  text-align: center;
}

.nav-link:empty {
  visibility: hidden;
}

/* === Sheet music === */

.sheet-music {
  width: 100%;
  background: #fff;
  border-radius: 4px;
  flex: 1;
  min-height: 0;
  object-fit: contain;
  object-position: top;
}

/* === Speed bar === */

.speed-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #252525;
  border-radius: 6px;
  padding: 6px 10px;
  margin-top: 6px;
}

.speed-btn {
  width: 32px;
  height: 32px;
  background: #333;
  color: #e0e0e0;
  border: 1px solid #444;
  border-radius: 4px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.speed-btn:hover {
  background: #444;
}

.speed-slider {
  flex: 1;
  accent-color: #6cb4ee;
  height: 6px;
  min-width: 60px;
}

.speed-presets {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.speed-presets button {
  padding: 4px 8px;
  background: #333;
  color: #ccc;
  border: 1px solid #444;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.15s;
}

.speed-presets button:hover {
  background: #444;
}

.speed-presets button.active {
  background: #6cb4ee;
  color: #000;
  border-color: #6cb4ee;
}

/* === Responsive === */

@media (max-width: 768px) {
  .solo-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
}

@media (min-width: 769px) {
  .container {
    padding: 24px;
  }
}
