/* Основные стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 100vw;
}

:root {
    --primary-red: #e74c3c;
    --dark-red: #c0392b;
    --primary-blue: #3498db;
    --dark-blue: #2980b9;
    --yellow: #f1c40f;
    --dark-yellow: #f39c12;
    --green: #27ae60;
    --dark-green: #229954;
    --purple: #9b59b6;
    --dark-purple: #8e44ad;
    --orange: #e67e22;
    --dark-orange: #d35400;
    --dark: #2c3e50;
    --darker: #1a252f;
    --light: #ecf0f1;
    --gray: #95a5a6;
    --dark-gray: #7f8c8d;
    --horse-red: #e74c3c;
    --horse-orange: #e67e22;
    --like-red: #ff4757;
    --like-red-dark: #ff3838;
    --save-blue: #3498db;
    --save-blue-dark: #2980b9;
    --skip-gray: #95a5a6;
    --skip-gray-dark: #7f8c8d;
}

body {
    background: linear-gradient(135deg, #0a2e38 0%, #1a5a6c 30%, #0d3b4a 70%, #09232e 100%);
    color: var(--light);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    line-height: 1.6;
    padding-bottom: 80px;
}

/* Снег */
.snow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.snowflake {
    position: absolute;
    background-color: white;
    border-radius: 50%;
    opacity: 0.8;
    animation-name: fall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

@keyframes fall {
    0% { transform: translateY(-10px) translateX(0px); opacity: 1; }
    100% { transform: translateY(100vh) translateX(20px); opacity: 0.3; }
}

/* Контейнер */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 2;
    overflow-x: hidden;
}

/* Шапка */
header {
    text-align: center;
    padding: 40px 30px;
    background: linear-gradient(135deg, var(--horse-red) 0%, var(--dark-red) 100%);
    border-radius: 25px;
    margin-bottom: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    border: 5px solid var(--yellow);
    position: relative;
    overflow: hidden;
    animation: pulse 3s infinite alternate;
}

@keyframes pulse {
    0% { box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4); }
    100% { box-shadow: 0 15px 45px rgba(231, 76, 60, 0.6); }
}

header::before {
    content: "";
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    background: linear-gradient(45deg, var(--yellow), var(--horse-red), var(--yellow));
    z-index: -1;
    border-radius: 30px;
    opacity: 0.2;
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    margin-bottom: 20px;
    text-shadow: 4px 4px 0 var(--dark-red);
    color: white;
    line-height: 1.2;
}

h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
}

.subtitle {
    font-size: clamp(1rem, 2.5vw, 1.6rem);
    color: #fef9e7;
    margin-bottom: 30px;
    font-weight: 300;
}

/* Статистика в шапке - 2 строки по 2 элемента на мобильных */
.header-stats {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 30px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    padding: 15px 25px;
    border-radius: 15px;
    min-width: 150px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.stat i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--yellow);
}

.stat span {
    font-weight: bold;
    font-size: 1.1rem;
}

.header-banner {
    background: rgba(241, 196, 15, 0.2);
    border: 2px dashed var(--yellow);
    border-radius: 15px;
    padding: 15px;
    margin-top: 25px;
    font-size: clamp(0.9rem, 2vw, 1.2rem);
}

.header-banner i {
    color: var(--yellow);
    margin-right: 10px;
}

/* Навигация */
.main-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    background: rgba(44, 62, 80, 0.9);
    padding: 20px;
    border-radius: 20px;
    border: 2px solid var(--primary-blue);
}

.main-nav a {
    color: white;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 50px;
    background: linear-gradient(to right, var(--primary-blue), var(--dark-blue));
    display: flex;
    align-items: center;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.main-nav a:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(52, 152, 219, 0.5);
    background: linear-gradient(to right, var(--dark-blue), var(--primary-blue));
}

.main-nav a i {
    margin-right: 10px;
    font-size: 1.2rem;
}

/* Таймер */
.countdown-banner {
    background: linear-gradient(135deg, var(--purple) 0%, var(--dark-purple) 100%);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    text-align: center;
    border: 3px solid var(--yellow);
    box-shadow: 0 10px 30px rgba(155, 89, 182, 0.4);
}

.countdown-content h2 {
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    margin-bottom: 20px;
    color: white;
}

.countdown-content h2 i {
    margin-right: 15px;
    color: var(--yellow);
}

.countdown-timer {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.time-unit {
    background: rgba(255, 255, 255, 0.15);
    padding: 20px;
    border-radius: 15px;
    min-width: 120px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.time-unit span {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: bold;
    display: block;
    color: var(--yellow);
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

.time-unit small {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Основной контент */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 50px;
    margin-bottom: 40px;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px dashed var(--yellow);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.section-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 15px;
    color: var(--yellow);
}

.section-header h2 i {
    margin-right: 15px;
}

.section-header p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: rgba(255, 255, 255, 0.8);
}

/* Игровая секция */
.game-section {
    background: rgba(44, 62, 80, 0.95);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    border: 3px solid var(--primary-blue);
    position: relative;
}

.game-area {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Карточка задания - БЕЗ ОТСТУПОВ */
.task-display-container {
    background: rgba(26, 37, 47, 0.7);
    border-radius: 20px;
    padding: 0;
    border: none;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.task-display-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(241, 196, 15, 0.1), rgba(52, 152, 219, 0.1));
    border-radius: 20px;
    z-index: 0;
}

/* Занимает всю ширину экрана */
.task-display {
    min-height: 280px;
    background: rgba(255, 255, 255, 0.97);
    color: var(--darker);
    border-radius: 15px;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    border: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    z-index: 1;
    margin: 0;
}

.task-display::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(to right, var(--horse-red), var(--yellow), var(--green), var(--primary-blue), var(--purple));
}

.task-placeholder {
    color: var(--dark-gray);
    text-align: center;
    z-index: 1;
    position: relative;
}

.task-placeholder i {
    font-size: clamp(3rem, 6vw, 4rem);
    margin-bottom: 20px;
    color: var(--primary-blue);
    opacity: 0.7;
}

/* =============================================== */
/* ОБНОВЛЕННЫЕ КНОПКИ ДЕЙСТВИЙ - АДАПТИВНЫЕ */
/* =============================================== */

/* КОНТЕЙНЕР КНОПОК ДЛЯ PC */
.task-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 20px;
    width: 100%;
    max-width: 100%;
    margin-top: 20px;
    padding: 0 10px;
    box-sizing: border-box;
}

