* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Comic Sans MS', cursive, sans-serif;
}

body {
    background-color: #e6f7ff;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

header {
    background: linear-gradient(135deg, #4a90e2, #63b3ed);
    color: white;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.logo-icon {
    font-size: 2rem;
}

.user-info {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.2);
    padding: 5px 15px;
    border-radius: 20px;
}

.coins {
    display: flex;
    align-items: center;
    gap: 5px;
}

.coin-icon {
    color: gold;
}

nav {
    background-color: #3182ce;
    padding: 0.5rem;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    flex-wrap: wrap;
}

nav li {
    margin: 0 10px;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 20px;
    transition: background-color 0.3s;
}

nav a:hover, nav a.active {
    background-color: #2c5aa0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    min-height: 70vh;
}

.section {
    display: none;
    background-color: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.section.active {
    display: block;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

h2 {
    color: #2c5aa0;
    margin-bottom: 15px;
    border-bottom: 2px solid #e6f7ff;
    padding-bottom: 10px;
}

.video-lessons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.video-card {
    background-color: #f0f9ff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.video-card:hover {
    transform: translateY(-5px);
}

.video-thumbnail {
    height: 160px;
    background-color: #4a90e2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: relative;
}

.video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
}

.video-info {
    padding: 15px;
}

.video-info h3 {
    margin-bottom: 10px;
    color: #2c5aa0;
}

.btn {
    display: inline-block;
    background-color: #4a90e2;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn:hover {
    background-color: #2c5aa0;
    transform: translateY(-2px);
}

.btn-small {
    padding: 5px 10px;
    font-size: 0.8rem;
}

.btn-outline {
    background: transparent;
    border: 2px solid #4a90e2;
    color: #4a90e2;
}

.btn-outline:hover {
    background-color: #4a90e2;
    color: white;
}

.quiz-container {
    max-width: 800px;
    margin: 0 auto;
}

.question {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f0f9ff;
    border-radius: 10px;
}

.options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 15px;
}

.option {
    padding: 10px;
    background-color: white;
    border: 2px solid #cbd5e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.option:hover {
    background-color: #ebf8ff;
    border-color: #4a90e2;
}

.option.selected {
    background-color: #bee3f8;
    border-color: #4a90e2;
}

.option.correct {
    background-color: #c6f6d5;
    border-color: #48bb78;
}

.option.incorrect {
    background-color: #fed7d7;
    border-color: #f56565;
}

.progress-container {
    width: 100%;
    background-color: #e2e8f0;
    border-radius: 10px;
    margin: 20px 0;
}

.progress-bar {
    height: 20px;
    background: linear-gradient(90deg, #4a90e2, #63b3ed);
    border-radius: 10px;
    width: 0%;
    transition: width 0.5s;
}

.achievements {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.achievement {
    background-color: #f0f9ff;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.achievement:hover {
    transform: scale(1.05);
}

.achievement.locked {
    opacity: 0.5;
    filter: grayscale(1);
}

.achievement-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.achievement-reward {
    font-size: 0.8rem;
    color: #2d3748;
    margin-top: 5px;
}

.shop-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.shop-item {
    background-color: #f0f9ff;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.shop-item-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.shop-item-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin: 10px 0;
}

.purchased {
    background-color: #c6f6d5;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.stat-card {
    background-color: #f0f9ff;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #2c5aa0;
}

/* Стили для маскота */
.mascot-container {
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 1000;
    transition: all 0.3s ease;
}

.mascot {
    width: 120px;
    height: 180px;
    background: linear-gradient(135deg, #4a90e2, #63b3ed);
    border-radius: 60px 60px 20px 20px;
    position: relative;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.mascot:hover {
    transform: scale(1.05);
}

.mascot-face {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 70px;
    background: white;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.mascot-eyes {
    display: flex;
    gap: 10px;
    margin-bottom: 5px;
}

.mascot-eye {
    width: 15px;
    height: 15px;
    background: #2c5aa0;
    border-radius: 50%;
}

.mascot-mouth {
    width: 30px;
    height: 10px;
    background: #2c5aa0;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.mascot-body {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 40px;
}

.mascot-hands {
    position: absolute;
    top: 80px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 5px;
}

.mascot-hand {
    width: 20px;
    height: 40px;
    background: white;
    border-radius: 10px;
}

.mascot-message {
    position: absolute;
    bottom: 200px;
    right: 0;
    background: white;
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    max-width: 300px;
    min-height: auto;
    display: none;
}

.mascot-message::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid white;
}

.mascot-message.show {
    display: block;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mascot-tip {
    background: #4a90e2;
    color: white;
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 0.8rem;
    margin-top: 10px;
    display: inline-block;
}

/* Стили для чата с маскотом */
.chat-container {
    max-width: 600px;
    margin: 0 auto;
    background: #f8fafc;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.chat-messages {
    height: 400px;
    overflow-y: auto;
    padding: 15px;
    background: white;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 2px solid #e2e8f0;
}

.message {
    margin-bottom: 15px;
    padding: 12px 15px;
    border-radius: 15px;
    max-width: 80%;
    animation: fadeIn 0.3s ease;
}

.message.mascot {
    background: #e6f7ff;
    border-bottom-left-radius: 5px;
    align-self: flex-start;
}

.message.user {
    background: #4a90e2;
    color: white;
    border-bottom-right-radius: 5px;
    margin-left: auto;
}

.chat-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.chat-option {
    padding: 12px;
    background: white;
    border: 2px solid #cbd5e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.chat-option:hover {
    background: #ebf8ff;
    border-color: #4a90e2;
}

/* Стили для диалоговых окон */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    text-align: center;
}

.modal h3 {
    color: #2c5aa0;
    margin-bottom: 15px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.modal-btn.primary {
    background: #4a90e2;
    color: white;
}

.modal-btn.secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.modal-btn:hover {
    transform: translateY(-2px);
}

footer {
    background-color: #2c5aa0;
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin-top: 30px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.developer-info {
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.developer-info h3 {
    margin-bottom: 15px;
    color: #fff;
}

.developer-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    text-align: left;
}

.developer-contact {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

/* Новые стили для дополнительных игр */
.mini-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.mini-game-card {
    background-color: #f0f9ff;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    cursor: pointer;
}

.mini-game-card:hover {
    transform: translateY(-5px);
}

.mini-game-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.violation-scene {
    width: 100%;
    height: 300px;
    background-color: #f7fafc;
    border: 2px solid #cbd5e0;
    border-radius: 10px;
    position: relative;
    margin: 20px 0;
}

.scene-character {
    width: 30px;
    height: 50px;
    position: absolute;
    transition: all 0.3s;
}

.violation-option {
    padding: 10px 15px;
    margin: 5px;
    background-color: white;
    border: 2px solid #cbd5e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.violation-option:hover {
    background-color: #ebf8ff;
    border-color: #4a90e2;
}

.violation-option.correct {
    background-color: #c6f6d5;
    border-color: #48bb78;
}

.violation-option.incorrect {
    background-color: #fed7d7;
    border-color: #f56565;
}

.bicycle-equipment {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.equipment-item {
    background-color: white;
    border: 2px solid #cbd5e0;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.equipment-item.selected {
    background-color: #bee3f8;
    border-color: #4a90e2;
}

.equipment-item.correct {
    background-color: #c6f6d5;
    border-color: #48bb78;
}

.equipment-item.incorrect {
    background-color: #fed7d7;
    border-color: #f56565;
}

.equipment-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.intersection-map {
    width: 100%;
    height: 400px;
    background-color: #f7fafc;
    border: 2px solid #cbd5e0;
    border-radius: 10px;
    position: relative;
    margin: 20px 0;
}

.road-horizontal {
    position: absolute;
    width: 100%;
    height: 60px;
    background-color: #4a5568;
    top: 50%;
    transform: translateY(-50%);
}

.road-vertical {
    position: absolute;
    width: 60px;
    height: 100%;
    background-color: #4a5568;
    left: 50%;
    transform: translateX(-50%);
}

.traffic-sign {
    width: 40px;
    height: 40px;
    background-color: white;
    border: 2px solid #2d3748;
    border-radius: 50%;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
}

/* Стили для квестов */
.quests-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.quest-card {
    background-color: #f0f9ff;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.quest-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.quest-icon {
    font-size: 2rem;
}

.quest-progress {
    height: 10px;
    background-color: #e2e8f0;
    border-radius: 5px;
    margin: 10px 0;
    overflow: hidden;
}

.quest-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4a90e2, #63b3ed);
    border-radius: 5px;
    width: 0%;
    transition: width 0.5s;
}

.quest-reward {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    font-weight: bold;
    color: #2d3748;
}

.quest-completed {
    background-color: #c6f6d5;
}

/* Стили для рейтингов */
.leaderboard {
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.leaderboard-header {
    background: linear-gradient(135deg, #4a90e2, #63b3ed);
    color: white;
    padding: 15px;
    text-align: center;
}

.leaderboard-list {
    max-height: 400px;
    overflow-y: auto;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.leaderboard-item:nth-child(even) {
    background-color: #f7fafc;
}

.leaderboard-rank {
    width: 40px;
    height: 40px;
    background-color: #4a90e2;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
}

.leaderboard-user {
    flex-grow: 1;
}

.leaderboard-score {
    font-weight: bold;
    color: #2c5aa0;
}

/* Стили для комиксов */
.comic-container {
    max-width: 800px;
    margin: 0 auto;
}

.comic-panel {
    background-color: white;
    border: 2px solid #cbd5e0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
}

.comic-character {
    width: 80px;
    height: 120px;
    position: absolute;
    bottom: 20px;
}

.comic-text {
    background-color: #f0f9ff;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    position: relative;
}

.comic-text::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #f0f9ff;
}

.comic-choices {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 20px;
}

.comic-choice {
    padding: 12px 15px;
    background-color: white;
    border: 2px solid #cbd5e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.comic-choice:hover {
    background-color: #ebf8ff;
    border-color: #4a90e2;
}

/* Стили для родительского раздела */
.parent-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.parent-card {
    background-color: #f0f9ff;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.progress-chart {
    width: 100%;
    height: 200px;
    background-color: white;
    border-radius: 10px;
    margin: 15px 0;
    padding: 10px;
}

.checklist {
    list-style: none;
    margin-top: 15px;
}

.checklist-item {
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.checklist-item:last-child {
    border-bottom: none;
}

.checklist-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e0;
    border-radius: 4px;
    cursor: pointer;
}

.checklist-checkbox.checked {
    background-color: #4a90e2;
    border-color: #4a90e2;
}

/* Стили для кастомизации */
.customization-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.customization-item {
    background-color: #f0f9ff;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.customization-item:hover {
    transform: scale(1.05);
}

.customization-item.selected {
    background-color: #bee3f8;
    border: 2px solid #4a90e2;
}

.customization-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .video-lessons, .achievements, .shop-items, .stats-grid,
    .mini-games-grid, .quests-container, .customization-grid {
        grid-template-columns: 1fr;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav li {
        margin: 5px 0;
    }

    .user-info {
        position: static;
        justify-content: center;
        margin-top: 10px;
    }

    .mascot-container {
        bottom: 80px;
        right: 10px;
    }

    .mascot {
        width: 80px;
        height: 120px;
    }

    .mascot-message {
        max-width: 250px;
        font-size: 0.9rem;
    }
}