:root {
    --bg-color: #0d0b14; /* Глубокий темный фиолетово-синий */
    --accent-primary: linear-gradient(135deg, #ff4081, #d500f9); /* Градиент фуксия-пурпур */
    --accent-glow: rgba(213, 0, 249, 0.4);
    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.6);
    
    /* Настройки Glassmorphism (обычный режим - для темных/пользовательских обоев) */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: 16px;
    
    /* Темный режим для светлых обоев */
    --glass-bg-dark: rgba(0, 0, 0, 0.25);
    --glass-border-dark: rgba(0, 0, 0, 0.15);
    
    --modal-bg: #161324;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    padding-bottom: 90px;
    min-height: 100vh;
    position: relative;
}

/* Фоновые сферы */
.bg-spheres {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    /* Оптимизация для мобилок */
    transform: translateZ(0);
}

.sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px); /* Уменьшаем блюр для производительности */
    opacity: 0.4; /* Немного меньше прозрачность для легкости */
    will-change: transform; /* Сообщаем браузеру об анимации */
    animation: float 25s infinite alternate ease-in-out;
    backface-visibility: hidden;
}

.sphere.pink {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, #ff4081, transparent 70%); /* Градиент вместо сплошного цвета */
    top: 15%;
    left: -30px;
}

.sphere.purple {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #d500f9, transparent 70%);
    bottom: 15%;
    right: -50px;
    animation-delay: -5s;
}

.sphere.blue {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, #4facfe, transparent 70%);
    top: 45%;
    right: 10%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(20px, 30px, 0); }
}

body.theme-pixel_space {
    background-image: var(--pixel_space-bg, url('/bg/pixel_space.jpg'));
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    --tag-bg: rgba(255, 255, 255, 0.1);
    --tag-color: #fff;
    --tag-border: rgba(255, 255, 255, 0.2);
}

body.theme-azure_twilight {
    background-image: var(--azure_twilight-bg, url('/bg/azure_twilight.jpg'));
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    --tag-bg: rgba(0, 0, 0, 0.2);
    --tag-color: #fff;
    --tag-border: rgba(0, 0, 0, 0.3);
}

body.theme-snowy_night {
    background-image: var(--snowy_night-bg, url('/bg/snowy_night.jpg'));
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    --tag-bg: rgba(0, 0, 0, 0.25);
    --tag-color: #eee;
    --tag-border: rgba(0, 0, 0, 0.35);
}

body.theme-vampire {
    background-image: var(--vampire-bg, url('/bg/vampire.jpg'));
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    --tag-bg: rgba(0, 0, 0, 0.3);
    --tag-color: #ffcccc;
    --tag-border: rgba(255, 0, 0, 0.4);
}

.glass {
    background: var(--glass-bg);
    /* ОПТИМИЗАЦИЯ: используем blur только если он поддерживается и не перегружаем */
    backdrop-filter: blur(12px); /* Снижаем до 12px для скорости */
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    /* box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3); -- Убираем тяжелые тени у всех элементов */
    border-radius: 20px;
    /* Форсируем использование GPU */
    transform: translateZ(0); 
    backface-visibility: hidden;
    /* УБРАНО will-change: transform, так как это может создавать новые stacking contexts */
}

/* Добавляем тень только там, где она реально нужна (например, у карточек) */
.card.glass {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Скелетон для картинок читов */
.card-img-wrapper.loading::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-load 1.5s infinite;
    z-index: 1;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0; /* Прячем пока не загрузится */
    transition: opacity 0.3s ease;
}

.card-img.loaded {
    opacity: 0.9;
}

