body {
    font-family: Arial, sans-serif;
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.container {
    max-width: 400px;
    margin: 0 auto;
}

h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

h2 {
    font-size: 1.8em;
    margin-bottom: 10px;
}

p {
    font-size: 1.2em;
}

button {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    padding: 12px 24px;
    font-size: 1.1em;
    border-radius: 25px;
    cursor: pointer;
    margin: 10px;
    transition: all 0.3s ease;
    min-width: 120px;
}

button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

button:disabled,
button.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* Home screen styles */
.exercise-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

/* Exercise screen styles */
.exercise-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.exercise-title {
    flex-grow: 1;
    text-align: center;
}

.exercise-title h2 {
    margin-bottom: 5px;
}

.exercise-title p {
    margin: 0;
    font-size: 1em;
    opacity: 0.9;
}

/* Stats bar */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 10px 0;
    font-size: 1.2em;
}

.streak {
    font-weight: bold;
}

.score {
    opacity: 0.9;
}

/* Controls row */
.controls-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    margin: 15px 0;
    flex-wrap: wrap;
}

/* Tempo control styles */
.tempo-control {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1em;
}

.tempo-control input {
    width: 55px;
    padding: 5px 8px;
    border: 2px solid white;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-align: center;
    font-size: 1em;
}

.tempo-control input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.tempo-control input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
}

/* Volume control styles */
.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-control input[type="range"] {
    width: 80px;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    cursor: pointer;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
}

.volume-control input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Mode toggle styles */
.mode-control {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 10px 0;
}

.mode-btn, .density-btn {
    min-width: 80px;
    padding: 6px 14px;
    font-size: 0.9em;
    border-radius: 20px;
    opacity: 0.6;
}

.mode-btn.active, .density-btn.active {
    opacity: 1;
    background: rgba(255, 255, 255, 0.35);
}

.density-control {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    font-size: 0.95em;
}

.density-btn {
    min-width: 40px;
    padding: 4px 12px;
}

/* Playback state indicator */
.playback-state {
    margin: 20px 0 10px;
    font-size: 1.3em;
    min-height: 35px;
}

.state-idle {
    opacity: 0.7;
}

.state-playing {
    animation: pulse-text 1s ease-in-out infinite;
}

.state-answering {
    color: #90EE90;
    font-weight: bold;
}

@keyframes pulse-text {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Placeholders */
.placeholders {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 25px 0;
    font-size: 1.8em;
    font-weight: bold;
}

.placeholder {
    width: 50px;
    height: 50px;
    border: 2px solid white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
}

/* Active placeholder (waiting for answer) */
.placeholder.active {
    border-color: #90EE90;
    box-shadow: 0 0 15px rgba(144, 238, 144, 0.5);
    animation: pulse-border 1.5s ease-in-out infinite;
}

/* Currently playing chord highlight */
.placeholder.playing {
    background: rgba(255, 255, 255, 0.25);
    border-color: #FFD700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    transform: scale(1.05);
}

/* Correct answer flash */
.placeholder.correct {
    background: rgba(144, 238, 144, 0.5);
    border-color: #90EE90;
}

/* Incorrect answer flash */
.placeholder.incorrect {
    background: rgba(255, 0, 0, 0.5);
    border-color: #ff4444;
    animation: shake 0.4s ease-in-out;
}

@keyframes pulse-border {
    0%, 100% {
        box-shadow: 0 0 10px rgba(144, 238, 144, 0.4);
    }
    50% {
        box-shadow: 0 0 20px rgba(144, 238, 144, 0.7);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

/* Chord buttons */
.chord-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
}

.chord-button {
    min-width: 60px;
    padding: 12px 18px;
    font-size: 1.1em;
    font-weight: bold;
}

.chord-button:disabled,
.chord-button.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.chord-button:disabled:hover,
.chord-button.disabled:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: none;
}

.hidden {
    display: none;
}

/* Responsive design */
@media (max-width: 480px) {
    body {
        padding: 15px;
    }

    .container {
        max-width: 100%;
        padding: 0 5px;
    }

    h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 1.5em;
    }

    .exercise-header {
        flex-direction: column;
        text-align: center;
    }

    .exercise-header button {
        padding: 8px 16px;
        min-width: 80px;
        font-size: 0.95em;
    }

    .stats-bar {
        gap: 20px;
        font-size: 1.1em;
    }

    .controls-row {
        gap: 15px;
    }

    .playback-state {
        font-size: 1.1em;
    }

    .placeholders {
        gap: 12px;
        font-size: 1.4em;
    }

    .placeholder {
        width: 42px;
        height: 42px;
    }

    .chord-buttons {
        gap: 8px;
    }

    .chord-button {
        min-width: 52px;
        padding: 10px 14px;
        font-size: 1em;
    }

    .mode-btn {
        min-width: 70px;
        padding: 5px 10px;
        font-size: 0.85em;
    }

    .volume-control input[type="range"] {
        width: 60px;
    }
}
