/* Сброс и базовые настройки */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #0b0e12;
    background-image:
        radial-gradient(circle at 15% 25%, rgba(30, 100, 220, 0.18) 0%, transparent 35%),
        radial-gradient(circle at 85% 75%, rgba(180, 210, 255, 0.1) 0%, transparent 40%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #edf2f9;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    padding-top: 100px; /* Отступ для закрепленной шапки */
}

body.telegram-miniapp {
    min-height: var(--tg-viewport-height, 100vh);
    min-height: var(--tg-viewport-height, 100dvh);
    padding-top: max(14px, env(safe-area-inset-top, 0px));
    padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px));
    overscroll-behavior-y: none;
}

body.telegram-miniapp .navbar {
    display: none;
}

body.telegram-miniapp .page {
    padding-bottom: 12px;
}

body.telegram-miniapp .cookie-notice {
    bottom: calc(94px + env(safe-area-inset-bottom, 0px));
}

.telegram-tabbar {
    --telegram-indicator-x: 0%;
    position: fixed;
    z-index: 1200;
    left: 50%;
    bottom: max(8px, env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    width: min(620px, calc(100% - 20px));
    min-height: 72px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    padding: 7px;
    border-radius: 25px;
    background: rgba(18, 22, 30, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.telegram-tabbar:has(.telegram-tabbar-item:nth-of-type(1).is-active) { --telegram-indicator-x: 0%; }
.telegram-tabbar:has(.telegram-tabbar-item:nth-of-type(2).is-active) { --telegram-indicator-x: 100%; }
.telegram-tabbar:has(.telegram-tabbar-item:nth-of-type(3).is-active) { --telegram-indicator-x: 200%; }
.telegram-tabbar:has(.telegram-tabbar-item:nth-of-type(4).is-active) { --telegram-indicator-x: 300%; }

.telegram-tabbar-indicator {
    position: absolute;
    z-index: 0;
    top: 7px;
    bottom: 7px;
    left: 7px;
    width: calc((100% - 14px) / 4);
    border-radius: 19px;
    pointer-events: none;
    background: linear-gradient(145deg, rgba(77, 142, 255, 0.28), rgba(82, 103, 190, 0.12));
    box-shadow: inset 0 0 0 1px rgba(126, 168, 255, 0.14);
    transform: translate3d(var(--telegram-indicator-x), 0, 0);
    transition: transform 420ms cubic-bezier(0.22, 0.78, 0.24, 1),
                border-radius 260ms ease,
                box-shadow 260ms ease;
    will-change: transform;
}

.telegram-tabbar-item {
    position: relative;
    z-index: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 3px 6px;
    border-radius: 19px;
    color: #8996aa;
    text-decoration: none;
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 0.01em;
    transition: color 300ms ease, transform 180ms ease;
    -webkit-tap-highlight-color: transparent;
}

.telegram-tabbar-item svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.telegram-tabbar-item.is-active {
    color: #f4f7ff;
}

.telegram-tabbar-item:active {
    transform: scale(0.95);
}

.telegram-navigation-error {
    position: fixed;
    z-index: 1300;
    left: 50%;
    bottom: calc(94px + env(safe-area-inset-bottom, 0px));
    width: max-content;
    max-width: calc(100% - 32px);
    padding: 11px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: #eef4ff;
    background: rgba(24, 29, 39, 0.96);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.42);
    font-size: 13px;
    text-align: center;
    opacity: 0;
    transform: translate3d(-50%, 10px, 0);
    pointer-events: none;
    transition: opacity 220ms ease, transform 320ms cubic-bezier(0.22, 0.78, 0.24, 1);
}

.telegram-navigation-error.is-visible {
    opacity: 1;
    transform: translate3d(-50%, 0, 0);
}

@media (max-width: 700px) {
    body.telegram-miniapp .page {
        padding-left: max(14px, env(safe-area-inset-left, 0px));
        padding-right: max(14px, env(safe-area-inset-right, 0px));
    }

    body.telegram-miniapp .footer { padding-bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .telegram-tabbar-indicator,
    .telegram-tabbar-item {
        transition: none;
    }
}

/* Фоновые объекты */
.ambient-glow {
    display: none;
}

.glow-1 {
    top: -60px;
    left: 5%;
    width: 400px;
    height: 400px;
    background: rgba(25, 100, 210, 0.18);
}

.glow-2 {
    bottom: 0px;
    right: 0px;
    width: 450px;
    height: 450px;
    background: rgba(120, 160, 255, 0.12);
    filter: blur(100px);
}

.glow-3 {
    top: 40%;
    left: 70%;
    width: 280px;
    height: 280px;
    background: rgba(70, 130, 240, 0.12);
    filter: blur(70px);
}

/* Обёртка контента */
.page {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 3;
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
    padding: 0 40px;
}

/* ---------- ЗАКРЕПЛЕННАЯ ШАПКА ---------- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 32px; /* Уменьшил паддинг для лучшего размещения логотипа */
    background: #12161e;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 50px;
    box-shadow: 0 15px 35px -20px rgba(0, 0, 0, 0.9);
    width: calc(100% - 80px);
    max-width: 1220px;
    margin: 0 auto 40px;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    transition: 0.2s;
}

.navbar:hover {
    background: #161c26;
    border-color: rgba(255, 255, 255, 0.08);
}

/* Стили для логотипа-картинки */
.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 80px; /* Высота логотипа */
    width: auto;  /* Автоматическая ширина для сохранения пропорций */
    max-width: 180px; /* Максимальная ширина для больших логотипов */
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(75, 130, 255, 0.3));
    transition: 0.2s;
}

