:root {
    --bg-color: #121212;
    --surface-color: #1e1e1e;
    --primary-color: #bb86fc;
    --secondary-color: #03dac6;
    --error-color: #cf6679;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --key-white: #ffffff;
    --key-black: #121212;
    --key-active: #bb86fc;
    --key-correct: #4caf50;
    --key-wrong: #cf6679;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.app-container {
    width: 100%;
    max-width: 900px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

header {
    text-align: center;
}

header h1 {
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-secondary);
}

.controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--surface-color);
    padding: 1rem 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    flex-wrap: wrap;
    gap: 1rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

select {
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid #333;
    background: #2c2c2c;
    color: white;
    font-family: inherit;
}

.stats-group {
    display: flex;
    gap: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.primary-btn {
    background-color: var(--primary-color);
    color: black;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
}

.primary-btn:hover {
    opacity: 0.9;
}

.primary-btn:active {
    transform: scale(0.98);
}

.game-area {
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
    min-height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.piano {
    display: flex;
    position: relative;
    user-select: none;
}

.key {
    position: relative;
    cursor: pointer;
    border-radius: 0 0 4px 4px;
    transition: background-color 0.1s;
}

.key.white {
    width: 60px;
    height: 200px;
    background-color: var(--key-white);
    border: 1px solid #ccc;
    z-index: 1;
}

.key.white:active, .key.white.active {
    background-color: #eee;
    transform: translateY(2px);
}

.key.black {
    width: 40px;
    height: 120px;
    background-color: var(--key-black);
    position: absolute;
    top: 0;
    z-index: 2;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Dynamic positioning classes or JS will handle black key offsets */

.key.correct {
    background-color: var(--key-correct) !important;
}

.key.wrong {
    background-color: var(--key-wrong) !important;
}

.feedback {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0,0,0,0.7);
    color: white;
    font-size: 2rem;
    font-weight: 800;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.feedback.show {
    opacity: 1;
}

.hidden {
    display: none;
}
