*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  background: #000;
  color: #e2e8f0;
  font-family: Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}
.container {
  width: 100%;
  max-width: 1280px;
  text-align: center;
}
h1 {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: #fff;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.advanced-toggle-container {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 24px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  user-select: none;
}
.checkbox-label input {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #fbbf24;
}
.controls {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 24px;
}
.advanced-options {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 20px 32px;
  width: 100%;
}
.control-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.group-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #475569;
  text-transform: uppercase;
}
.radio-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}
.radio-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  color: #94a3b8;
  user-select: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.radio-label input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}
.radio-label input[value="major"],
.radio-label input[value="maj7"] {
  accent-color: #ef4444;
}
.radio-label input[value="minor"],
.radio-label input[value="min7"],
.radio-label input[value="dom7"] {
  accent-color: #3b82f6;
}
.radio-label input[value="sus2"],
.radio-label input[value="sus4"] {
  accent-color: #eab308;
}
.keyboard {
  position: relative;
  width: 100%;
  aspect-ratio: 1920 / 320;
  display: flex;
  background: #111;
  border-radius: 4px;
  padding: 2px;
}
.key {
  position: relative;
  cursor: pointer;
}
.key.white {
  flex: 1;
  height: 100%;
  background: #f8f8f8;
  border: 2px solid #d1d5db;
  border-bottom: 3px solid #9ca3af;
  border-radius: 0 0 3px 3px;
  z-index: 1;
}
.key.black {
  position: absolute;
  width: calc(100% / 19 * 0.72);
  height: 60%;
  background: #111;
  border: 1px solid #000;
  border-bottom: 3px solid #000;
  border-radius: 0 0 2px 2px;
  z-index: 2;
}
.key.black[data-note="C#4"] { left: calc(100% / 19 * 1 - (100% / 19 * 0.72) / 2); }
.key.black[data-note="D#4"] { left: calc(100% / 19 * 2 - (100% / 19 * 0.72) / 2); }
.key.black[data-note="F#4"] { left: calc(100% / 19 * 4 - (100% / 19 * 0.72) / 2); }
.key.black[data-note="G#4"] { left: calc(100% / 19 * 5 - (100% / 19 * 0.72) / 2); }
.key.black[data-note="A#4"] { left: calc(100% / 19 * 6 - (100% / 19 * 0.72) / 2); }
.key.black[data-note="C#5"] { left: calc(100% / 19 * 8 - (100% / 19 * 0.72) / 2); }
.key.black[data-note="D#5"] { left: calc(100% / 19 * 9 - (100% / 19 * 0.72) / 2); }
.key.black[data-note="F#5"] { left: calc(100% / 19 * 11 - (100% / 19 * 0.72) / 2); }
.key.black[data-note="G#5"] { left: calc(100% / 19 * 12 - (100% / 19 * 0.72) / 2); }
.key.black[data-note="A#5"] { left: calc(100% / 19 * 13 - (100% / 19 * 0.72) / 2); }
.key.black[data-note="C#6"] { left: calc(100% / 19 * 15 - (100% / 19 * 0.72) / 2); }
.key.black[data-note="D#6"] { left: calc(100% / 19 * 16 - (100% / 19 * 0.72) / 2); }
.key.black[data-note="F#6"] { left: calc(100% / 19 * 18 - (100% / 19 * 0.72) / 2); }

.key.white.highlight-major {
  background: #f87171;
  border-color: #ef4444;
  border-bottom-color: #b91c1c;
}
.key.white.highlight-major .key-label {
  color: #fff;
}
.key.black.highlight-major {
  background: #ef4444;
  border-color: #dc2626;
  border-bottom-color: #991b1b;
}
.key.black.highlight-major .key-label {
  color: #fff;
}

.key.white.highlight-minor {
  background: #60a5fa;
  border-color: #3b82f6;
  border-bottom-color: #1d4ed8;
}
.key.white.highlight-minor .key-label {
  color: #fff;
}
.key.black.highlight-minor {
  background: #3b82f6;
  border-color: #2563eb;
  border-bottom-color: #1e3a8a;
}
.key.black.highlight-minor .key-label {
  color: #fff;
}

.key.white.highlight-suspended {
  background: #fde047;
  border-color: #eab308;
  border-bottom-color: #ca8a04;
}
.key.white.highlight-suspended .key-label {
  color: #1e293b;
}
.key.black.highlight-suspended {
  background: #eab308;
  border-color: #ca8a04;
  border-bottom-color: #a16207;
}
.key.black.highlight-suspended .key-label {
  color: #fff;
}

.key-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.key.white .key-label {
  font-size: 1.5rem;
  bottom: 12px;
  color: #6b7280;
}
.key.black .key-label {
  line-height: 1.3;
  font-size: 0.85rem;
  bottom: 16px;
  text-align: center;
  color: #6b7280;
}
.chord-display {
  margin-top: 40px;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #fff;
  min-height: 48px;
}
.interval-display {
  margin-top: 12px;
  font-size: 1.2rem;
  font-weight: 500;
  color: #94a3b8;
  letter-spacing: 0.05em;
  min-height: 28px;
}
.hidden {
  display: none !important;
}
