* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Trebuchet MS", Arial, sans-serif;
    background: #fff8e8;
    color: #333;
    line-height: 1.6;
    
background-image: url("Фон для игры.jpg");
background-size: cover;
background-position: center;
background-repeat: no-repeat;
background-attachment: fixed;

}

.header {
    background: #7357d9;
    color: white;
    text-align: center;
    padding: 30px 15px;
}

.header h1 {
    font-size: 2.3rem;
    margin-bottom: 5px;
}

.container {
    max-width: 1000px;
    margin: 30px auto;
    padding: 20px;
}

.welcome {
    text-align: center;
    margin-bottom: 30px;
}

.welcome h2 {
    color: #7357d9;
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.topics form {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.topic-card {
    border: none;
    border-radius: 20px;
    padding: 25px 15px;
    min-height: 190px;
    cursor: pointer;
    color: #333;
    font-family: inherit;
    box-shadow: 0 5px 12px #00000012;
    transition: transform 0.2s;
}

.topic-card:hover {
    transform: translateY(-5px);
}

.topic-card h3 {
    margin: 10px 0 5px;
    font-size: 1.2rem;
}

.emoji {
    font-size: 3rem;
}

.letters {
    background: #dceaff;
}

.numbers {
    background: #ffe4b8;
}

.animals {
    background: #d9f5df;
}

.tip {
    background: white;
    border-left: 6px solid #ffbd59;
    border-radius: 10px;
    padding: 20px;
    margin-top: 30px;
}

.tip h3 {
    margin-bottom: 5px;
}

.quiz-box {
    max-width: 650px;
    margin: 30px auto;
    padding: 30px;
    background: white;
    border-radius: 18px;
    box-shadow: 0 5px 15px #00000012;
}

.quiz-box h2 {
    color: #7357d9;
    margin-bottom: 15px;
}

.option {
    display: block;
    background: #f1edff;
    padding: 12px;
    border-radius: 10px;
    margin: 10px 0;
    cursor: pointer;
}

.option:hover {
    background: #e2d9ff;
}

.option input {
    margin-right: 10px;
}

.main-button {
    display: inline-block;
    background: #7357d9;
    color: white;
    padding: 12px 22px;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 15px;
}

.main-button:hover {
    background: #5b40bd;
}

.result {
    text-align: center;
}

.result .score {
    font-size: 2rem;
    color: #7357d9;
    margin: 20px 0;
}

footer {
    text-align: center;
    background: #eee8ff;
    padding: 20px 10px;
    margin-top: 40px;
    font-size: 0.9rem;
}

@media (max-width: 650px) {
    .topics form {
        grid-template-columns: 1fr;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .container {
        padding: 15px;
    }
}

/* HEADER AND NAVIGATION */
.site-header {
    background: #7357d9;
    color: white;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    font-size: 2.5rem;
}

.brand h1 {
    font-size: 1.5rem;
}

.brand p {
    color: #eae4ff;
    font-size: 0.9rem;
}

.navbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 10px;
    font-weight: bold;
    transition: background 0.2s;
}

.nav-link:hover,
.nav-link.active {
    background: #5b40bd;
}

/* HERO BANNER */
.hero {
    background: linear-gradient(135deg, #e6e0ff, #fff0d8);
    border-radius: 24px;
    padding: 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    margin-bottom: 40px;
}

.hero-text {
    max-width: 600px;
}

.eyebrow {
    font-weight: bold;
    color: #7357d9;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.hero h2 {
    font-size: 2rem;
    color: #5037a5;
    margin-bottom: 12px;
}

.hero-picture {
    font-size: 3.5rem;
    min-width: 150px;
    text-align: center;
}

.hero-button {
    display: inline-block;
    background: #7357d9;
    color: white;
    padding: 12px 20px;
    margin-top: 20px;
    text-decoration: none;
    border-radius: 12px;
    font-weight: bold;
}

.page-section {
    margin: 40px 0;
    scroll-margin-top: 20px;
}

.page-section > h2 {
    color: #7357d9;
    margin-bottom: 10px;
}

.section-description {
    margin-bottom: 20px;
}

.content-card {
    background: white;
    padding: 25px;
    border-radius: 18px;
    box-shadow: 0 5px 15px #0000000d;
}

.content-card h2 {
    color: #7357d9;
    margin-bottom: 15px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.info-grid > div {
    background: #f4f0ff;
    padding: 18px;
    border-radius: 12px;
}

.info-grid h3 {
    margin-bottom: 8px;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin: 18px 0;
}

.setting-row select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font: inherit;
}

.settings-message {
    margin-top: 12px;
    color: #5037a5;
}

details {
    background: #f7f4ff;
    padding: 15px;
    border-radius: 10px;
    margin: 12px 0;
}

summary {
    cursor: pointer;
    font-weight: bold;
}

details p {
    margin-top: 10px;
}

.card-link {
    display: inline-block;
    margin-top: 12px;
    font-weight: bold;
    color: #5037a5;
}

footer a {
    color: #5037a5;
    display: inline-block;
    margin-top: 10px;
}

/* SETTINGS THEMES */
body.font-large {
    font-size: 1.15rem;
}

body.font-larger {
    font-size: 1.3rem;
}

body.soft-theme {
    background: #f1edff;
}

body.soft-theme .content-card,
body.soft-theme .quiz-box {
    background: #fffaff;
}

@media (max-width: 750px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .navbar {
        width: 100%;
        gap: 5px;
    }

    .nav-link {
        padding: 8px;
        font-size: 0.9rem;
    }

    .hero {
        flex-direction: column;
        align-items: flex-start;
        padding: 25px;
    }

    .hero h2 {
        font-size: 1.6rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .setting-row {
        align-items: flex-start;
        flex-direction: column;
    }
}