/* ОБЩИЕ СТИЛИ КНОПОК ДЛЯ PC */
.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 30px;
    border-radius: 50px;
    border: 2px solid transparent;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-sizing: border-box;
    min-width: 150px;
    height: 52px;
    position: relative;
    overflow: hidden;
}

.action-btn i {
    font-size: 1.3rem;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.action-btn .btn-text {
    transition: all 0.3s ease;
}

/* КНОПКА ЛАЙК - КРАСНАЯ */
.like-btn {
    background: linear-gradient(135deg, var(--like-red), var(--dark-red));
    color: white;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
}

.like-btn:hover {
    background: linear-gradient(135deg, var(--dark-red), var(--like-red));
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 71, 87, 0.5);
}

/* Активный лайк (горит) */
.like-btn.active {
    background: linear-gradient(135deg, #ff3838, #ff6b6b);
    box-shadow: 0 4px 20px rgba(255, 56, 56, 0.6);
    animation: pulseLike 2s infinite;
}

.like-btn.active i {
    color: #ffdd59;
}

@keyframes pulseLike {
    0% { box-shadow: 0 4px 20px rgba(255, 56, 56, 0.6); }
    50% { box-shadow: 0 4px 25px rgba(255, 56, 56, 0.8); }
    100% { box-shadow: 0 4px 20px rgba(255, 56, 56, 0.6); }
}

/* Неактивный лайк (темный) */
.like-btn:not(.active) {
    background: linear-gradient(135deg, #636e72, #2d3436);
    color: rgba(255, 255, 255, 0.7);
}

.like-btn:not(.active):hover {
    background: linear-gradient(135deg, #2d3436, #636e72);
    color: rgba(255, 255, 255, 0.9);
}

/* КНОПКА СОХРАНИТЬ - СИНЯЯ */
.save-btn {
    background: linear-gradient(135deg, var(--save-blue), var(--dark-blue));
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.save-btn:hover {
    background: linear-gradient(135deg, var(--dark-blue), var(--save-blue));
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.5);
}

/* Активное сохранение (горит) */
.save-btn.active {
    background: linear-gradient(135deg, #0984e3, #74b9ff);
    box-shadow: 0 4px 20px rgba(9, 132, 227, 0.6);
    animation: pulseSave 2s infinite;
}

.save-btn.active i {
    color: #ffeaa7;
}

@keyframes pulseSave {
    0% { box-shadow: 0 4px 20px rgba(9, 132, 227, 0.6); }
    50% { box-shadow: 0 4px 25px rgba(9, 132, 227, 0.8); }
    100% { box-shadow: 0 4px 20px rgba(9, 132, 227, 0.6); }
}

/* Неактивное сохранение (темное) */
.save-btn:not(.active) {
    background: linear-gradient(135deg, #636e72, #2d3436);
    color: rgba(255, 255, 255, 0.7);
}

.save-btn:not(.active):hover {
    background: linear-gradient(135deg, #2d3436, #636e72);
    color: rgba(255, 255, 255, 0.9);
}

/* КНОПКА ПРОПУСТИТЬ - СЕРАЯ */
.skip-btn {
    background: linear-gradient(135deg, var(--skip-gray), var(--dark-gray));
    color: white;
    box-shadow: 0 4px 15px rgba(149, 165, 166, 0.3);
}

.skip-btn:hover {
    background: linear-gradient(135deg, var(--dark-gray), var(--skip-gray));
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(149, 165, 166, 0.5);
}

/* АКТИВНЫЕ СОСТОЯНИЯ И АНИМАЦИИ */
.action-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.action-btn:focus {
    outline: none;
    border-color: var(--yellow);
}

/* Анимация для лайка при клике */
@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.like-btn.active i.fa-heart {
    animation: heartBeat 0.5s ease;
}

/* Анимация для сохранения при клике */
@keyframes bookmarkSaved {
    0% { transform: rotate(0deg); }
    50% { transform: rotate(15deg); }
    100% { transform: rotate(0deg); }
}

.save-btn.active i.fa-bookmark {
    animation: bookmarkSaved 0.5s ease;
}

/* =============================================== */
/* МОБИЛЬНЫЕ КНОПКИ - КРУГЛЫЕ ЛАЙК И СОХРАНИТЬ */
/* =============================================== */

@media (max-width: 768px) {
    .task-actions {
        display: grid !important;
        grid-template-columns: 50px 50px 1fr !important;
        gap: 12px !important;
        padding: 0 5px !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* ЛАЙК И СОХРАНИТЬ - КРУГЛЫЕ КНОПКИ */
    .like-btn,
    .save-btn {
        width: 50px !important;
        height: 50px !important;
        min-width: 50px !important;
        max-width: 50px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        
        /* Градиенты для круглых кнопок */
        background: radial-gradient(circle at center, var(--like-red), var(--dark-red)) !important;
    }
    
    .save-btn {
        background: radial-gradient(circle at center, var(--save-blue), var(--dark-blue)) !important;
    }
    
    .save-btn.saved {
        background: radial-gradient(circle at center, #0984e3, #74b9ff) !important;
    }
    
    .like-btn.active {
        background: radial-gradient(circle at center, #ff3838, #ff6b6b) !important;
        animation: pulseLike 2s infinite;
    }
    
    /* Неактивные состояния */
    .like-btn:not(.active) {
        background: radial-gradient(circle at center, #636e72, #2d3436) !important;
    }
    
    .save-btn:not(.active) {
        background: radial-gradient(circle at center, #636e72, #2d3436) !important;
    }
    
    /* ИКОНКИ В КРУГЛЫХ КНОПКАХ */
    .like-btn i,
    .save-btn i {
        margin-right: 0 !important;
        font-size: 1.5rem !important;
        position: relative;
        z-index: 2;
    }
    
    /* СКРЫВАЕМ ТЕКСТ В КРУГЛЫХ КНОПКАХ */
    .like-btn .btn-text,
    .save-btn .btn-text {
        display: none !important;
    }
    
    /* КНОПКА ПРОПУСТИТЬ - ТЕКСТОВАЯ */
    .skip-btn {
        grid-column: 3 !important;
        width: 100% !important;
        height: 50px !important;
        min-width: 0 !important;
        padding: 0 15px !important;
        border-radius: 50px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: linear-gradient(135deg, var(--skip-gray), var(--dark-gray)) !important;
    }
    
    .skip-btn i {
        display: none !important;
    }
    
    .skip-btn .btn-text {
        margin: 0 !important;
        font-size: 1rem !important;
        font-weight: 600 !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%;
        text-align: center;
    }
}

/* МАЛЕНЬКИЕ СМАРТФОНЫ (480px и меньше) */
@media (max-width: 480px) {
    .task-actions {
        grid-template-columns: 45px 45px 1fr !important;
        gap: 10px !important;
    }
    
    .like-btn,
    .save-btn {
        width: 45px !important;
        height: 45px !important;
        min-width: 45px !important;
        max-width: 45px !important;
    }
    
    .like-btn i,
    .save-btn i {
        font-size: 1.4rem !important;
    }
    
    .skip-btn {
        height: 45px !important;
        padding: 0 12px !important;
    }
    
    .skip-btn .btn-text {
        font-size: 0.95rem !important;
    }
}

/* ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ (360px и меньше) */
@media (max-width: 360px) {
    .task-actions {
        grid-template-columns: 40px 40px 1fr !important;
        gap: 8px !important;
    }
    
    .like-btn,
    .save-btn {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
    }
    
    .like-btn i,
    .save-btn i {
        font-size: 1.3rem !important;
    }
    
    .skip-btn {
        height: 40px !important;
        padding: 0 10px !important;
    }
    
    .skip-btn .btn-text {
        font-size: 0.9rem !important;
    }
}

/* Кнопка генерации */
.generate-btn {
    background: linear-gradient(to right, var(--horse-red), var(--dark-red));
    color: white;
    border: none;
    padding: 20px 40px;
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 25px rgba(231, 76, 60, 0.5);
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    min-width: 280px;
    max-width: 100%;
    z-index: 2;
    position: relative;
    box-sizing: border-box;
}

.generate-btn:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 15px 35px rgba(231, 76, 60, 0.7);
}

.generate-btn i {
    margin-right: 15px;
    font-size: clamp(1.5rem, 3vw, 1.8rem);
}

.generator-controls {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 20px;
}

.category-filter, .difficulty-selector {
    background: rgba(26, 37, 47, 0.7);
    padding: 25px;
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.category-filter h3, .difficulty-selector h3 {
    margin-bottom: 20px;
    color: var(--yellow);
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
}

.category-filter h3 i, .difficulty-selector h3 i {
    margin-right: 10px;
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 100%;
}

.category-btn {
    padding: 12px 25px;
    border-radius: 50px;
    border: 2px solid;
    background: transparent;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    box-sizing: border-box;
    max-width: 100%;
}

.category-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.category-btn.active {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Цвета для категорий */
.category-btn[data-category="funny"] {
    border-color: var(--yellow);
    background: rgba(241, 196, 15, 0.1);
}
.category-btn[data-category="funny"].active {
    background: var(--yellow);
    border-color: var(--yellow);
    color: var(--darker);
}

.category-btn[data-category="romantic"] {
    border-color: var(--horse-red);
    background: rgba(231, 76, 60, 0.1);
}
.category-btn[data-category="romantic"].active {
    background: var(--horse-red);
    border-color: var(--horse-red);
}

.category-btn[data-category="creative"] {
    border-color: var(--primary-blue);
    background: rgba(52, 152, 219, 0.1);
}
.category-btn[data-category="creative"].active {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
}

.category-btn[data-category="active"] {
    border-color: var(--green);
    background: rgba(39, 174, 96, 0.1);
}
.category-btn[data-category="active"].active {
    background: var(--green);
    border-color: var(--green);
}

.category-btn[data-category="music"] {
    border-color: var(--purple);
    background: rgba(155, 89, 182, 0.1);
}
.category-btn[data-category="music"].active {
    background: var(--purple);
    border-color: var(--purple);
}

.category-btn[data-category="dance"] {
    border-color: var(--dark-yellow);
    background: rgba(243, 156, 18, 0.1);
}
.category-btn[data-category="dance"].active {
    background: var(--dark-yellow);
    border-color: var(--dark-yellow);
    color: var(--darker);
}

.category-btn[data-category="challenge"] {
    border-color: var(--orange);
    background: rgba(230, 126, 34, 0.1);
}
.category-btn[data-category="challenge"].active {
    background: var(--orange);
    border-color: var(--orange);
}

.category-btn[data-category="family"] {
    border-color: #1abc9c;
    background: rgba(26, 188, 156, 0.1);
}
.category-btn[data-category="family"].active {
    background: #1abc9c;
    border-color: #1abc9c;
}

.category-btn[data-category="friends"] {
    border-color: var(--dark);
    background: rgba(44, 62, 80, 0.1);
}
.category-btn[data-category="friends"].active {
    background: var(--dark);
    border-color: var(--dark);
}

.category-btn[data-category="newyear"] {
    border-color: var(--horse-red);
    background: rgba(231, 76, 60, 0.1);
}
.category-btn[data-category="newyear"].active {
    background: var(--horse-red);
    border-color: var(--horse-red);
}

/* Кнопки выбора всех/отмены всех - адаптивные */
.category-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    width: 100%;
    max-width: 100%;
}

.category-all-btn, .category-none-btn {
    padding: 10px 20px;
    border-radius: 50px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
    max-width: 100%;
}

.category-all-btn {
    background: linear-gradient(to right, var(--green), var(--dark-green));
    color: white;
}

.category-all-btn:hover {
    background: linear-gradient(to right, var(--dark-green), var(--green));
    transform: translateY(-3px);
}

.category-none-btn {
    background: linear-gradient(to right, var(--gray), var(--dark-gray));
    color: white;
}

.category-none-btn:hover {
    background: linear-gradient(to right, var(--dark-gray), var(--gray));
    transform: translateY(-3px);
}

.btn-text {
    margin-left: 5px;
}

.selected-categories-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.selected-categories-info i {
    color: var(--yellow);
}

/* Сложность - БЕЗ ОТСТУПОВ С БОКОВ */
.difficulty-visual {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 100%;
}

.difficulty-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
}

.difficulty-option {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    margin: 0;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

.difficulty-option:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.difficulty-option.active {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--yellow);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(241, 196, 15, 0.2);
}

.difficulty-icon {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.8);
}

.difficulty-option.active .difficulty-icon {
    color: var(--yellow);
}

.difficulty-label {
    font-size: clamp(1rem, 2vw, 1.1rem);
    font-weight: bold;
    margin-bottom: 8px;
    color: white;
}

.difficulty-indicator {
    width: 25px;
    height: 4px;
    border-radius: 5px;
    margin-top: 8px;
}

.easy-indicator {
    background: var(--green);
}

.medium-indicator {
    background: var(--yellow);
}

.hard-indicator {
    background: var(--horse-red);
}

.difficulty-check {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 1.1rem;
    color: var(--yellow);
    opacity: 0;
    transition: opacity 0.3s;
}

.difficulty-option.active .difficulty-check {
    opacity: 1;
}

.difficulty-info {
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border-left: 4px solid var(--yellow);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.difficulty-info p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    line-height: 1.5;
}

.saved-tasks {
    background: rgba(26, 37, 47, 0.7);
    padding: 30px;
    border-radius: 15px;
    border: 2px solid var(--green);
    position: relative;
    overflow: hidden;
    margin-top: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.saved-tasks::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.1), rgba(52, 152, 219, 0.1));
    border-radius: 15px;
    z-index: 0;
}

.saved-tasks h3 {
    margin-bottom: 20px;
    color: var(--yellow);
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    max-width: 100%;
}

.saved-tasks h3 i {
    margin-right: 15px;
}

.saved-tasks .counter {
    background: var(--green);
    color: white;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    min-width: 36px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    line-height: 1;
    height: 32px;
}

.saved-list {
    min-height: 100px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.saved-task-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid var(--yellow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.saved-task-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.saved-task-text {
    flex-grow: 1;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.remove-task {
    background: rgba(231, 76, 60, 0.3);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
    margin-left: 15px;
}

.remove-task:hover {
    background: var(--horse-red);
    transform: scale(1.1);
}

.empty-message {
    text-align: center;
    color: var(--gray);
    font-style: italic;
    padding: 30px;
    width: 100%;
    max-width: 100%;
}

/* =============================================== */
/* ИСПРАВЛЕНИЯ ДЛЯ ВСЕХ КАРТОЧЕК */
/* =============================================== */

/* ОБЩИЕ СТИЛИ ДЛЯ ВСЕХ КОНТЕЙНЕРОВ */
.rules-content,
.print-options,
.tips-content,
.prizes-grid,
.categories-grid {
    display: grid;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto;
    gap: 20px;
    box-sizing: border-box !important;
}

/* ОБЩИЕ СТИЛИ ДЛЯ ВСЕХ КАРТОЧЕК */
.rule-card,
.print-card,
.tip,
.prize-card,
.category-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    
    /* Flex для контроля содержимого */
    display: flex !important;
    flex-direction: column !important;
    
    /* Ограничиваем текст */
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto;
    
    /* Скрываем переполнение */
    overflow: hidden !important;
}

/* ФИКСИРУЕМ ЗАГОЛОВКИ В КАРТОЧКАХ */
.rule-card h3,
.print-card h3,
.tip h3,
.prize-card h3,
.category-card h3 {
    width: 100% !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    line-height: 1.3;
    
    /* Многоточие при переполнении */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ФИКСИРУЕМ ТЕКСТ В КАРТОЧКАХ */
.rule-card p,
.print-card p,
.tip p,
.category-card p {
    width: 100% !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    flex-grow: 1;
    
    /* Многоточие при переполнении */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 1. CATEGORIES SECTION */
.categories-section {
    background: rgba(155, 89, 182, 0.95);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    border: 3px solid var(--yellow);
}

.categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
}

.category-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px 20px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    cursor: pointer;
    min-height: 220px;
    max-height: 280px;
}

.category-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.category-icon {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 15px;
    display: block;
    flex-shrink: 0;
}

.task-count {
    background: rgba(241, 196, 15, 0.2);
    color: var(--yellow);
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: bold;
    display: inline-block;
    border: 2px solid var(--yellow);
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-top: auto;
}

/* 2. RULES SECTION */
.rules-section {
    background: rgba(39, 174, 96, 0.95);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    border: 3px solid var(--yellow);
}

.rules-content {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
}

.rule-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px 20px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    min-height: 220px;
    max-height: 280px;
}

.rule-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2);
}

.rule-icon {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 15px;
    color: var(--yellow);
    flex-shrink: 0;
}

/* 3. PRINT SECTION */
.print-section {
    background: rgba(230, 126, 34, 0.95);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    border: 3px solid var(--yellow);
}

.print-options {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
}

.print-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px 20px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 300px;
    max-height: 380px;
}

.print-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.2);
}

.print-icon {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 15px;
    color: var(--yellow);
    flex-shrink: 0;
}

.print-btn {
    background: linear-gradient(to right, var(--yellow), var(--dark-yellow));
    color: var(--darker);
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.print-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.print-btn i {
    margin-right: 8px;
}

.print-btn.vip {
    background: linear-gradient(to right, #ffd700, #ff9900);
    color: var(--darker);
}

/* 4. TIPS SECTION */
.tips-section {
    background: rgba(52, 152, 219, 0.95);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    border: 3px solid var(--yellow);
}

.tips-content {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
}

.tip {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px 20px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    min-height: 220px;
    max-height: 280px;
}

.tip:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2);
}

.tip i {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 15px;
    color: var(--yellow);
    flex-shrink: 0;
}

/* 5. PRIZES SECTION */
.prizes-section {
    background: rgba(155, 89, 182, 0.95);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    border: 3px solid var(--yellow);
}

.prizes-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
}

.prize-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    min-height: 280px;
    max-height: 400px;
    overflow-y: auto;
}

.prize-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2);
}