.logo img:hover {
    filter: drop-shadow(0 4px 12px rgba(75, 130, 255, 0.6));
    transform: scale(1.02);
}

.nav-links {
    display: flex;
    gap: 48px;
    list-style: none;
    margin: 0 20px;
}

.nav-links a {
    position: relative;
    display: inline-block;
    text-decoration: none;
    font-weight: 500;
    font-size: 20px;
    color: #dae2ed;
    padding: 5px 0 8px;
    transition: color 320ms ease, opacity 320ms ease, text-shadow 320ms ease;
    letter-spacing: 0.3px;
    opacity: 0.85;
    text-transform: uppercase;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #4d8eff, #7f8cff);
    box-shadow: 0 0 12px rgba(85, 140, 255, 0.45);
    opacity: 0;
    transform: scaleX(0.65);
    transition: opacity 340ms ease, transform 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-links a:hover {
    opacity: 1;
    color: white;
}

.nav-links a:hover::after {
    opacity: 0.45;
    transform: scaleX(0.82);
}

.nav-links .active a {
    color: white;
    opacity: 1;
    font-weight: 500;
    text-shadow: 0 0 18px rgba(105, 155, 255, 0.3);
}

.nav-links .active a::after {
    opacity: 1;
    transform: scaleX(1);
}

.user-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-action {
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 32px;
    font-weight: 550;
    font-size: 16px;
    transition: all 0.2s ease;
    background: rgba(245, 245, 255, 0.02);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e1ebff;
}

.btn-action.outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-action.gradient-hover {
    background: rgba(35, 90, 200, 0.55);
    border: 1px solid rgba(100, 160, 255, 0.7);
    color: white;
    box-shadow: 0 6px 14px rgba(0, 40, 120, 0.4);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-action.gradient-hover::before {
    content: '';
    position: absolute;
    top: var(--y, 50%);
    left: var(--x, 50%);
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.8), rgba(100, 160, 255, 0.4));
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    z-index: -1;
}

.btn-action.gradient-hover:hover::before {
    width: 300px;
    height: 300px;
}

.btn-action.gradient-hover:hover {
    background: rgba(40, 100, 230, 0.8);
    border-color: #8ab6ff;
    transform: scale(1.02);
}

