body {
    background-color: #1a1a2e;
    color: #e0e0e0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.container {
    max-width: 600px;
}

h1 {
    color: #e94560;
    font-weight: 700;
}

.chord-symbol {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    color: #ffffff;
    display: block;
    line-height: 1.2;
}

.note-card {
    background-color: #16213e;
    border: 2px solid #0f3460;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: border-color 0.3s;
    cursor: pointer;
    position: relative;
    user-select: none;
}

.note-card:hover {
    border-color: #533483;
}

.note-card.single-card {
    min-width: 180px;
    padding: 1.5rem 2rem;
}

.note-card.single-card .note-name {
    font-size: 2rem;
}

.note-card.single-card .note-selected {
    font-size: 1.2rem;
    padding: 0.5rem;
}

.note-card .note-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #e94560;
}

.note-card .note-selected {
    background-color: #0f3460;
    color: #777;
    border: 1px solid #533483;
    border-radius: 8px;
    padding: 0.4rem;
    font-size: 1rem;
    text-align: center;
    transition: color 0.2s;
}

.note-card .note-selected.has-value {
    color: #ffffff;
    font-weight: 600;
}

.note-card.correct {
    border-color: #4caf50;
    background-color: #1b3a1b;
    cursor: default;
}

.note-card.incorrect {
    border-color: #f44336;
    background-color: #3a1b1b;
    cursor: default;
}

.note-card .correct-answer {
    color: #4caf50;
    font-size: 0.85rem;
    margin-top: 0.4rem;
    font-weight: 600;
}

/* Note picker overlay */
.note-picker-overlay {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    background-color: #16213e;
    border: 2px solid #e94560;
    border-radius: 12px;
    padding: 0.6rem;
    width: max-content;
    max-width: 380px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: overlayFadeIn 0.15s ease-out;
}

@keyframes overlayFadeIn {
    from { opacity: 0; transform: translateX(-50%) scale(0.9); }
    to { opacity: 1; transform: translateX(-50%) scale(1); }
}

.note-picker-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.note-picker-btn {
    background-color: #0f3460;
    color: #e0e0e0;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0.65rem 0.35rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.15s, border-color 0.15s;
    min-width: 0;
}

.note-picker-btn:hover {
    background-color: #533483;
    border-color: #e94560;
}

.note-picker-btn.selected {
    background-color: #e94560;
    color: #ffffff;
}

#scales-display {
    color: #b0b0b0;
}

#feedback-text {
    font-size: 1.2rem;
    font-weight: 600;
}

.btn-primary {
    background-color: #e94560;
    border-color: #e94560;
}

.btn-primary:hover:not(:disabled) {
    background-color: #c73e54;
    border-color: #c73e54;
}

.btn-primary:disabled {
    background-color: #533483;
    border-color: #533483;
}

.btn-outline-secondary {
    color: #b0b0b0;
    border-color: #b0b0b0;
}

.btn-outline-secondary:hover {
    background-color: #0f3460;
    color: #ffffff;
    border-color: #0f3460;
}

.alert-warning {
    background-color: #3a2e1b;
    border-color: #e9a560;
    color: #e9a560;
}

#loading .spinner-border {
    color: #e94560;
}

/* Header icon buttons (sound + settings) */
.btn-header-icon {
    position: absolute;
    top: 0;
    background: none;
    border: none;
    color: #b0b0b0;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
}

.btn-header-icon:hover {
    color: #e94560;
}

.btn-settings-pos {
    right: 0;
    transition: color 0.2s, transform 0.3s;
}

.btn-settings-pos:hover {
    transform: rotate(45deg);
}

.btn-sound-on {
    right: 2.5rem;
}

.btn-header-icon.sound-off {
    color: #555;
}

/* Settings modal */
.modal-content {
    background-color: #16213e;
    color: #e0e0e0;
    border: 1px solid #0f3460;
}

.modal-header {
    border-bottom-color: #0f3460;
}

.modal-title {
    color: #e94560;
    font-weight: 700;
}

.chord-set-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #0f3460;
}

.chord-set-item:last-child {
    border-bottom: none;
}

.chord-set-info {
    flex: 1;
    min-width: 0;
}

.chord-set-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    color: #b0b0b0;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.25rem;
    transition: color 0.2s;
}

.btn-icon:hover {
    color: #e94560;
}

.chord-set-name {
    font-weight: 600;
    font-size: 1rem;
}

.chord-set-meta {
    font-size: 0.8rem;
    color: #b0b0b0;
    margin-top: 0.15rem;
}

/* Add set button */
.btn-add-set {
    display: block;
    width: 100%;
    background: none;
    border: 2px dashed #0f3460;
    border-radius: 8px;
    color: #b0b0b0;
    padding: 0.6rem;
    margin-top: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: border-color 0.2s, color 0.2s;
}

.btn-add-set:hover {
    border-color: #e94560;
    color: #e94560;
}

/* Chord set edit form */
.chord-set-form .form-label {
    color: #e0e0e0;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.chord-set-form .form-control,
.chord-set-form .form-select {
    background-color: #0f3460;
    color: #e0e0e0;
    border: 1px solid #533483;
    border-radius: 8px;
}

.chord-set-form .form-control:focus,
.chord-set-form .form-select:focus {
    border-color: #e94560;
    box-shadow: 0 0 0 2px rgba(233, 69, 96, 0.3);
    background-color: #0f3460;
    color: #e0e0e0;
}

.chord-set-form .form-control::placeholder {
    color: #666;
}

.badge-beginner {
    background-color: #4caf50;
}

.badge-intermediate {
    background-color: #ff9800;
}

.badge-advanced {
    background-color: #e94560;
}

/* Toggle switch */
.form-check-input:checked {
    background-color: #e94560;
    border-color: #e94560;
}

.form-check-input {
    cursor: pointer;
    width: 3rem;
    height: 1.5rem;
}

.modal .alert-warning {
    background-color: #3a2e1b;
    border-color: #e9a560;
    color: #e9a560;
}

/* Settings sections */
.settings-section-title {
    color: #e94560;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

/* Difficulty radio options */
.difficulty-radios {
    display: flex;
    gap: 0.5rem;
}

.difficulty-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #0f3460;
    border: 2px solid #0f3460;
    border-radius: 10px;
    padding: 0.75rem 0.5rem;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    text-align: center;
}

.difficulty-option:hover {
    border-color: #533483;
}

.difficulty-option input[type="radio"] {
    display: none;
}

.difficulty-option input[type="radio"]:checked + .difficulty-label {
    color: #e94560;
}

.difficulty-option:has(input:checked) {
    border-color: #e94560;
    background-color: #1a1a3e;
}

.difficulty-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: #e0e0e0;
    transition: color 0.2s;
}

.difficulty-desc {
    font-size: 0.75rem;
    color: #888;
    margin-top: 0.15rem;
}