@keyframes skeleton-load {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.raindrop, .snowflake {
    will-change: transform, opacity;
}


.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    font-size: 22px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo .icon {
    background: var(--accent-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
}

.menu-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
}

.view {
    display: none;
    padding: 0 15px;
}
.view.active {
    display: block;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Строка поиска и фильтр */
.search-wrapper {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.user-icon, .filter-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    border-radius: 16px;
    cursor: pointer;
    transition: 0.3s;
}

.search-bar {
    display: flex;
    align-items: center;
    padding: 0 18px;
    flex-grow: 1;
    border-radius: 16px;
}

.search-bar input {
    background: none;
    border: none;
    color: white;
    width: 100%;
    margin-left: 12px;
    outline: none;
    font-size: 15px;
}

.search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Категории */
.categories {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 20px;
    scrollbar-width: none;
}
.categories::-webkit-scrollbar { display: none; }

.cat-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 50px;
    color: #fff;
    white-space: nowrap;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: 0.3s;
}

.cat-btn.active {
    background: var(--accent-primary);
    box-shadow: 0 4px 15px var(--accent-glow);
    color: white;
}

/* Карточки */
.card {
    margin-bottom: 25px;
    overflow: hidden;
    border-radius: 24px;
}

.card-img-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}

.card-info {
    padding: 20px;
}

.card-info h2 {
    color: #fff;
    font-size: 22px;
    margin-bottom: 6px;
    font-weight: 700;
}

.desc {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tag {
    font-size: 12px;
    background: var(--tag-bg);
    color: var(--tag-color);
    padding: 6px 12px;
    border-radius: 10px;
    border: 1px solid var(--tag-border);
}

/* Выпадающее меню внутри карточки */
.card-expand-toggle {
    color: #ff4081;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    transition: 0.2s;
}

.card-actions {
    display: none;
    gap: 12px;
    margin-bottom: 20px;
}

.outline-btn {
    flex: 1;
    padding: 12px 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.outline-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.download-btn {
    width: 100%;
    padding: 16px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 16px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px var(--accent-glow);
    transition: 0.3s;
}

.download-btn:active {
    transform: scale(0.98);
}

.subscribe-btn {
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    font-size: 14px;
    cursor: pointer;
    transition: 0.3s;
    backdrop-filter: blur(8px);
}

@media (min-width: 600px) {
    #app {
        max-width: 1200px; /* Ограничиваем максимальную ширину основного контейнера */
        margin: 0 auto;    /* Выравниваем по центру */
        padding: 0 20px; /* Добавляем горизонтальные отступы для десктопа */
    }

    .header {
        padding: 20px;
    }

    .search-wrapper {
        width: 100%;
        max-width: 100%;
    }

    .categories {
        width: 100%;
        max-width: 100%;
        justify-content: flex-start;
    }

    .cards-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 2 колонки */
        gap: 25px; /* Отступы между карточками */
        padding: 0;
    }

    .card {
        margin-bottom: 0; /* Убираем margin-bottom, так как gap управляет отступами */
    }

    .bottom-nav {
        max-width: 500px; /* Ограничиваем ширину нижнего меню */
        left: 50%;
        transform: translateX(-50%);
        padding: 15px 20px;
    }

    body {
        padding-bottom: 120px; /* Увеличиваем нижний отступ, если меню шире */
    }
}


.subscribe-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.subscribe-btn:active {
    transform: scale(0.98);
}

/* Профиль */
.page-title {
    margin: 10px 0 20px;
    font-size: 22px;
}

.profile-card, .stats-card, .theme-card {
    padding: 20px;
    margin-bottom: 15px;
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar {
    width: 64px;
    height: 64px;
    background: var(--accent-primary);
    border: none;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 26px;
    color: #fff;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.user-details h3 { font-size: 18px; margin-bottom: 4px; }
.user-details p { color: var(--text-muted); font-size: 14px; }

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 15px;
}
.stat-row:last-child { margin-bottom: 0; }
.online-text { color: #4cd964; }

.theme-card h3 { margin-bottom: 20px; color: var(--accent-orange); font-size: 16px;}
.theme-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    cursor: pointer;
    font-size: 15px;
}
.theme-option input { display: none; }
.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-muted);
    border-radius: 50%;
    position: relative;
}
.theme-option input:checked + .radio-custom {
    background: var(--accent-primary);
    border-color: transparent;
}

.theme-option input:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 8px; height: 8px;
    background: #fff;
    border-radius: 50%;
}

