/* CSS Custom Properties for 2026 best practices */
:root {
    --bg-color: black;
    --text-color: white;
    --font-family: 'Open Sans', sans-serif;
    --font-size-base: clamp(1rem, 2.5vw, 1.25rem);
    --font-size-display: clamp(2rem, 5vw, 3rem);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Open Dyslexic', monospace;
    font-size: var(--font-size-base);
    line-height: 1.5;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#controls {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: linear-gradient(135deg, rgba(91, 52, 218, 0.4), rgba(0, 102, 255, 0.4));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px;
    margin: 10px;
    border-radius: 10px;
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#controls h2 {
    margin: 0 0 10px 0;
    font-size: 18px;
    text-align: center;
}

#controls label {
    font-size: 14px;
    font-weight: bold;
}

#controls input[type="range"] {
    width: 200px;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.3);
    outline: none;
}

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

#controls select {
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.9);
    color: black;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    width: 200px;
}

#controls select option {
    color: black;
    background: white;
}

#controls button {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

#controls button:hover {
    background: rgba(255, 255, 255, 0.3);
}

#credits {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 15px;
    margin: 10px;
}

#credits a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 5px;
    transition: background 0.3s;
}

#credits a:hover {
    background: rgba(255, 255, 255, 0.2);
}

#word-display {
    font-size: var(--font-size-display);
    position: relative;
    height: 1em;
}

.char {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    font-family: var(--font-family);
}