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

body {
    font-family: sans-serif;
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    background: #f0f4f8;
}

.container {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

h1 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: #333;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.controls label,
.controls select,
.controls button {
    font-size: 1rem;
}

#classSelect {
    padding: .4rem;
}

#spinBtn,
#toggleSoundBtn {
    padding: .5rem 1rem;
    background: #007bff;
    border: none;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: background .2s;
}

#toggleSoundBtn {
    width: 3rem;
}

#spinBtn:disabled,
#toggleSoundBtn:disabled {
    background: #aac8f8;
    cursor: default;
}

#spinBtn:not(:disabled):hover,
#toggleSoundBtn:not(:disabled):hover {
    background: #0056b3;
}

.display {
    font-size: 2rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
    color: #555;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #fafafa;
    position: relative;
    overflow: hidden;
}

/* text‑shuffle animation */
@keyframes shuffle {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    50% {
        opacity: 0.3;
        transform: translateY(-10%);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.display.shuffling {
    animation: shuffle .2s infinite;
}

/* green highlight when chosen */
.display.chosen {
    border-color: #28a745;
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.6);
}