:root {
    --primary: #4a6fa5;
    --secondary: #166088;
    --accent: #4fc3f7;
    --background: #f5f7fa;
    --text: #333;
    --correct: #43a047;
    --wrong: #e53935;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.game-container {
    max-width: 600px;
    width: 100%;
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

h1 {
    color: var(--secondary);
    margin-bottom: 15px;
    font-size: 2.2rem;
}

.difficulty-selector {
    margin: 15px 0;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.difficulty-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.difficulty-btn:hover {
    background: rgb(33, 243, 79);
}

.difficulty-btn.active {
    background: rgb(33, 243, 79);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.game-info {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
    font-weight: bold;
}

.timer {
    color: var(--secondary);
}

.score {
    color: var(--primary);
}

.word-display {
    font-size: 2.5rem;
    margin: 20px 0;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 20px 0;
}

.option-btn {
    background: white;
    border: 2px solid var(--primary);
    border-radius: 8px;
    padding: 12px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.option-btn:hover {
    background: #e3f2fd;
    transform: translateY(-2px);
}

.option-btn.correct {
    background: var(--correct);
    color: white;
    border-color: var(--correct);
}

.option-btn.wrong {
    background: var(--wrong);
    color: white;
    border-color: var(--wrong);
}

.next-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 15px;
    font-weight: bold;
    transition: all 0.3s;
    display: none;
}

.next-btn:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

.game-over {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.final-score {
    font-size: 1.5rem;
    font-weight: bold;
}

.restart-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.restart-btn:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

.settings {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.sound-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked+.slider {
    background: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(26px);
}

@media (max-width: 500px) {
    .options {
        grid-template-columns: 1fr;
    }

    .difficulty-selector {
        flex-direction: column;
        align-items: center;
    }

    .difficulty-btn {
        width: 100%;
    }
}