:root {
    color-scheme: light dark;
    --background: linear-gradient(160deg, #f8fafc 0%, #e2e8f0 45%, #f8fafc 100%);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --surface: rgba(255, 255, 255, 0.9);
    --shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    background: var(--background);
    color: var(--text-primary);
}

.app {
    width: min(560px, 100%);
    padding: 4rem 1.5rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.app__header {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.app__header h1 {
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 700;
    margin: 0;
}

.app__tagline {
    margin: 0;
    font-size: 1rem;
    color: var(--text-secondary);
}

.word-card {
    background: var(--surface);
    border-radius: 24px;
    padding: clamp(2.5rem, 8vw, 3.5rem) 1.75rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(6px);
}

.word-card__word {
    font-size: clamp(2.5rem, 14vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    word-break: break-word;
}

.word-card__class {
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.word-card__status {
    min-height: 1.2rem;
    font-size: 0.95rem;
    color: #dc2626;
}

.shuffle-button {
    border: none;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 1.15rem;
    font-weight: 600;
    padding: 1.1rem 2rem;
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
}

.shuffle-button:disabled {
    opacity: 0.75;
    cursor: progress;
    box-shadow: none;
}

.shuffle-button:not(:disabled):hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}



.filters {
    display: flex;
    justify-content: center;
}

.filters fieldset {
    border: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    width: 100%;
}

.filters legend {
    grid-column: 1 / -1;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

.filters__option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}



.filters__option input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--accent);
}

.app__footer {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

@media (min-width: 640px) {
    .filters fieldset {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .filters__option {
        justify-content: center;
    }
}
