* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #fff;
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;

    /* ВАЖНО: Фон должен быть прозрачным, чтобы видеть canvas сзади */
    background: transparent;
    margin: 0;
}

/* Холст для созвездий */
#space-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* На заднем плане */
    /* Красивый глубокий космос */
    background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
}


.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    animation: twinkle 3s infinite ease-in-out;
}

@keyframes twinkle {
    0% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.3;
    }
}

/* Этот блок заставит контейнер растягиваться и толкать футер вниз */
.container {
    flex: 1;
    width: 100%;
    /* Убедимся, что ширина не ломается */
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}


header {
    text-align: center;
    padding: 20px 0;
    /* Вернул чуть больше отступа, чтобы не было тесно */

    /* ТЕМНЫЙ ФОН КАК У ФУТЕРА */
    /* Было 0.3, ставим 0.8 — он станет плотным темно-синим */
    background: rgba(15, 12, 41, 0.7);



    /* Границы и тени */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    /* Тень делаем темнее (0.5), как у футера */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);

    border-radius: 0 0 20px 20px;
    margin-bottom: 30px;

    /* Липкое позиционирование */
    position: relative;
    top: 0;
    z-index: 1000;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #ffffff;
    text-shadow: 0 0 10px #6c5ce7, 0 0 20px #6c5ce7;
    letter-spacing: 1px;
}

h2 {
    margin-bottom: 10px;
}

header p {
    font-size: 1.1em;
    color: #bdc3c7;
    font-style: italic;
    margin-bottom: 20px;
}


.nav-menu {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.nav-menu a {
    color: #fff;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-weight: 500;
    background: rgba(108, 92, 231, 0.2);
}

.nav-menu a:hover {
    background: rgba(108, 92, 231, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.5);
}

footer {
    flex-shrink: 0;
    /* Запрещаем футеру сплющиваться */
    /* Остальные стили футера остаются как были... */
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    background: rgba(15, 12, 41, 0.7);
    border-radius: 12px 12px 0 0;
    /* Можно скруглить только верх */
    font-size: 0.9em;
    color: #bdc3c7;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    font-size: 1.3em;
    color: #bdc3c7;
    background: rgba(30, 25, 50, 0.5);
    border-radius: 12px;
    margin: 30px 0;
}

.empty-state i {
    font-size: 3em;
    color: #6c5ce7;
    margin-bottom: 15px;
    display: block;
}


.image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #2d2a3b, #343a40);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c5ce7;
    font-size: 2em;
    font-weight: bold;
}


@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 10px;
    }
}

/* --- УВЕДОМЛЕНИЯ (TOAST) --- */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

.toast {
    background: rgba(30, 25, 50, 0.95);
    backdrop-filter: blur(10px);
    border-left: 5px solid #6c5ce7;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    margin-top: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 15px;
    animation: slideIn 0.5s ease forwards, fadeOut 0.5s ease 2.5s forwards;
    min-width: 250px;
}

.toast i {
    font-size: 1.5em;
    color: #6c5ce7;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        pointer-events: none;
    }
}

/* --- ИНТЕРАКТИВНЫЕ ЗВЕЗДЫ ДЛЯ ФОРМЫ --- */
.star-rating-widget {
    display: inline-flex;
    flex-direction: row-reverse;
    /* Чтобы заполнялись слева направо при hover */
    gap: 5px;
}

.star-rating-widget input {
    display: none;
}

.star-rating-widget label {
    font-size: 2em;
    color: #444;
    cursor: pointer;
    transition: color 0.2s;
}

/* Подсветка звезд при наведении и выборе */
.star-rating-widget input:checked~label,
.star-rating-widget label:hover,
.star-rating-widget label:hover~label {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* --- БУРГЕР МЕНЮ И АДАПТИВ ШАПКИ --- */
.burger-toggle {
    display: none;
    position: absolute;
    top: 25px;
    right: 20px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2em;
    cursor: pointer;
    z-index: 1002;
    transition: 0.3s;
}

.burger-toggle:hover {
    color: #a29bfe;
}

@media (max-width: 768px) {
    .burger-toggle {
        display: block; /* Показываем бургер на мобилках */
    }
    
    header h1 {
        font-size: 2em;
        text-align: left;
        padding-left: 20px;
    }
    
    header p {
        text-align: left;
        padding-left: 20px;
        padding-right: 60px; /* Чтобы текст не залез под кнопку бургера */
    }

    .nav-menu {
        display: none; /* Скрываем меню по умолчанию */
        flex-direction: column;
        width: 100%;
        background: rgba(15, 12, 41, 0.98);
        backdrop-filter: blur(10px);
        position: absolute;
        top: 100%; /* Выпадает ровно из под шапки */
        left: 0;
        padding: 10px 0 20px 0;
        box-shadow: 0 15px 30px rgba(0,0,0,0.6);
        z-index: 1001;
        gap: 5px;
    }

    .nav-menu.active {
        display: flex; /* Показываем при клике */
        animation: slideDown 0.3s ease;
    }

    .nav-menu a {
        margin: 5px 20px;
        text-align: left;
        font-size: 1.1em;
        padding: 15px 20px;
    }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
}