.prize-card h3 {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    margin-bottom: 15px;
    color: var(--yellow);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}

.prize-card ul {
    list-style: none;
    padding-left: 0;
    flex-grow: 1;
    margin: 0;
    width: 100%;
    max-width: 100%;
}

.prize-card li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: flex-start;
    line-height: 1.4;
    font-size: 0.95rem;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    width: 100%;
    max-width: 100%;
}

.prize-card li:before {
    content: "🎁";
    margin-right: 10px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Обновлённый баннер - ВСЯ ПЛОЩАДЬ КЛИКАБЕЛЬНА */
.permanent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to right, #8e44ad, #9b59b6, #8e44ad);
    color: white;
    padding: 12px 15px;
    z-index: 1000;
    display: flex;
    align-items: center;
    border-top: 3px solid var(--yellow);
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.4);
    min-height: 70px;
    box-sizing: border-box;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.permanent-banner:hover {
    background: linear-gradient(to right, #9b59b6, #8e44ad, #9b59b6);
    transform: translateY(-2px);
    box-shadow: 0 -3px 30px rgba(0, 0, 0, 0.5);
}

.banner-content {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    gap: 15px;
    flex-wrap: nowrap;
    overflow: hidden;
}

.banner-icon {
    font-size: 1.8rem;
    color: var(--yellow);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
}

.banner-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.banner-text h3 {
    font-size: 1rem;
    margin-bottom: 4px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: bold;
}

.banner-text p {
    font-size: 0.85rem;
    opacity: 0.9;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.banner-text strong {
    color: #f1c40f;
    font-weight: bold;
}

.banner-close {
    background: rgba(0, 0, 0, 0.2);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
    margin-left: 5px;
    padding: 0;
    z-index: 1001;
}

.banner-close:hover {
    background: rgba(0, 0, 0, 0.4);
    color: var(--yellow);
    transform: scale(1.1);
}

/* Футер */
footer {
    background: rgba(26, 37, 47, 0.95);
    border-radius: 25px;
    padding: 50px 40px;
    margin-top: 50px;
    margin-bottom: 80px;
    border: 3px solid var(--primary-blue);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
    width: 100%;
    max-width: 100%;
}

.footer-section h3 {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    margin-bottom: 20px;
    color: var(--yellow);
    display: flex;
    align-items: center;
}

.footer-section h3 i {
    margin-right: 10px;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
    line-height: 1.6;
    word-break: break-word;
    overflow-wrap: break-word;
}

.footer-section ul {
    list-style: none;
    padding-left: 0;
}

.footer-section li {
    margin-bottom: 12px;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: break-word;
}

.footer-section a:hover {
    color: var(--yellow);
    transform: translateX(5px);
}

.footer-section a i {
    margin-right: 10px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--yellow);
    color: var(--darker);
    transform: translateY(-5px);
}

.external-link-footer {
    background: rgba(155, 89, 182, 0.3);
    border: 2px solid #9b59b6;
    padding: 15px;
    border-radius: 10px;
    display: block;
    margin-top: 15px;
    font-weight: bold;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: break-word;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.external-link-footer:hover {
    background: rgba(155, 89, 182, 0.5);
    transform: translateX(5px);
}

.disclaimer {
    font-size: 0.9rem;
    color: var(--gray);
    margin-top: 10px;
    font-style: italic;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: break-word;
}

.contact-link {
    background: rgba(52, 152, 219, 0.3);
    border: 2px solid var(--primary-blue);
    padding: 15px;
    border-radius: 10px;
    display: block;
    margin-top: 15px;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: break-word;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.contact-link:hover {
    background: rgba(52, 152, 219, 0.5);
}

.copyright {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: break-word;
    width: 100%;
    max-width: 100%;
}

.seo-text {
    margin-top: 50px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.seo-text h2 {
    font-size: clamp(1.6rem, 3vw, 1.8rem);
    margin-bottom: 25px;
    color: var(--yellow);
    word-break: break-word;
    overflow-wrap: break-word;
}

.seo-text h3 {
    font-size: clamp(1.3rem, 2.5vw, 1.5rem);
    margin: 30px 0 15px 0;
    color: var(--yellow);
    word-break: break-word;
    overflow-wrap: break-word;
}

.seo-text p {
    margin-bottom: 20px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    word-break: break-word;
    overflow-wrap: break-word;
}

.seo-text ul {
    margin: 20px 0;
    padding-left: 20px;
}

.seo-text li {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    word-break: break-word;
    overflow-wrap: break-word;
}

.seo-text p:last-child {
    margin-bottom: 0;
}

/* Новогодние украшения */
.decoration {
    position: fixed;
    font-size: clamp(2rem, 4vw, 2.5rem);
    z-index: 1;
    opacity: 0.7;
    pointer-events: none;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.tree {
    bottom: 30px;
    right: 30px;
    color: var(--green);
    animation-delay: 0s;
}

.star {
    top: 100px;
    right: 10%;
    color: var(--yellow);
    animation-delay: 1s;
}

.bell {
    bottom: 100px;
    left: 10%;
    color: var(--yellow);
    animation-delay: 2s;
}

.gift {
    top: 200px;
    left: 5%;
    color: var(--horse-red);
    animation-delay: 3s;
}

.snowman {
    top: 150px;
    right: 5%;
    color: white;
    animation-delay: 4s;
}

.candy {
    bottom: 200px;
    right: 15%;
    color: #e74c3c;
    animation-delay: 5s;
}

.horse {
    bottom: 150px;
    left: 5%;
    color: var(--horse-red);
    animation-delay: 6s;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.8s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in {
    animation: slideIn 0.6s ease-out;
}

/* Уведомления */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    color: white;
    font-weight: bold;
    z-index: 1001;
    display: flex;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transform: translateX(120%);
    transition: transform 0.3s ease-out;
    max-width: 90vw;
    box-sizing: border-box;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: var(--green);
    border-left: 5px solid var(--dark-green);
}

.notification.error {
    background: var(--horse-red);
    border-left: 5px solid var(--dark-red);
}

.notification.info {
    background: var(--primary-blue);
    border-left: 5px solid var(--dark-blue);
}

.notification i {
    margin-right: 10px;
    font-size: 1.2rem;
}

/* =============================================== */
/* ФИКСЫ ДЛЯ ПЕРЕПОЛНЕНИЯ */
/* =============================================== */

.fix-overflow {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.fix-overflow * {
    max-width: 100% !important;
    box-sizing: border-box !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
}

/* Принудительное ограничение всех элементов */
img, video, iframe, embed, object {
    max-width: 100% !important;
    height: auto !important;
}

/* ФИКС ДЛЯ ТАБЛИЦ И СПИСКОВ */
table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
}

td, th {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
}

/* ФИКС ДЛЯ КНОПОК И ИНПУТОВ */
button, input, textarea, select {
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
}

/* =============================================== */
/* АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ */
/* =============================================== */

/* Мобильные устройства (до 480px) */
@media (max-width: 480px) {
    /* Статистика - 2 строки по 2 элемента */
    .header-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, auto);
        gap: 12px;
        margin-top: 20px;
        width: 100%;
    }
    
    .stat {
        min-width: auto;
        width: 100%;
        max-width: none;
        padding: 12px 10px;
        margin: 0;
    }
    
    .stat i {
        font-size: 1.5rem;
        margin-bottom: 6px;
    }
    
    .stat span {
        font-size: 1.1rem;
        font-weight: 800;
    }
    
    .stat small {
        font-size: 0.8rem;
    }
    
    /* Распределение по сетке 2x2 */
    .stat:nth-child(1) {
        grid-column: 1;
        grid-row: 1;
    }
    
    .stat:nth-child(2) {
        grid-column: 2;
        grid-row: 1;
    }
    
    .stat:nth-child(3) {
        grid-column: 1;
        grid-row: 2;
    }
    
    .stat:nth-child(4) {
        grid-column: 2;
        grid-row: 2;
    }
    
    /* Общие стили для мобильных */
    .container {
        padding: 10px;
    }
    
    header {
        padding: 20px 15px;
        border-radius: 15px;
    }
    
    h1 {
        font-size: 1.6rem;
        line-height: 1.3;
        margin-bottom: 15px;
    }
    
    .subtitle {
        font-size: 0.95rem;
        margin-bottom: 20px;
        line-height: 1.4;
    }
    
    .header-banner {
        padding: 12px;
        font-size: 0.85rem;
        margin-top: 20px;
    }
    
    /* Навигация */
    .main-nav {
        padding: 12px;
        gap: 8px;
    }
    
    .main-nav a {
        padding: 10px 15px;
        font-size: 0.85rem;
        justify-content: center;
        text-align: center;
        flex: 1;
        min-width: calc(50% - 8px);
        max-width: 100%;
    }
    
    .main-nav a i {
        margin-right: 6px;
        font-size: 0.9rem;
    }
    
    /* Таймер */
    .countdown-banner {
        padding: 15px 10px;
        margin-bottom: 20px;
    }
    
    .countdown-content h2 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    .countdown-timer {
        gap: 5px;
    }
    
    .time-unit {
        padding: 10px 5px;
        min-width: 70px;
    }
    
    .time-unit span {
        font-size: 1.4rem;
    }
    
    .time-unit small {
        font-size: 0.7rem;
    }
    
    /* Игровая секция */
    .game-section {
        padding: 20px 15px;
        border-radius: 15px;
        margin: 0 -10px;
        width: calc(100% + 20px);
    }
    
    .section-header h2 {
        font-size: 1.3rem;
    }
    
    .section-header p {
        font-size: 0.9rem;
    }
    
    /* Карточка задания - БЕЗ ОТСТУПОВ на мобильных */
    .task-display-container {
        padding: 0;
        margin-bottom: 15px;
        border-radius: 10px;
        width: 100%;
    }
    
    .task-display {
        min-height: 200px;
        padding: 20px 15px;
        font-size: 1.2rem;
        border-radius: 10px;
        width: 100%;
        margin: 0;
    }
    
    /* Кнопка генерации - УМЕНЬШЕНЫ ОТСТУПЫ */
    .generate-btn {
        padding: 16px 25px;
        font-size: 1.1rem;
        margin: 15px auto;
        min-width: 250px;
        width: 90%;
    }
    
    .task-actions {
        gap: 10px;
    }
    
    .action-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
        min-width: 140px;
    }
    
    /* Категории - адаптивные кнопки */
    .category-buttons {
        gap: 8px;
    }
    
    .category-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
        min-width: calc(50% - 8px);
        flex: 1 1 calc(50% - 8px);
    }
    
    /* Кнопки "Выбрать все" и "Отменить все" - убраны иконки на мобильных */
    .category-controls {
        gap: 10px;
        flex-wrap: nowrap;
    }
    
    .category-all-btn, .category-none-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
        flex: 1;
        overflow: hidden;
        white-space: nowrap;
    }
    
    .category-all-btn i, .category-none-btn i {
        display: none; /* Убираем иконки на мобильных */
    }
    
    .btn-text {
        margin-left: 0;
        display: inline-block;
        width: 100%;
        text-align: center;
    }
    
    /* Сложность - 2 колонки в 2 строки */
    .difficulty-options {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, auto);
        gap: 10px;
        margin: 0;
        padding: 0;
    }
    
    .difficulty-option {
        padding: 12px;
        margin: 0;
    }
    
    .difficulty-icon {
        font-size: 1.6rem;
        margin-bottom: 8px;
    }
    
    .difficulty-label {
        font-size: 0.9rem;
    }
    
    .difficulty-indicator {
        width: 20px;
        height: 3px;
    }
    
    /* Сохраненные задачи */
    .saved-tasks {
        padding: 20px 15px;
    }
    
    .saved-tasks h3 {
        font-size: 1.2rem;
    }
    
    .saved-list {
        padding: 15px;
    }
    
    /* Карточки секций на мобильных */
    .categories-grid,
    .rules-content,
    .print-options,
    .tips-content,
    .prizes-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    .category-card,
    .rule-card,
    .tip {
        min-height: 180px;
        max-height: 250px;
        padding: 20px 15px;
    }
    
    .print-card {
        min-height: 260px;
        max-height: 320px;
        padding: 20px 15px;
    }
    
    .prize-card {
        min-height: 250px;
        max-height: 350px;
        padding: 20px 15px;
    }
    
    .category-card h3,
    .rule-card h3,
    .print-card h3,
    .tip h3,
    .prize-card h3 {
        font-size: 1.1rem;
        -webkit-line-clamp: 1;
    }
    
    .category-card p,
    .rule-card p,
    .print-card p,
    .tip p {
        font-size: 0.9rem;
        -webkit-line-clamp: 2;
    }
    
    .prize-card li {
        font-size: 0.9rem;
    }
    
    .print-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .task-count {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* Очень маленькие экраны (до 360px) */
@media (max-width: 360px) {
    .header-stats {
        gap: 8px;
    }
    
    .stat {
        padding: 10px 8px;
    }
    
    .stat i {
        font-size: 1.3rem;
    }
    
    .stat span {
        font-size: 1rem;
    }
    
    .stat small {
        font-size: 0.75rem;
    }
    
    /* Еще более компактная навигация */
    .main-nav {
        padding: 10px;
        gap: 6px;
    }
    
    .main-nav a {
        padding: 8px 12px;
        font-size: 0.8rem;
        min-width: calc(50% - 6px);
    }
    
    /* Уменьшаем кнопки действий */
    .action-btn {
        padding: 10px 15px;
        font-size: 0.85rem;
        min-width: 120px;
    }
    
    /* Уменьшаем кнопку генерации */
    .generate-btn {
        padding: 14px 20px;
        font-size: 1rem;
        min-width: 220px;
        width: 95%;
    }
    
    /* Адаптивные категории */
    .category-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
        min-width: calc(50% - 6px);
    }
    
    /* Кнопки управления категориями - ещё компактнее */
    .category-all-btn, .category-none-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

/* Экстремально маленькие экраны (320px и меньше) */
@media (max-width: 320px) {
    .container {
        padding: 8px;
    }
    
    header {
        padding: 15px 10px;
    }
    
    h1 {
        font-size: 1.4rem;
        text-shadow: 3px 3px 0 var(--dark-red);
    }
    
    .subtitle {
        font-size: 0.85rem;
        margin-bottom: 15px;
    }
    
    /* Супер компактная статистика */
    .header-stats {
        gap: 6px;
    }
    
    .stat {
        padding: 8px 6px;
    }
    
    .stat i {
        font-size: 1.1rem;
        margin-bottom: 4px;
    }
    
    .stat span {
        font-size: 0.9rem;
    }
    
    .stat small {
        font-size: 0.7rem;
    }
    
    .header-banner {
        padding: 10px;
        font-size: 0.75rem;
        margin-top: 15px;
    }
    
    /* Миниатюрная навигация */
    .main-nav {
        padding: 8px;
        gap: 5px;
    }
    
    .main-nav a {
        padding: 8px 10px;
        font-size: 0.75rem;
        min-width: calc(50% - 5px);
    }
    
    /* Ультра компактный таймер */
    .countdown-banner {
        padding: 12px 8px;
    }
    
    .countdown-content h2 {
        font-size: 1rem;
    }
    
    .time-unit {
        padding: 8px 4px;
        min-width: 60px;
    }
    
    .time-unit span {
        font-size: 1.2rem;
    }
    
    .time-unit small {
        font-size: 0.65rem;
    }
    
    /* Мини-игровая зона */
    .game-section {
        padding: 15px 10px;
        margin: 0 -8px;
        width: calc(100% + 16px);
    }
    
    .task-display {
        min-height: 180px;
        padding: 15px 10px;
        font-size: 1.1rem;
    }
    
    .generate-btn {
        padding: 12px 18px;
        font-size: 0.9rem;
        min-width: 200px;
        width: 100%;
    }
    
    .generate-btn i {
        margin-right: 8px;
        font-size: 1rem;
    }
    
    /* Микро кнопки действий */
    .task-actions {
        gap: 8px;
    }
    
    .action-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
        min-width: 100px;
    }
    
    /* Нано-категории */
    .category-buttons {
        gap: 6px;
    }
    
    .category-btn {
        padding: 5px 8px;
        font-size: 0.7rem;
        min-width: calc(50% - 6px);
        flex: 1 1 calc(50% - 6px);
    }
    
    /* Мини-контролы категорий */
    .category-controls {
        gap: 8px;
    }
    
    .category-all-btn, .category-none-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    /* Баннер для самых маленьких экранов */
    .permanent-banner {
        padding: 8px 10px;
        min-height: 60px;
    }
    
    .banner-icon {
        font-size: 1.4rem;
        min-width: 30px;
    }
    
    .banner-text h3 {
        font-size: 0.85rem;
    }
    
    .banner-text p {
        font-size: 0.75rem;
    }
    
    .banner-close {
        width: 26px;
        height: 26px;
        font-size: 1rem;
    }
    
    /* Карточки для самых маленьких экранов */
    .category-card,
    .rule-card,
    .tip {
        min-height: 160px;
        max-height: 200px;
        padding: 15px 10px;
    }
    
    .print-card {
        min-height: 220px;
        max-height: 280px;
        padding: 15px 10px;
    }
    
    .prize-card {
        min-height: 200px;
        max-height: 300px;
        padding: 15px 10px;
    }
    
    .category-card h3,
    .rule-card h3,
    .print-card h3,
    .tip h3,
    .prize-card h3 {
        font-size: 0.95rem;
    }
    
    .category-card p,
    .rule-card p,
    .print-card p,
    .tip p {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
    }
    
    .prize-card li {
        font-size: 0.8rem;
        padding: 5px 0;
    }
}