/* Основной контент */
.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: calc(100vh - 300px);
    padding: 20px 0 40px;
    margin-top: 20px;
    view-transition-name: winnie-main-content;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
}

::view-transition-group(winnie-main-content) {
    animation-duration: 380ms;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

::view-transition-old(winnie-main-content) {
    animation: winnie-content-out 150ms ease-out both;
}

::view-transition-new(winnie-main-content) {
    animation: winnie-content-in 260ms 110ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Article cards expand into the article surface like an iOS app card. */
html.is-article-transition .main-content {
    view-transition-name: none;
}

::view-transition-group(winnie-article-surface) {
    z-index: 20;
    animation-duration: 680ms;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

::view-transition-image-pair(winnie-article-surface),
::view-transition-old(winnie-article-surface),
::view-transition-new(winnie-article-surface) {
    overflow: clip;
    border-radius: 30px;
    mix-blend-mode: normal;
}

::view-transition-old(winnie-article-surface) {
    animation: winnie-article-old 420ms ease-out both;
}

::view-transition-new(winnie-article-surface) {
    animation: winnie-article-new 620ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

::view-transition-group(winnie-article-title),
::view-transition-group(winnie-article-image) {
    z-index: 21;
    animation-duration: 680ms;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

::view-transition-old(winnie-article-title),
::view-transition-new(winnie-article-title),
::view-transition-old(winnie-article-image),
::view-transition-new(winnie-article-image) {
    mix-blend-mode: normal;
}

::view-transition-image-pair(winnie-article-image),
::view-transition-old(winnie-article-image),
::view-transition-new(winnie-article-image) {
    overflow: clip;
    border-radius: 20px;
}

@keyframes winnie-article-old {
    0%, 35% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes winnie-article-new {
    0%, 18% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes winnie-content-out {
    to {
        opacity: 0;
        transform: translateY(-8px);
    }
}

@keyframes winnie-content-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
}

/* Футер */
.footer {
    display: flex;
    justify-content: space-between;
    padding: 30px 20px 40px;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 13px;
    color: #93a5c0;
    background: rgba(8, 10, 14, 0.82);
    backdrop-filter: none;
    border-radius: 40px 40px 0 0;
}

.footer-nav a {
    text-decoration: none;
    color: #a5b7d0;
    transition: 0.2s;
}

.footer-nav {
    display: flex;
    max-width: 720px;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px 24px;
}

.footer-nav a:hover {
    color: white;
}

/* Адаптивность */

/* Определение ключевых кадров для плавного движения */
@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(10vw, 5vh) scale(1.1);
    }
    66% {
        transform: translate(-5vw, 15vh) scale(0.9);
    }
    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* Применяем анимацию к каждому кругу с разной скоростью и задержкой */
.glow-1 {
    top: -60px;
    left: 5%;
    width: 400px;
    height: 400px;
    background: rgba(25, 100, 210, 0.18);
    animation: float 25s ease-in-out infinite; /* Медленно: 25 секунд */
}

.glow-2 {
    bottom: 10%;
    right: 5%;
    width: 450px;
    height: 450px;
    background: rgba(120, 160, 255, 0.12);
    filter: blur(100px);
    animation: float 35s ease-in-out infinite reverse; /* В другую сторону: 35 секунд */
    animation-delay: -5s;
}

.glow-3 {
    top: 40%;
    left: 60%;
    width: 280px;
    height: 280px;
    background: rgba(70, 130, 240, 0.12);
    filter: blur(70px);
    animation: float 30s ease-in-out infinite; /* 30 секунд */
    animation-delay: -2s;
}
/* ==================== АДАПТИВНОСТЬ (МОБИЛЬНАЯ ВЕРСИЯ) ==================== */

@media (max-width: 800px) {
    body {
        /* Увеличили отступ сверху, так как элементы шапки стали крупнее */
        padding-top: 130px;
    }

    .navbar {
        flex-wrap: wrap;
        gap: 12px; /* Небольшой аккуратный зазор между логотипом и кнопкой */
        width: calc(100% - 30px);
        padding: 14px 20px;
        border-radius: 24px;
        align-items: center; /* Идеальное выравнивание по вертикали */
    }

    .logo {
        order: 1;
        flex: 0 0 auto;
    }

    .logo img {
        height: 50px;
        width: auto;
    }

    .user-actions {
        order: 2;
        flex: 0 0 auto;
    }

    .btn-action {
        padding: 10px 20px;
        font-size: 15px;
    }

    /* 2-я строка: Навигация на всю ширину */
    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
        margin: 8px 0 0 0;
        padding-top: 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        gap: 20px;
    }

    .nav-links a {
        font-size: 14px;
        padding: 4px 0;
    }

    /* Футер */
    .footer {
        flex-direction: column;
        gap: 15px;
        align-items: center;
        text-align: center;
    }

    .footer-nav a {
        margin: 0;
    }

    .footer-nav {
        justify-content: center;
        gap: 10px 18px;
    }
}

/* Дополнительная адаптация для очень узких экранов */
@media (max-width: 600px) {
    .nav-links {
        gap: 12px; /* Еще чуть меньше расстояние между ссылками */
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-links a {
        font-size: 13px;
    }

    .page {
        padding: 0 15px;
    }

    .logo img {
        height: 50px;
    }

    .btn-action {
        padding: 7px 12px;
        font-size: 13px;
    }
}
/* ========== КНОПКА "ЕСТЬ ВОПРОС?" ========== */
.help-contact-section {
    display: flex;
    justify-content: center;
    margin: 40px 0 30px;
}

.help-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.9), rgba(109, 40, 217, 0.9));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 60px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.2);
}

.help-contact-btn:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, rgba(139, 92, 246, 1), rgba(109, 40, 217, 1));
    box-shadow: 0 12px 28px rgba(139, 92, 246, 0.3);
}

