:root {
    --bg-color: #ffffff;
    --text-color: #1a1a1a;
    --highlight: #0070f3;
    --button-bg: #0070f3;
    --button-text: #ffffff;
    --button-hover: #0051a2;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --text-color: #ffffff;
        --highlight: #60a5fa;
        --button-bg: #60a5fa;
        --button-text: #1a1a1a;
        --button-hover: #93c5fd;
    }
}

html {
    color-scheme: light dark;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 1rem;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-align: center;
}

h1 {
    font-size: clamp(2.5rem, 8vw, 6rem);
    margin: 0 0 1rem 0;
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* Subtle text selection improvement */
::selection {
    background-color: var(--highlight);
    color: white;
}

nav {
    margin-top: 2rem;
}

ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

a {
    color: var(--highlight);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.2s ease;
}

a:hover {
    background-color: rgba(125, 125, 125, 0.1);
}

button {
    background-color: var(--button-bg);
    color: var(--button-text);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.1s ease, background-color 0.2s ease;
    margin-top: 2rem;
}

button:hover {
    background-color: var(--button-hover);
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

#result {
    margin-top: 2rem;
    font-size: 1.5rem;
    min-height: 2rem;
    font-weight: 500;
}