:root {
    --primary-bg: #f8f9fa;
    --secondary-bg: #ffffff;
    --text-color: #212529;
    --accent-color: #007bff;
    --shadow-color: rgba(0, 0, 0, 0.1);

    /* Twister Kleuren */
    --c-red: #d92120;
    --c-blue: #0072bc;
    --c-yellow: #fccf00;
    --c-green: #009e5d;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    background-color: var(--primary-bg);
    color: var(--text-color);
    margin: 0;
    padding: 1rem;
    box-sizing: border-box;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    max-width: 500px;
}

h1 {
    font-size: clamp(2rem, 6vw, 3rem);
    color: var(--accent-color);
    margin-bottom: 0;
}

#status {
    font-size: clamp(1rem, 3vw, 1.1rem);
    font-weight: 500;
    min-height: 1.5em;
    color: #6c757d;
}

.spinner-container {
    position: relative;
    width: clamp(280px, 90vw, 450px);
    height: clamp(280px, 90vw, 450px);
}

#spinner-canvas {
    width: 100%;
    height: 100%;
    transition: transform 4s cubic-bezier(.15, .75, .3, 1); /* Soepele uitdraai */
}

.spinner-pointer {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 30px solid #343a40;
    z-index: 10;
}


#result-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: bold;
    text-align: center;
    min-height: 1.5em;
    color: var(--text-color);
    padding: 0.5rem;
    background-color: var(--secondary-bg);
    border-radius: 8px;
    width: 100%;
    box-shadow: 0 2px 5px var(--shadow-color);
}
#result-display span {
    font-size: 1.5em; /* Iets kleiner gemaakt voor betere verhouding */
}

#countdown {
    margin-left: 0.5rem;
    font-weight: normal;
    font-size: 0.9em;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem; /* Iets meer ruimte */
    width: 100%;
    background-color: var(--secondary-bg);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px var(--shadow-color);
}

.control-group {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centreer items in de groep */
    gap: 0.5rem;
}

label {
    font-weight: 500;
}

button {
    padding: 0.8rem 1rem;
    font-size: 1rem;
    font-weight: bold;
    color: white;
    background-color: var(--accent-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}
button:hover {
    background-color: #0056b3;
}
button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

input[type="range"], input[type="number"] {
    width: 100%;
}

/* Stijl voor toggle switches */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: var(--accent-color);
}
input:checked + .slider:before {
    transform: translateX(26px);
}
