:root {
    color-scheme: dark;
    --background: #08090d;
    --surface: rgba(17, 19, 26, 0.88);
    --border: rgba(255, 255, 255, 0.09);
    --text: #f5f3ee;
    --muted: #9698a3;
    --gold: #c3a162;
    --gold-light: #e4ca91;
}

* { box-sizing: border-box; }

html {
    background: var(--background);
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding-right: env(safe-area-inset-right, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    color: var(--text);
    background: var(--background);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

.background {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.background__glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(110px);
}

.background__glow--gold {
    width: 560px;
    height: 560px;
    top: -310px;
    left: -180px;
    background: rgba(195, 161, 98, 0.18);
}

.background__glow--blue {
    width: 620px;
    height: 620px;
    right: -280px;
    bottom: -350px;
    background: rgba(35, 130, 190, 0.14);
}

.background__grid {
    position: absolute;
    inset: 0;
    opacity: 0.22;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(circle at center, black, transparent 78%);
}

.topbar {
    position: relative;
    z-index: 2;
    width: min(1120px, calc(100% - 48px));
    margin: 0 auto;
    padding: 26px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: fade-in 0.7s ease both;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand__text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.brand__text strong {
    font-size: 13px;
    letter-spacing: 1.7px;
}

.brand__text small {
    color: var(--gold);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 2.4px;
}

.official-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: #a7a9b2;
    background: rgba(255, 255, 255, 0.025);
    font-size: 12px;
}

.official-badge i { color: var(--gold); }

.page {
    position: relative;
    z-index: 1;
    flex: 1;
    width: min(820px, calc(100% - 40px));
    margin: 0 auto;
    padding: 38px 0 34px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.navigation {
    width: 100%;
    animation: rise-in 0.5s 0.08s ease both;
}

.setup-notice {
    max-width: 680px;
    margin: 0 auto 20px;
    color: #dedbd3;
    font-size: 16px;
    line-height: 1.55;
    text-align: center;
    overflow-wrap: break-word;
}

.setup-notice strong {
    color: var(--gold-light);
    white-space: nowrap;
}

.bot-arrows {
    min-height: 38px;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    color: var(--gold-light);
    font-size: 30px;
}

.bot-arrows i {
    opacity: 0.25;
    filter: drop-shadow(0 3px 8px rgba(195, 161, 98, 0.4));
    animation: arrow-blink 1.1s ease-in-out infinite;
}

.bot-arrows i:nth-child(2) { animation-delay: 0.18s; }
.bot-arrows i:nth-child(3) { animation-delay: 0.36s; }

.bot-link {
    position: relative;
    min-height: 104px;
    padding: 21px 23px;
    display: flex;
    align-items: center;
    gap: 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 239, 201, 0.35);
    border-radius: 20px;
    color: #18130a;
    background: linear-gradient(120deg, #e0c78e, #c3a162 50%, #a98548);
    box-shadow: 0 15px 45px rgba(117, 85, 34, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.45);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.bot-link::before {
    content: "";
    position: absolute;
    width: 240px;
    height: 240px;
    top: -180px;
    right: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    filter: blur(30px);
}

.bot-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 55px rgba(147, 109, 48, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.bot-link__icon {
    position: relative;
    flex: 0 0 auto;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(24, 19, 10, 0.08);
    border-radius: 17px;
    background: rgba(24, 19, 10, 0.1);
    font-size: 24px;
}

.bot-link__content {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bot-link__content small {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.7px;
    opacity: 0.64;
    text-transform: uppercase;
}

.bot-link__content strong {
    font-size: clamp(16px, 3vw, 22px);
    letter-spacing: 0.4px;
    line-height: 1.2;
}

.bot-link__action {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 750;
}

.bot-link__action i {
    font-size: 18px;
    transition: transform 0.25s ease;
}

.bot-link:hover .bot-link__action i { transform: translateX(4px); }

.link-grid {
    margin-top: 15px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.nav-card {
    --accent: #c3a162;
    --accent-bg: rgba(195, 161, 98, 0.12);
    min-height: 154px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
    backdrop-filter: blur(16px);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.nav-card--work {
    --accent: #b7a1e5;
    --accent-bg: rgba(151, 116, 211, 0.12);
}

.nav-card--support {
    --accent: #78c7ac;
    --accent-bg: rgba(74, 174, 139, 0.12);
}

.nav-card--chat {
    --accent: #79b9e6;
    --accent-bg: rgba(69, 153, 207, 0.12);
}

.nav-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    background: rgba(22, 25, 34, 0.96);
}

.nav-card__top {
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-card__icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: var(--accent);
    background: var(--accent-bg);
    font-size: 16px;
}

.nav-card__arrow {
    color: #626571;
    font-size: 14px;
    transition: color 0.25s ease, transform 0.25s ease;
}

.nav-card:hover .nav-card__arrow {
    color: var(--accent);
    transform: translateX(3px);
}

.nav-card strong {
    color: #dedfe4;
    font-size: 15px;
    font-weight: 650;
    line-height: 1.4;
}

.nav-card small {
    margin-top: 7px;
    color: #747782;
    font-size: 11px;
    line-height: 1.4;
}

.footer {
    position: relative;
    z-index: 1;
    width: min(1120px, calc(100% - 48px));
    margin: 0 auto;
    padding: 18px 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #60626c;
    font-size: 11px;
}

.footer span:last-child {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.footer i {
    color: #7895a9;
    font-size: 14px;
}

.bot-link:focus-visible,
.nav-card:focus-visible,
.brand:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 4px;
}

@keyframes arrow-blink {
    0%, 100% {
        opacity: 0.2;
        transform: translateY(-3px);
    }
    50% {
        opacity: 1;
        transform: translateY(3px);
    }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.topbar,
.footer { max-width: 1120px; }

.page { max-width: 820px; }

.bot-link,
.nav-card {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.bot-link__content,
.nav-card strong,
.nav-card small {
    min-width: 0;
    overflow-wrap: break-word;
}

@media (max-width: 800px) {
    .topbar {
        width: calc(100% - 32px);
        padding: 16px 0;
        animation: none;
    }

    .page {
        width: calc(100% - 32px);
        padding: 18px 0 24px;
        justify-content: flex-start;
    }

    .navigation { animation: none; }
    .background__grid { display: none; }
    .background__glow { filter: blur(70px); }

    .nav-card { backdrop-filter: none; }

    .bot-arrows {
        margin-bottom: 12px;
        gap: 18px;
        font-size: 28px;
    }

    .bot-link {
        min-height: 96px;
        padding: 18px;
        gap: 12px;
    }

    .bot-link__icon {
        width: 48px;
        height: 48px;
        font-size: 21px;
    }

    .bot-link__content small { font-size: 10px; }

    .bot-link__content strong {
        font-size: 17px;
        line-height: 1.3;
    }

    .bot-link__action > span { display: none; }
    .bot-link__action i { font-size: 20px; }

    .link-grid {
        margin-top: 14px;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .nav-card {
        min-height: 78px;
        padding: 16px 18px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 28px;
        align-content: center;
        column-gap: 12px;
    }

    .nav-card__top {
        grid-row: 1 / 3;
        grid-column: 2;
        margin: 0;
        align-self: center;
    }

    .nav-card__icon { display: none; }

    .nav-card__arrow {
        color: #a0a3ad;
        font-size: 20px;
    }

    .nav-card strong,
    .nav-card small { grid-column: 1; }

    .nav-card strong {
        font-size: 16px;
        line-height: 1.35;
    }

    .nav-card small {
        margin-top: 5px;
        font-size: 12px;
    }

    .footer {
        width: calc(100% - 32px);
        padding: 16px 0 calc(18px + env(safe-area-inset-bottom, 0px));
        flex-wrap: wrap;
        gap: 12px;
        font-size: 12px;
    }
}

@media (max-width: 380px) {
    .topbar {
        width: calc(100% - 24px);
        padding-top: 12px;
    }

    .brand__text strong { font-size: 12px; }
    .brand__text small { letter-spacing: 1.7px; }

    .official-badge {
        width: 36px;
        height: 36px;
        padding: 0;
        justify-content: center;
    }

    .official-badge span { display: none; }

    .page {
        width: calc(100% - 24px);
        padding-top: 12px;
    }

    .bot-arrows {
        gap: 14px;
        font-size: 24px;
    }

    .bot-link {
        padding: 16px 14px;
        gap: 10px;
    }

    .bot-link__icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .bot-link__content small { display: none; }

    .bot-link__content strong {
        font-size: 15px;
        letter-spacing: 0;
    }

    .nav-card { padding: 15px 14px; }
    .nav-card strong { font-size: 15px; }

    .footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

@media (max-width: 280px) {
    .official-badge,
    .bot-link__icon { display: none; }
    .brand__text small { display: none; }
}

@media (max-height: 620px) {
    .topbar { padding-top: 12px; padding-bottom: 12px; }

    .page {
        justify-content: flex-start;
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .footer { padding-top: 10px; padding-bottom: 12px; }
}

@media (pointer: coarse) {
    .bot-link:hover,
    .nav-card:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