/* Нижняя навигация */
.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    padding: 6px;
    border-radius: 20px;
    width: calc(100% - 60px);
    max-width: 340px;
    z-index: 1000;
}

.nav-indicator {
    position: absolute;
    top: 6px;
    bottom: 6px;
    background: var(--accent-primary);
    border-radius: 14px;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.nav-btn {
    flex: 1;
    position: relative;
    z-index: 1;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    padding: 10px 0;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2px;
}

.nav-btn svg { width: 18px; height: 18px; }
.nav-btn span { font-size: 10px; }

.nav-btn.active {
    color: #fff;
}

/* Модальные окна (Всплывающие) */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-box {
    background: var(--modal-bg);
    width: 90%;
    max-width: 380px;
    border-radius: 24px;
    padding: 24px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.modal-overlay.active .modal-box {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Оверлей загрузки */
.loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(13, 11, 20, 0.8);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.loading-overlay.active {
    display: flex;
}

.loader {
    text-align: center;
}

.loader-gif {
    width: 100px;
    height: 100px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px #ff4081);
}

.loader p {
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.modal-header h3 {
    background: var(--accent-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 20px;
    font-weight: 700;
}

.modal-close-icon {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.modal-body {
    color: #d1d1d1;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 24px;
    max-height: 50vh;
    overflow-y: auto;
}

.modal-body ul {
    list-style: none;
    margin-bottom: 12px;
    padding-left: 0;
}

.modal-body ul li {
    position: relative;
    padding-left: 15px;
}

.modal-body ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #d1d1d1;
}

.modal-body p {
    margin-bottom: 6px;
    color: #ffffff;
}

.modal-close-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 14px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}

/* Темы для фона и визуального оформления */
body.theme-rain {
    background-image: var(--rain-bg, linear-gradient(to bottom, #0e0a1a, #080808));
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* Для темы "Дождь" с светлыми обоями - применяем темный glass-стиль */
body.theme-rain.light-bg .glass,
body.theme-rain.light-bg.glass {
    background: var(--glass-bg-dark);
    border-color: var(--glass-border-dark);
}

/* Темы снега и солнца */
body.theme-snow {
    background-image: var(--snow-bg, linear-gradient(to bottom, #1a1525, #080808));
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}
body.theme-sun {
    background-image: var(--sun-bg, linear-gradient(to bottom, #1a0a2e, #080808));
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* Для темы "Снег" с светлыми обоями - применяем темный glass-стиль (усиленный blur) */
body.theme-snow.light-bg .glass,
body.theme-snow.light-bg.glass {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(0, 0, 0, 0.2);
}

/* Для темы "Солнечные блики" с светлыми обоями - применяем темный glass-стиль (максимальный blur) */
body.theme-sun.light-bg .glass,
body.theme-sun.light-bg.glass {
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(0, 0, 0, 0.25);
}

/* Тема пользовательского фона - обычный стиль */
body.theme-custom {
    background-image: var(--custom-bg);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

body.admin-mode .admin-actions {
    display: flex !important;
    animation: fadeIn 0.3s ease;
}

body.admin-mode .avatar {
    border-color: #ff3b30;
    box-shadow: 0 0 15px rgba(255, 59, 48, 0.4);
}
/* --- НОВЫЙ ДИЗАЙН ПРОФИЛЯ --- */
.profile-block {
    padding: 18px;
    margin-bottom: 15px;
    border-radius: 24px; /* <--- ДОБАВЛЯЕМ ЭТУ СТРОКУ */
    border: 0.5px solid var(--glass-border); /* Делаем обводку экстремально тонкой */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4); /* Добавим легкую тень для глубины */
}

.block-title {
    color: var(--accent-orange);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0;
    margin: 0;
}

.user-details h3 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 4px;
}

.muted-text {
    color: var(--text-muted);
    font-size: 14px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.border-bottom {
    border-bottom: 1px solid var(--glass-border);
}

.stat-label {
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-value {
    color: var(--text-main);
    font-weight: bold;
}

.online-text {
    color: #32d74b; /* Ярко-зеленый как на фото */
    font-weight: 500;
}

.theme-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    cursor: pointer;
    font-size: 16px;
    margin: 0;
}

.theme-label-inner {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-icon {
    font-size: 18px;
}

.divider {
    height: 1px;
    background: var(--glass-border);
    margin: 0;
}

#app {
    position: relative;
    z-index: 2;
}

/* --- АНИМАЦИЯ ЧАСТИЦ (СНЕГ, ДОЖДЬ, ПИКСЕЛИ) --- */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none; /* Чтобы не мешали кликать */
    z-index: 1; /* Выводим над фоновыми обоями */
    overflow: hidden;
}

.snowflake {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    animation: snowFall linear infinite;
    top: -10px;
    will-change: transform; /* Оптимизация */
}

.raindrop {
    position: absolute;
    width: 1px;
    height: 25px; 
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.5));
    animation: rainFall linear infinite;
    top: -30px;
    will-change: transform; /* Оптимизация */
}

.space-star {
    position: absolute;
    display: block;
    pointer-events: none;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 8px #ffffff, 0 0 16px rgba(255, 64, 129, 0.9);
    -webkit-animation: starTwinkle 3s ease-in-out infinite alternate, starFloat 8s ease-in-out infinite alternate;
    animation: starTwinkle 3s ease-in-out infinite alternate, starFloat 8s ease-in-out infinite alternate;
    will-change: transform, opacity;
}

.space-star.cross {
    border-radius: 0;
    clip-path: polygon(50% 0%, 65% 35%, 100% 50%, 65% 65%, 50% 100%, 35% 65%, 0% 50%, 35% 35%);
    background: #ffffff;
    box-shadow: 0 0 12px #ffffff, 0 0 24px rgba(213, 0, 249, 0.95);
}

.space-star.large { width: 14px; height: 14px; }
.space-star.medium { width: 8px; height: 8px; }
.space-star.small { width: 4px; height: 4px; }

@-webkit-keyframes starTwinkle {
    0% { opacity: 0.1; -webkit-transform: scale(0.3); }
    50% { opacity: 1; -webkit-transform: scale(1.35); }
    100% { opacity: 0.2; -webkit-transform: scale(0.5); }
}

@keyframes starTwinkle {
    0% { opacity: 0.1; transform: scale(0.3); }
    50% { opacity: 1; transform: scale(1.35); }
    100% { opacity: 0.2; transform: scale(0.5); }
}

@-webkit-keyframes starFloat {
    0% { -webkit-transform: translate3d(0, 0, 0) rotate(0deg); }
    100% { -webkit-transform: translate3d(15px, -20px, 0) rotate(45deg); }
}

@keyframes starFloat {
    0% { transform: translate3d(0, 0, 0) rotate(0deg); }
    100% { transform: translate3d(15px, -20px, 0) rotate(45deg); }
}

/* Солнечные блики (градиент) - Оптимизировано */
body.theme-sun #particles::before {
    content: "";
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 200, 0, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 15%, rgba(255, 140, 0, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(255, 180, 0, 0.03) 0%, transparent 40%);
    pointer-events: none;
    z-index: -1;
    animation: sunFlicker 10s infinite ease-in-out;
    will-change: opacity;
}

@keyframes sunFlicker {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.5; }
}
.modal-body p {
    white-space: pre-wrap; /* Заставляет HTML уважать переносы строк из бота */
    word-break: break-word;
    line-height: 1.5;
}
/* --- 3. СКЕЛЕТОН ЗАГРУЗКИ --- */
.skeleton-card {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}
.skeleton-img {
    height: 180px;
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-load 1.5s infinite;
    margin-bottom: 15px;
}
.skeleton-line {
    height: 16px;
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-load 1.5s infinite;
    margin-bottom: 10px;
}
.skeleton-line.short { width: 60%; }

@keyframes skeleton-load {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

#news-list .profile-block {
    border-radius: 16px;
    transition: transform 0.2s;
}
#news-list img {
    border-bottom: 1px solid var(--glass-border);
}