:root {
    --column-offset: 2vmin; /* Dynamisk förskjutning baserad på minsta fönsterdimension */
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-color: #e0e5ec; /* En mjuk, modern bakgrund */
    text-align: center;
}

#controls {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #e0e5ec;
    border-radius: 12px;
    box-shadow: 9px 9px 16px rgb(163,177,198,0.6), -9px -9px 16px rgba(255,255,255, 0.5);
}

#controls label {
    font-weight: 600;
    color: #4a5a73;
    margin-right: 1rem;
}

#controls select {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    background-color: #e0e5ec;
    box-shadow: inset 4px 4px 8px #a3b1c6, inset -4px -4px 8px #ffffff;
    color: #4a5a73;
    font-weight: 500;
    cursor: pointer;
}

#keyboard-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 1rem 0; /* Ge lite luftrum uppe och nere */
    flex-grow: 1; /* Gör att denna container växer för att fylla tillgängligt utrymme */
    min-height: 0; /* Förhindrar flexbox-problem vid storleksändring */
}

#keyboard {
    display: flex;
    flex-direction: row; /* Ordna kolumnerna sida vid sida */
    align-items: flex-start;
    padding: 2vmin;
    justify-content: center; /* Centrera kolumnerna */
    /* Behåll den ursprungliga looken, skalning sköter JS */
    transform-origin: center center;
}

.key-column {
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Justerad förskjutning för att matcha ett riktigt dragspel */
.key-column:nth-child(1) { top: var(--column-offset); }
.key-column:nth-child(2) { top: 0; }
.key-column:nth-child(3) { top: var(--column-offset); }
.key-column:nth-child(4) { top: calc(var(--column-offset) * 2); }

.key {
    width: 4.5vmin;
    height: 4.5vmin;
    margin: 0.5vmin;
    border-radius: 50%; /* Tillbaka till runda knappar */
    background: #e0e5ec;
    box-shadow: 0.5vmin 0.5vmin 1vmin #a3b1c6, -0.5vmin -0.5vmin 1vmin #ffffff;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5vmin;
    font-weight: 600;
    color: #4a5a73;
    transition: all 0.1s ease-in-out;
    user-select: none;
}

.key.black {
    background: #4a5a73;
    color: #e0e5ec;
    box-shadow: 0.5vmin 0.5vmin 1vmin #3e4a5d, -0.5vmin -0.5vmin 1vmin #566a89;
}

.key.active {
    box-shadow: inset 0.5vmin 0.5vmin 1vmin #a3b1c6, inset -0.5vmin -0.5vmin 1vmin #ffffff;
    color: #d63031;
    transform: scale(0.95); /* En bättre tryckeffekt */
}

.key.black.active {
    box-shadow: inset 0.5vmin 0.5vmin 1vmin #3e4a5d, inset -0.5vmin -0.5vmin 1vmin #566a89;
}

#instructions {
    margin-top: 2rem;
    font-size: 1.1rem;
    color: #4a5a73;
} 