.help-contact-btn svg {
    width: 20px;
    height: 20px;
}

/* ========== МОДАЛЬНЫЕ ОКНА ========== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-backdrop.hidden {
    display: none !important;
}

.modal-content {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    width: 100%;
    max-width: 480px;
    padding: 32px;
    box-shadow: 0 30px 50px rgba(0, 0, 0, 0.5);
    animation: modalPopIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPopIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-head h3 {
    color: #fff;
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 8px;
    transition: 0.2s;
    border-radius: 10px;
}

.modal-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

/* Contact Modal */
.contact-desc {
    color: #94a3b8;
    font-size: 14px;
    text-align: center;
    margin-bottom: 24px;
}

.contact-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.25s ease;
}

.contact-card:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateX(5px);
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 14px;
}

.email-icon {
    color: #60a5fa;
}

.telegram-icon {
    color: #3b82f6;
}

.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.contact-address {
    font-size: 16px;
    color: #94a3b8;
}

.contact-arrow {
    color: #475569;
    transition: transform 0.2s ease;
}

.contact-card:hover .contact-arrow {
    transform: translateX(3px);
    color: #a78bfa;
}

.contact-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    color: #64748b;
    font-size: 12px;
    text-align: center;
}

.contact-note svg {
    flex-shrink: 0;
    color: #60a5fa;
}

/* Адаптивность */
@media (max-width: 768px) {
    .help-contact-section {
        margin: 30px 0 20px;
    }

    .help-contact-btn {
        padding: 12px 24px;
        font-size: 14px;
    }

    .help-contact-btn svg {
        width: 18px;
        height: 18px;
    }

    .modal-content {
        margin: 20px;
        padding: 24px;
    }

    .modal-head h3 {
        font-size: 18px;
    }

    .contact-card {
        padding: 12px 16px;
    }

    .contact-icon {
        width: 40px;
        height: 40px;
    }

    .contact-icon svg {
        width: 22px;
        height: 22px;
    }
}
/* Блокировка скролла, пока идет прогрузка */
body.preloader-active {
    overflow: hidden;
}

