:root {
    --text-color: rgba(255, 255, 255, 0.9);
}

::-webkit-scrollbar {
    width: 4px;
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: rgb(73, 73, 73);
    border-radius: 20px;
}


::-webkit-scrollbar-button {
    display: none;
}

/* ==== Header ==== */
header {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 14px 12%;
    display: flex;
    border-bottom: 1px solid rgb(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    z-index: 100;
}

header .open-ul {
    display: none;
}

header .logo-text {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    transition: color .2s ease, transform .2s ease;
}

header .logo-text img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    display: block;
}

header .logo {
    color: var(--text-color);
    font-size: 20px;
    font-weight: 500;
    flex: 1 1 0%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* Header navigation links */
header ul {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    flex-shrink: 0;
}

header li {
    margin: 0;
    position: relative;
    list-style: none;
}

header li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 6px 0;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
    font-size: 15px;
    text-decoration: none;
    letter-spacing: -0.01em;
    transition: color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

header li a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transform: translateX(-50%);
    transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
    opacity: 0;
}

header li a:hover {
    color: #ffffff;
    transform: translateY(-1px);
}

header li a:hover::after {
    width: 100%;
    opacity: 1;
}

header li a:active {
    transform: translateY(0) scale(0.96);
}

header li a.active {
    color: #ffffff;
}

header li a.active::after {
    width: 100%;
    opacity: 1;
    background: #ffffff;
}

/* Header button (Войти в аккаунт) */
header .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    position: relative;
    padding: 9px 24px;
    border-radius: 999px;
    background: rgba(14, 14, 18, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    color: #ffffff;
    font-size: 14.5px;
    font-weight: 500;
    letter-spacing: -0.01em;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 16px rgba(0, 0, 0, 0.35);
    transition: background 0.2s ease,
                border-color 0.2s ease,
                box-shadow 0.2s ease,
                transform 0.2s ease;
}

header .button:hover {
    background: #25252b;
    border-color: rgba(255, 255, 255, 0.24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 6px 20px rgba(0, 0, 0, 0.5);
    transform: translateY(-1px);
}

header .button:active {
    transform: translateY(0) scale(0.97);
    background: #1c1c22;
}

/* Header User Badge (Logged-in Capsule Pill) */
.header-user-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 5px 16px 5px 6px;
    border-radius: 999px;
    background: rgba(22, 22, 26, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 4px 14px rgba(0, 0, 0, 0.35);
    color: #ffffff;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.header-user-badge:hover {
    background: rgba(36, 36, 42, 0.95);
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 6px 18px rgba(0, 0, 0, 0.5);
}

.header-user-badge:active {
    transform: translateY(0) scale(0.97);
}

.header-user-badge .header-user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.18);
    flex-shrink: 0;
}

.header-user-badge .header-user-name {
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.01em;
}

/* ==== Header Language Switcher (Sliding Apple iOS Pill Style) ==== */
.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex: 1 1 0%;
}

.lang-switch-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    background: rgba(22, 22, 26, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 3px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 4px 14px rgba(0, 0, 0, 0.3);
    user-select: none;
    isolation: isolate;
}

/* The physical sliding white pill */
.lang-slider-pill {
    position: absolute;
    top: 3px;
    left: 3px;
    width: calc(50% - 3px);
    height: calc(100% - 6px);
    background: #ffffff;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35), 0 0 14px rgba(255, 255, 255, 0.4);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
    pointer-events: none;
}

.lang-switch-wrap[data-active="ru"] .lang-slider-pill {
    transform: translateX(0);
}

.lang-switch-wrap[data-active="en"] .lang-slider-pill {
    transform: translateX(100%);
}

.lang-btn {
    position: relative;
    z-index: 2;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.6px;
    padding: 5px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.25s ease, transform 0.15s ease;
    outline: none;
}

.lang-btn:hover {
    color: #ffffff;
}

.lang-btn:active {
    transform: scale(0.92);
}

.lang-switch-wrap[data-active="ru"] .lang-btn[data-lang="ru"],
.lang-switch-wrap[data-active="en"] .lang-btn[data-lang="en"] {
    color: #0b1329;
}

