/* === 1. Обнуление и базовые стили === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


body {
    font-family: 'Roboto', sans-serif;
    background: #000;
    color: #e0e0ff;
    line-height: 1.6;
    position: relative;
    min-height: 100vh;
}

/* === 2. Фоновые звёзды === */
.stars-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
    overflow: hidden;
}

.stars .star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle var(--duration, 3s) infinite ease-in-out;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

/* === 3. Навигация === */
/* === Шапка === */
nav {
    background: rgba(25, 20, 55, 0.95);
    padding: 12px; /* Уменьшаем отступы */
    backdrop-filter: blur(15px);
    border-bottom: 2px solid rgba(157, 78, 221, 0.3);
    border-left: 2px solid rgba(157, 78, 221, 0.3);
    border-right: 2px solid rgba(157, 78, 221, 0.3);
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    display: flex;
    justify-content: space-between; /* Логотип слева, бургер-меню справа */
    align-items: center;
    position: relative;
    z-index: 10;

    /* Размеры как у main-container */
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 12px;
    padding-right: 12px;
}

/* === Логотип === */
.logo-container {
    flex: 1; /* Логотип занимает левую часть */
}

.logo-link {
    text-decoration: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.logo-svg {
    width: 180px; /* Размер логотипа */
    height: auto;
    transition: transform 0.3s ease;
}

.logo-svg:hover {
    transform: scale(1.05); /* Плавное увеличение при наведении */
}

/* === Бургер-меню === */
.menu-toggle {
    display: none; /* Скрываем по умолчанию */
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    width: 24px;
    height: 20px;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #c5b3e6;
    transition: all 0.3s ease;
}

/* Анимация бургер-меню при открытии */
.menu-open .menu-toggle span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
}

.menu-open .menu-toggle span:nth-child(2) {
    opacity: 0;
}

.menu-open .menu-toggle span:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
}

/* === Основное меню === */
.menu {
    display: flex;
    gap: 16px;
    align-items: center;
    transition: all 0.3s ease;
}

nav a {
    color: #c5b3e6;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95em;
    padding: 8px 16px;
    background: rgba(93, 53, 135, 0.3);
    border-radius: 20px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

nav a:hover {
    background: rgba(157, 78, 221, 0.4);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(157, 78, 221, 0.3);
}

/* === Адаптивность === */
@media (max-width: 1024px) {
    /* Показываем бургер-меню */
    .menu-toggle {
        display: flex;
    }

    /* Скрываем основное меню */
    .menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(25, 20, 55, 0.98);
        flex-direction: column;
        gap: 12px;
        padding: 15px;
        border-bottom-left-radius: 10px;
        border-bottom-right-radius: 10px;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
    }

    /* Открываем меню при добавлении класса menu-open */
    .menu-open .menu {
        display: flex;
        transform: translateY(0);
    }
}

/* === 4. Основной контейнер === */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px;
    position: relative;
    z-index: 1;
}

.content-wrapper {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.main-content {
    flex: 3;
}

/* === 5. Сайдбар === */
.sidebar-list {
    flex: 1;
    background: rgba(30, 25, 65, 0.8);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(157, 78, 221, 0.3);
    color: #e0e0ff;

    /* Делаем сайдбар "липким" */
    position: sticky;
    top: 20px; /* Отступ от верха страницы */
    align-self: flex-start; /* Выравнивание по вертикали */
    max-height: calc(100vh - 40px); /* Ограничиваем высоту */
    overflow-y: auto; /* Добавляем прокрутку, если контент не помещается */
}

.sidebar-title {
    color: #9d4edd;
    font-family: 'Playfair Display', serif;
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #7b2cbf;
    font-size: 1.4em;
    text-shadow: 0 0 10px rgba(157, 78, 221, 0.2);
}

.forecast-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.forecast-item {
    margin-bottom: 10px;
}

.forecast-link {
    display: flex;
    align-items: center;
    color: #c5b3e6;
    text-decoration: none;
    font-size: 0.95em;
    padding: 10px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    opacity: 0.95;
}

.forecast-link:hover {
    background: rgba(157, 78, 221, 0.2);
    color: #ffffff;
    opacity: 1;
    transform: translateX(5px);
    box-shadow: 0 0 10px rgba(157, 78, 221, 0.2);
}

.forecast-link .icon {
    margin-right: 12px;
    font-size: 1.2em;
}

.forecast-link .text {
    font-family: 'Roboto', sans-serif;
}

/* === Подписка === */
.newsletter-block {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid rgba(157, 78, 221, 0.3);
}

.widget-title {
    color: #9d4edd;
    font-family: 'Playfair Display', serif;
    font-size: 1.1em;
    margin-bottom: 8px;
}

.widget-desc {
    color: #a090d0;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.widget-input {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9em;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.widget-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.widget-button {
    display: inline-block;
    background: linear-gradient(45deg, #5a189a, #7b2cbf);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.widget-button:hover {
    background: #7b2cbf;
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(125, 46, 221, 0.3);
}

/* === Футер === */
footer {
    background: rgba(25, 20, 55, 0.98);
    color: #c5b3e6;
    text-align: center;
    padding: 25px 0;
    margin-top: 35px;
    backdrop-filter: blur(15px);
    border-top: 2px solid #8a2be2;
}

.social-links a {
    color: #9d4edd;
    margin: 0 12px;
    font-size: 1.1em;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: #c5b3e6;
    text-shadow: 0 0 10px rgba(157, 78, 221, 0.5);
}

/* === Адаптивность === */
@media (max-width: 1024px) {
    .sidebar-list {
        position: relative; /* Отключаем sticky на маленьких экранах */
        top: auto;
    }
    .content-wrapper {
        flex-direction: column;
    }

    .sidebar-list {
        margin-top: 20px;
    }

    .forecast-link {
        font-size: 0.9em;
        padding: 8px 10px;
    }

    .widget-button, .widget-input {
        font-size: 0.9em;
    }

    footer {
        padding: 20px 0;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 8px; /* Еще меньше отступов */
    }

    .logo-svg {
        width: 150px; /* Дополнительно уменьшаем логотип */
    }

    .forecast-link {
        font-size: 0.85em;
        padding: 6px 8px;
    }

    .widget-button, .widget-input {
        font-size: 0.85em;
    }

    footer {
        padding: 15px 0;
    }
}