/* Ландшафтная ориентация на мобильных */
@media (max-height: 500px) and (orientation: landscape) {
    .header-stats {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: auto;
        gap: 8px;
    }
    
    .stat:nth-child(1),
    .stat:nth-child(2),
    .stat:nth-child(3),
    .stat:nth-child(4) {
        grid-column: auto;
        grid-row: auto;
    }
    
    .stat {
        padding: 6px 8px;
    }
    
    .stat i {
        font-size: 1.2rem;
        margin-bottom: 5px;
    }
    
    .stat span {
        font-size: 0.9rem;
    }
    
    .stat small {
        font-size: 0.7rem;
    }
    
    .task-display {
        min-height: 120px;
        padding: 15px;
    }
    
    .task-actions {
        flex-direction: row;
        flex-wrap: nowrap;
    }
    
    .action-btn {
        flex: 1;
        min-width: auto;
        padding: 10px;
    }
}

/* Десктопные экраны (от 768px) */
@media (min-width: 769px) {
    .difficulty-options {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .category-controls {
        display: flex;
    }
}

/* Планшетные экраны (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .difficulty-options {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, auto);
    }
    
    .category-btn {
        min-width: calc(33.333% - 10px);
        flex: 1 1 calc(33.333% - 10px);
    }
    
    .categories-grid,
    .rules-content,
    .print-options,
    .tips-content,
    .prizes-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
        gap: 15px;
    }
}

/* Оптимизация для очень высоких экранов */
@media (min-height: 1000px) {
    .task-display {
        min-height: 350px;
    }
}

/* ФИКС ДЛЯ ПРОКРУТКИ В PRIZE-CARD */
.prize-card::-webkit-scrollbar {
    width: 6px;
}

.prize-card::-webkit-scrollbar-thumb {
    background: var(--yellow);
    border-radius: 3px;
}

/* ВЫРАВНИВАНИЕ ИКОНОК */
.rule-icon,
.print-icon,
.tip i,
.category-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
}

/* ФИКС ДЛЯ СПИСКОВ С ДЛИННЫМИ ЭЛЕМЕНТАМИ */
.prize-card li span {
    flex: 1;
    min-width: 0;
}

/* ГАРАНТИРОВАННЫЙ ФИКС ДЛЯ ВСЕХ БЛОКОВ */
.container,
.main-content,
.game-section,
.rules-section,
.print-section,
.tips-section,
.prizes-section,
.categories-section {
    overflow-x: hidden !important;
}

/* Все карточки и их содержимое */
[class*="-card"],
[class*="-content"] > * {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Особое внимание к длинному контенту */
h1, h2, h3, h4, h5, h6,
p, span, li, td, th, a {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
}

	