/* Smooth micro-fade on main content during translation */
main.unluck-lang-anim {
    animation: unluckLangPulse 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes unluckLangPulse {
    0% {
        opacity: 0.72;
        transform: translateY(2px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==== React Bits GlassSurface Filter Layer ==== */
.glass-surface {
    position: relative;
    backdrop-filter: var(--filter-id, none) blur(18px) saturate(1.8) brightness(1.15);
    -webkit-backdrop-filter: blur(18px) saturate(1.8) brightness(1.15);
}

.glass-surface__filter {
    width: 0;
    height: 0;
    pointer-events: none;
    position: absolute;
    inset: 0;
    opacity: 0;
    z-index: -1;
}

/* Profile Button */
.profile-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: 40px;
    background: rgba(20, 20, 20, 0.63);
    cursor: pointer;
    transition: 0.15s ease-in-out;
    position: relative;
    overflow: hidden;
}

.profile-button::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 40px;
    padding: 1px;
    background: linear-gradient(149deg, #fff -10%, #fff -60%, rgba(255, 255, 255, 0.06) 20%, rgba(255, 255, 255, 0.06) 80%, #fff 130%, #fff 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.profile-button:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(0,0,0,0.28);
}

header .open-ul:hover i {
    transform: scale(1.1);
    transition: transform .15s ease;
}

.profile-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-name {
    color: var(--text-color);
    font-size: 16px;
    font-weight: 400;
}

@media (max-width: 620px) {
    header ul {
        display: none;
        position: static;
        transform: none;
    }

    header.menu-open {
        border-bottom: none;
        background: rgba(0,0,0,0.7);
    }

    header .open-ul {
        display: block;
        background-color: transparent;
        border: none; outline: none;
        cursor: pointer;
    }

    .open-ul i {
        font-size: 26px;
        color: var(--text-color);
    }

    header .button {
        margin-right: 8px;
    }

    header .open-ul {
        margin-left: 0;
    }

    header ul.mobile-open {
        position: absolute;
        top: 100%;
        left: 0;
        transform: none;
        width: 100vw;
        min-width: 100vw;
        z-index: 200;
        display: flex !important;
        flex-direction: column;
        align-items: flex-start;
        background: rgba(0,0,0,0.7);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid rgb(255, 255, 255, 0.06);
        padding: 18px 0;
        gap: 0;
        box-shadow: 0 8px 32px 0 rgba(0,0,0,0.14);
        overflow: hidden;
    }

    header ul.mobile-open li {
        margin: 12px;
        padding: 0 3%;
        width: 100%;
        text-align: left;
    }

    header ul.mobile-open li a {
        font-size: 20px;
    }

    .header-actions {
        display: flex;
        align-items: center;
        gap: 8px;
    }
}

@media screen and (max-width: 990px) {
    header {
        padding: 14px 6%;
    }
}

.skeleton {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1000px;
}

.skeleton::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.05) 20%,
        rgba(255, 255, 255, 0.1) 60%,
        rgba(255, 255, 255, 0)
    );
    animation: shimmer 2s infinite;
    content: '';
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/*
.page-transition {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: rgba(10, 10, 20, 0.35);
    z-index: 9999;
    opacity: 0;
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
    pointer-events: none;
    transition: opacity 1s ease, backdrop-filter .35s ease;
}

.page-transition.show {
    opacity: 1;
    backdrop-filter: blur(104px);
    -webkit-backdrop-filter: blur(104px);
    pointer-events: all;
}

.pt-logo {
    width: 84px;
    height: 84px;
    margin-bottom: 18px;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,.35));
}

.pt-bar {
    width: 184px;
    height: 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.44);
    overflow: hidden;
}

.pt-bar-inner {
    width: 0%;
    height: 100%;
    background: #9747FF;
    border-radius: 999px;
    transition: all 1.25s ease;
}
*/

/* ==== Clean Minimalist Toast Notifications ==== */
.toast-container {
    position: fixed;
    right: 24px;
    bottom: 24px;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    z-index: 100000;
    pointer-events: none;
    max-width: 360px;
    width: calc(100% - 48px);
}

.toast {
    position: relative;
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    background: #101014;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateY(14px) scale(0.96);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.22s ease;
    pointer-events: auto;
    user-select: none;
}

.toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toast.pulse {
    animation: toastPulse 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastPulse {
    0% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-2px) scale(1.03); border-color: rgba(255, 255, 255, 0.28); }
    100% { transform: translateY(0) scale(1); }
}

.toast.hide {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
}

.toast:hover {
    border-color: rgba(255, 255, 255, 0.18);
}

.toast-icon-wrap {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-icon-wrap svg {
    display: block;
    width: 15px;
    height: 15px;
    margin: 0 auto;
}

.toast-body {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.toast-msg {
    font-size: 13.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.35;
    word-break: break-word;
}

.toast-close-btn {
    background: transparent;
    border: none;
    outline: none;
    color: rgba(255, 255, 255, 0.35);
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.18s ease;
    flex-shrink: 0;
}

.toast-close-btn:hover {
    color: #ffffff;
}

@media (max-width: 768px) {
    .toast-container {
        right: 12px;
        bottom: 12px;
        left: 12px;
        width: auto;
    }
}

img {
    -webkit-user-drag: none;
}
