html {
    scrollbar-gutter: stable;
}

html.chat-page-root {
    scrollbar-gutter: auto;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html, body {
    height: 100%;
}

main {
    flex: 1;
    width: 100%;
}

body {
    font-family: 'Tahoma', sans-serif;
    background: #010409;
    color: #ffffff;
    line-height: 1.5;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);

    width: 1200px;
    height: 800px;

    background: radial-gradient(
            circle,
            rgba(47, 140, 255, 0.25) 0%,
            rgba(47, 140, 255, 0.15) 30%,
            rgba(47, 140, 255, 0.05) 50%,
            transparent 70%
    );

    filter: blur(120px);
    z-index: -1;
}

body::after {
    content: "";
    position: fixed;
    bottom: -200px;
    right: -200px;

    width: 600px;
    height: 600px;

    background: radial-gradient(
            circle,
            rgba(47, 140, 255, 0.2),
            transparent 70%
    );

    filter: blur(100px);
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    background: none;
    cursor: pointer;
}

.hidden {
    display: none !important;
}

img {
    max-width: 100%;
    display: block;
}

@media (max-width: 768px) {
    body {
        padding-bottom: calc(64px + env(safe-area-inset-bottom));
    }

    body.chat-page.chat-mobile-open {
        padding-bottom: 0;
    }
}

.pwa-update-banner {
    position: fixed;
    right: 18px;
    bottom: calc(18px + env(safe-area-inset-bottom));
    z-index: 3000;
    width: min(420px, calc(100vw - 24px));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(13, 19, 30, 0.98), rgba(9, 14, 22, 0.94)),
        rgba(11, 16, 24, 0.96);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(20px);
}

.pwa-update-banner__content {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 18px 16px;
}

.pwa-update-banner__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pwa-update-banner__eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(47, 140, 255, 0.12);
    color: #8dc4ff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.pwa-update-banner__copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pwa-update-banner__copy strong {
    font-size: 19px;
    font-weight: 700;
    color: #f8fbff;
    line-height: 1.15;
}

.pwa-update-banner__copy span {
    color: #adc0d7;
    font-size: 14px;
}

.pwa-update-banner__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.pwa-update-banner__badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #f4f8fe;
    font-size: 12px;
    font-weight: 700;
}

.pwa-update-banner__date {
    color: #8697ac;
    font-size: 12px;
}

.pwa-update-banner__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pwa-update-banner__buttons {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.pwa-update-banner__link {
    color: #8dc4ff;
    font-size: 13px;
    font-weight: 700;
}

.pwa-update-banner__ghost {
    min-width: 82px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: #d8e3f1;
    font-size: 13px;
    font-weight: 700;
}

.pwa-update-banner__button {
    min-width: 98px;
    padding: 10px 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2f8cff, #5a7cff);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.pwa-update-banner__button:disabled {
    opacity: 0.72;
    cursor: wait;
}

.pwa-update-banner__close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #b3c0d2;
    background: rgba(255, 255, 255, 0.06);
    font-size: 20px;
    line-height: 1;
}

@media (max-width: 768px) {
    .pwa-update-banner {
        right: 12px;
        left: 12px;
        width: auto;
        bottom: calc(74px + env(safe-area-inset-bottom));
    }

    body.chat-page.chat-mobile-open .pwa-update-banner {
        bottom: calc(12px + env(safe-area-inset-bottom));
    }

    .pwa-update-banner__content {
        padding: 16px 16px 14px;
    }

    .pwa-update-banner__actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .pwa-update-banner__buttons {
        width: 100%;
    }

    .pwa-update-banner__button,
    .pwa-update-banner__ghost {
        flex: 1;
    }
}
