/* Основа: шрифты, цвета и размеры, сброс, общие кнопки и метки. */

@font-face {
    font-family: Rubik;
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("fonts/rubik-600-cyrillic.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: Rubik;
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("fonts/rubik-600-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: Rubik;
    font-style: normal;
    font-weight: 700 800;
    font-display: swap;
    src: url("fonts/rubik-800-cyrillic.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: Rubik;
    font-style: normal;
    font-weight: 700 800;
    font-display: swap;
    src: url("fonts/rubik-800-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --bg: #1b0e26;
    --panel: #281837;
    --panel-2: #321f45;
    --surface: rgba(188, 133, 255, 0.12);
    --surface-hover: rgba(188, 133, 255, 0.2);
    --line: rgba(188, 133, 255, 0.12);
    --text: #e6e6e6;
    --muted: #a79fb1;
    --accent: #b633fe;
    --accent-hover: #c35cff;
    --grad: linear-gradient(#993ef7, #b83df7);
    --green: #35ec90;
    --green-hover: #63f2aa;
    --lime: #9ee806;

    --font: Inter, Poppins, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --font-head: Rubik, var(--font);

    --r-s: 10px;
    --r: 12px;
    --r-m: 16px;
    --r-l: 20px;
    --r-xl: 24px;

    --side: 272px;
    --side-mini: 68px;
    --pad: 24px;
    --cols: 7;
    --gap: 16px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font: 400 16px/1.5 var(--font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
body.is-locked { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { padding: 0; border: 0; background: none; cursor: pointer; }
a, button, label, summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
h1, h2, h3, p { margin: 0; }
ul, dl, dd { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.icon { flex: none; width: 16px; height: 16px; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* Кнопки */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 20px;
    border-radius: var(--r);
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    white-space: nowrap;
    transition: background-color .2s, filter .2s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn .icon { width: 20px; height: 20px; }
.btn--s { height: 36px; padding: 0 16px; border-radius: var(--r-s); }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-hover); }
.btn--green { background: var(--green); color: #000; }
.btn--green:hover { background: var(--green-hover); }
.btn--surface { background: var(--surface); }
.btn--surface:hover { background: var(--surface-hover); }
.btn--white { background: #fff; color: #000; }
.btn--white:hover { filter: brightness(.92); }

.icon-btn {
    position: relative;
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: var(--r);
    background: var(--surface);
    transition: background-color .2s;
}
.icon-btn:hover { background: var(--surface-hover); }
.icon-btn .icon { width: 24px; height: 24px; }
.icon-btn--s { width: 36px; height: 36px; border-radius: var(--r-s); }
.icon-btn--s .icon { width: 20px; height: 20px; }

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--surface);
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    white-space: nowrap;
    transition: background-color .2s;
}
.pill:hover { background: var(--surface-hover); }

.chip {
    display: inline-flex;
    align-items: center;
    flex: none;
    gap: 8px;
    height: 40px;
    padding: 8px 16px;
    border-radius: var(--r);
    background: var(--surface);
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    white-space: nowrap;
    transition: background-color .2s;
}
.chip:hover { background: var(--surface-hover); }
.chip.is-active { background: var(--grad); color: var(--text); }
.chip .icon { width: 24px; height: 24px; }
.chip--s { height: 32px; padding: 0 8px 0 12px; border-radius: 999px; }
.chip--s .icon { width: 14px; height: 14px; }

.arrow {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--surface);
    transition: background-color .2s, opacity .2s;
}
.arrow:hover:not(:disabled) { background: var(--surface-hover); }
.arrow:disabled { opacity: .4; }

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--lime);
    color: #000;
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
}
.badge--green { background: var(--green); }

.dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lime);
}

.pulse {
    position: relative;
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
}
.pulse::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: var(--green);
    opacity: .35;
    animation: pulse 1.6s ease-out infinite;
}
@keyframes pulse {
    from { transform: scale(.5); opacity: .5; }
    to { transform: scale(1.4); opacity: 0; }
}

/* Полоска загрузки страницы и появление нового содержимого после перехода без перезагрузки */

.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 300;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--green));
    box-shadow: 0 0 8px rgba(182, 51, 254, .6);
    opacity: 0;
    pointer-events: none;
    transform: scaleX(0);
    transform-origin: 0 50%;
}
.progress-bar.is-active { opacity: 1; animation: progress 6s cubic-bezier(.1, .7, .2, 1) forwards; }
.progress-bar.is-done { opacity: 0; transform: scaleX(1); transition: opacity .3s .1s, transform .15s; }
@keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(.9); } }

.main:focus { outline: 0; }
.main.is-entering { animation: page-in .18s ease-out; }
@keyframes page-in { from { opacity: .5; } }

/* Всплывающая подсказка */

.toast {
    position: fixed;
    left: 50%;
    bottom: 32px;
    z-index: 200;
    max-width: min(480px, calc(100vw - 32px));
    padding: 13px 20px;
    border-radius: 14px;
    background: var(--panel-2);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
    color: #fff;
    font-size: 14px;
    line-height: 20px;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 10px);
    transition: opacity .3s, transform .3s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1023px) {
    .toast { bottom: 112px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
