/* === ОСНОВНЫЕ СТИЛИ ДЛЯ НОВОГОДНЕЙ ТЕМЫ === */
/* Сброс отступов и выбор шрифта для всех элементов */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Arial', sans-serif;
}

/* Фон страницы: тёмно-зелёный градиент, имитирующий зимний лес */
body {
    background: linear-gradient(to bottom, #0a3d2f, #1a5c48);
    color: #fff;
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden; /* Чтобы горизонтальная полоса прокрутки не мешала */
    position: relative;
}

/* Контейнер для снежинок. Они будут падать поверх всего */
.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Чтобы клики проходили сквозь снег */
    z-index: 1;
}

/* Стиль для каждой снежинки, созданной скриптом */
.snowflake {
    position: absolute;
    top: -10px;
    color: #fff;
    font-size: 1.2em;
    user-select: none;
    animation-name: fall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

/* Анимация падения снежинки */
@keyframes fall {
    to {
        transform: translateY(100vh) rotate(360deg);
    }
}

/* === ОСНОВНОЙ КОНТЕЙНЕР С КОНТЕНТОМ === */
.container {
    max-width: 900px;
    margin: 30px auto;
    background: rgba(255, 255, 255, 0.93);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 25px 70px rgba(0, 50, 30, 0.6);
    position: relative;
    z-index: 2; /* Контент поверх снега */
    color: #333; /* Тёмный цвет текста на светлом фоне */
    border: 8px solid #c62828; /* Ярко-красная кайма, как у новогоднего шара */
}

/* === ШАПКА САЙТА === */
.main-header {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 25px;
    border-bottom: 3px dashed #2e7d32; /* Пунктирная зелёная линия */
}

.main-header h1 {
    color: #c62828; /* Красный цвет, как у Деда Мороза */
    font-size: 2.8em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 0 #ffeb3b; /* Жёлтая тень для "сияния" */
}

.main-header .subtitle {
    color: #388e3c; /* Тёмно-зелёный */
    font-size: 1.3em;
    font-weight: 300;
}

/* === КАРТОЧКИ ЗАДАНИЙ === */
.task-card {
    display: flex;
    align-items: flex-start;
    background: linear-gradient(145deg, #e1f5fe, #f3e5f5); /* Лёгкий голубой-сиреневый градиент */
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border-left: 8px solid; /* Цвет этой полосы будет задаваться ниже для каждой кнопки */
    transition: all 0.4s ease; /* Плавный эффект при наведении */
}

.task-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.15);
}

/* Иконка в карточке */
.task-icon {
    font-size: 2.5em;
    margin-right: 25px;
    color: #5d4037; /* Коричневый, цвет ствола ёлки */
    min-width: 60px;
    text-align: center;
}

/* Контентная часть карточки */
.task-content {
    flex: 1;
}

.task-content h2 {
    color: #1a237e; /* Тёмно-синий */
    margin-bottom: 12px;
    font-size: 1.8em;
}

/* Стиль для номера задания в заголовке */
.task-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #d32f2f; /* Красный круг */
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 15px;
    font-weight: bold;
    font-size: 0.9em;
}

.task-content p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 1.1em;
}

/* === ОБЩИЕ СТИЛИ ДЛЯ ВСЕХ КНОПОК === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 30px;
    text-decoration: none;
    border-radius: 50px; /* Сильно скруглённые углы */
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    gap: 10px; /* Расстояние между иконкой и текстом */
    margin-top: 10px;
}

.btn i {
    font-size: 1.2em;
}

/* ЦВЕТА ДЛЯ КНОПОК (соответствуют цветам border-left у карточек) */
.btn-green, .task-card:nth-child(2) { border-left-color: #2e7d32; }
.btn-green { background: #2e7d32; color: white; }
.btn-green:hover { background: #1b5e20; }

.btn-red, .task-card:nth-child(3) { border-left-color: #c62828; }
.btn-red { background: #c62828; color: white; }
.btn-red:hover { background: #b71c1c; }

.btn-blue, .task-card:nth-child(4) { border-left-color: #1565c0; }
.btn-blue { background: #1565c0; color: white; }
.btn-blue:hover { background: #0d47a1; }

.btn-purple, .task-card:nth-child(5) { border-left-color: #6a1b9a; }
.btn-purple { background: #6a1b9a; color: white; }
.btn-purple:hover { background: #4a148c; }

.btn-gold { background: linear-gradient(to right, #FFD700, #FFA500); color: #333; border: 2px solid #FF8C00; }
.btn-silver { background: linear-gradient(to right, #E0E0E0, #B0B0B0); color: #333; border: 2px solid #909090; }

/* Контейнер для кнопок с картинками */
.image-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap; /* Если экран узкий, кнопки перенесутся на новую строку */
}

/* === ГАЛЕРЕЯ === */
.gallery {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 3px dashed #2e7d32;
    text-align: center;
}

.gallery h3 {
    color: #1a5c48;
    font-size: 2em;
    margin-bottom: 25px;
}

.image-row {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

.image-row img {
    width: 280px;
    height: 200px;
    object-fit: cover; /* Картинка обрежется, чтобы заполнить блок */
    border-radius: 15px;
    border: 5px solid #ffeb3b; /* Жёлтая рамка */
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    transition: transform 0.5s;
}

.image-row img:hover {
    transform: scale(1.05);
}

/* === ПОДВАЛ === */
.site-footer {
    margin-top: 60px;
    padding-top: 25px;
    text-align: center;
    border-top: 2px solid #ccc;
    color: #666;
    font-size: 1em;
}

.site-footer .small {
    font-size: 0.95em;
    color: #c62828;
    font-weight: bold;
    margin-top: 10px;
}

/* Адаптивность: на маленьких экранах карточки станут колонкой */
@media (max-width: 768px) {
    .task-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .task-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    .image-buttons {
        flex-direction: column;
        align-items: center;
    }
    .image-row img {
        width: 100%;
        max-width: 300px;
    }
}