/* Главный экран прелоадера */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #0b0e12;
    background-image:
        radial-gradient(circle at 15% 25%, rgba(30, 100, 220, 0.18) 0%, transparent 35%),
        radial-gradient(circle at 85% 75%, rgba(180, 210, 255, 0.1) 0%, transparent 40%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: transform 0.7s cubic-bezier(0.85, 0, 0.15, 1);
}

/* Моментальное скрытие прелоадера, если анимация не нужна */
#preloader.no-animation {
    display: none !important;
}

/* Класс запуска анимации уезда вверх */
#preloader.loaded {
    transform: translateY(-100%);
}

/* Контейнер для центрирования кадров логотипа (УБРАЛИ display: flex) */
.logo-container {
    position: relative;
    width: 180px;
    height: 100px;
}

/* Стили для кадров: строго абсолютное позиционирование в центре */
.preloader-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 0;
    filter: drop-shadow(0 4px 15px rgba(75, 130, 255, 0.5));
    transition: none;
}

/* Активный кадр плавно проявляется */
.preloader-frame.active {
    opacity: 1;
}

/* Контент страницы */
.page-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    /* The preloader already covers the page. Keeping the document rendered
       underneath prevents lower sections from fading in during a fast scroll. */
    opacity: 1;
}

.page-wrapper.page-visible {
    opacity: 1;
}

.page-wrapper.page-fade-out {
    opacity: 0;
}.article-preview,
.article-preview:visited,
.article-preview h1,
.article-preview h2,
.article-preview h3,
.article-preview * {
    color: inherit;
    text-decoration: none;
}

/* Backdrop blur forces Chrome/WebView to repaint text while scrolling. On
   slower GPUs this causes visible flashing and temporary color changes. */
.main-content *,
.btn-action,
.help-contact-btn,
.cookie-notice,
.modal-backdrop {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

/* Уведомление о cookie */
.cookie-notice {
    position: fixed;
    left: 50%;
    bottom: 18px;
    z-index: 1800;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    width: min(760px, calc(100% - 32px));
    align-items: center;
    gap: 14px;
    padding: 14px 15px;
    border: 1px solid rgba(115, 162, 230, 0.24);
    border-radius: 16px;
    color: #dce8f9;
    background: rgba(9, 15, 26, 0.94);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.55), 0 0 35px rgba(39, 95, 190, 0.12);
    backdrop-filter: blur(18px) saturate(150%);
    opacity: 0;
    transform: translate(-50%, 18px);
    transition: opacity 220ms ease, transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cookie-notice[hidden] {
    display: none;
}

.cookie-notice.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.cookie-notice-icon {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid rgba(104, 157, 240, 0.23);
    border-radius: 10px;
    color: #66a4ff;
    background: rgba(54, 111, 207, 0.13);
    font-size: 11px;
    box-shadow: inset 0 0 14px rgba(57, 120, 225, 0.08);
}

.cookie-notice-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.cookie-notice-copy strong {
    color: #f4f7fc;
    font-size: 14px;
    font-weight: 650;
}

.cookie-notice-copy span {
    color: #8fa2bd;
    font-size: 12px;
    line-height: 1.4;
}

.cookie-notice-accept {
    padding: 9px 16px;
    border: 1px solid rgba(104, 158, 245, 0.42);
    border-radius: 9px;
    color: #fff;
    background: linear-gradient(135deg, #285bb8, #6841c7);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    transition: filter 140ms ease, transform 140ms ease;
}

.cookie-notice-accept:hover,
.cookie-notice-accept:focus-visible {
    filter: brightness(1.13);
    transform: translateY(-1px);
}

@media (max-width: 620px) {
    .cookie-notice {
        bottom: 10px;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 10px 12px;
        padding: 12px;
        border-radius: 13px;
    }

    .cookie-notice-accept {
        grid-column: 1 / -1;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-notice {
        transition: none;
    }
}
