/* LiboStat — живой визуальный слой (только UI) */

:root {
    --glow-blue: rgba(104, 128, 255, 0.45);
    --glow-mint: rgba(62, 207, 142, 0.35);
    --glow-violet: rgba(160, 120, 255, 0.35);
    --glass-border: rgba(255, 255, 255, 0.14);
    --glass-shine: rgba(255, 255, 255, 0.08);
    --ease-out-expo: cubic-bezier(0.22, 1, 0.36, 1);
}

body {
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background:
        radial-gradient(ellipse 120% 80% at 50% -30%, rgba(88, 120, 255, 0.2), transparent 55%),
        radial-gradient(circle at 100% 50%, rgba(62, 207, 142, 0.08), transparent 40%),
        linear-gradient(180deg, #060912 0%, #0a1022 45%, #070b16 100%);
}

body::before {
    opacity: 0.06;
    animation: grid-drift 40s linear infinite;
}

@keyframes grid-drift {
    from { background-position: 0 0, 0 0; }
    to { background-position: 32px 32px, 32px 32px; }
}

/* ── Фоновые орбы (внутренние страницы) ── */

.site-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.site-bg-parallax {
    position: absolute;
    inset: -5%;
    will-change: transform;
    transition: transform 0.15s ease-out;
}

.site-bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(72px);
    opacity: 0.42;
    animation: orb-drift 18s ease-in-out infinite;
    will-change: transform;
}

.site-bg-orb--blue {
    top: -8%;
    left: -6%;
    width: min(480px, 50vw);
    height: min(480px, 50vw);
    background: rgba(54, 85, 212, 0.55);
}

.site-bg-orb--violet {
    top: 42%;
    right: -8%;
    width: min(420px, 44vw);
    height: min(420px, 44vw);
    background: rgba(140, 110, 255, 0.4);
    animation-delay: -6s;
}

.site-bg-orb--mint {
    bottom: -10%;
    left: 28%;
    width: min(380px, 40vw);
    height: min(380px, 40vw);
    background: rgba(62, 207, 142, 0.32);
    animation-delay: -12s;
}

.site-bg-float {
    position: absolute;
    font-size: clamp(1.1rem, 2vw, 1.6rem);
    opacity: 0.12;
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.15));
    animation: float-icon 12s ease-in-out infinite;
    user-select: none;
}

.site-bg-float--1 { top: 14%; left: 8%; animation-delay: 0s; }
.site-bg-float--2 { top: 22%; right: 12%; animation-delay: -2s; }
.site-bg-float--3 { bottom: 28%; left: 6%; animation-delay: -4s; }
.site-bg-float--4 { top: 55%; right: 18%; animation-delay: -6s; font-size: 1.25rem; }
.site-bg-float--5 { bottom: 12%; right: 32%; animation-delay: -8s; }

@keyframes orb-drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(24px, -18px) scale(1.05); }
    66% { transform: translate(-16px, 12px) scale(0.98); }
}

@keyframes float-icon {
    0%, 100% { transform: translateY(0) rotate(-6deg); opacity: 0.1; }
    50% { transform: translateY(-20px) rotate(8deg); opacity: 0.18; }
}

/* ── Шапка ── */

.site-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.site-header-wrap {
    width: 100%;
}

.site-top {
    width: 100%;
}

.site-header {
    position: relative;
    border-bottom-color: rgba(255, 255, 255, 0.08);
    background: rgba(6, 9, 18, 0.78);
    backdrop-filter: blur(16px) saturate(140%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
}

@media (min-width: 861px) {
    .site-bar {
        width: min(1100px, 100%);
        margin: 0 auto;
        padding: 14px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(6, 9, 18, 0.78);
        backdrop-filter: blur(16px) saturate(140%);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
    }

    .site-top,
    .site-header {
        border-bottom: 0;
        background: transparent;
        backdrop-filter: none;
        box-shadow: none;
    }
}

.site-bar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(104, 128, 255, 0.5) 20%,
        rgba(62, 207, 142, 0.4) 50%,
        rgba(160, 120, 255, 0.45) 80%,
        transparent
    );
    opacity: 0.7;
    animation: header-shine 6s ease-in-out infinite;
}

@media (max-width: 860px) {
    .site-bar::after {
        display: none;
    }

    .site-header::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 1px;
        pointer-events: none;
        background: linear-gradient(
            90deg,
            transparent,
            rgba(104, 128, 255, 0.5) 20%,
            rgba(62, 207, 142, 0.4) 50%,
            rgba(160, 120, 255, 0.45) 80%,
            transparent
        );
        opacity: 0.7;
        animation: header-shine 6s ease-in-out infinite;
    }
}

@keyframes header-shine {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 0.85; }
}

.site-nav-link {
    position: relative;
    overflow: hidden;
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s var(--ease-out-expo);
}

.site-nav-link:hover {
    transform: translateY(-2px);
}

.site-nav-link.is-active {
    box-shadow: 0 0 20px rgba(104, 128, 255, 0.2);
}

.site-brand-icon-wrap {
    animation: brand-glow 3s ease-in-out infinite;
}

@keyframes brand-glow {
    0%, 100% { box-shadow: 0 0 16px rgba(104, 128, 255, 0.2); }
    50% { box-shadow: 0 0 28px rgba(104, 128, 255, 0.45); }
}

.site-brand:hover .site-brand-icon-wrap {
    transform: scale(1.08) rotate(-4deg);
    transition: transform 0.35s var(--ease-out-expo);
}

.site-brand-name {
    background: linear-gradient(135deg, #fff 0%, #c8d4ff 50%, #88a0ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ── Карточки и стекло ── */

.card {
    position: relative;
    overflow: hidden;
    border-color: var(--glass-border);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 40%, rgba(13, 18, 36, 0.92) 100%);
    transition:
        transform 0.4s var(--ease-out-expo),
        box-shadow 0.4s ease,
        border-color 0.35s ease;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.22),
        transparent 40%,
        transparent 60%,
        rgba(104, 128, 255, 0.2)
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.6;
}

.card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 18%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 0%,
        rgba(255, 255, 255, 0.045) 48%,
        transparent 100%
    );
    transform: translateX(-130%) skewX(-10deg);
    pointer-events: none;
    opacity: 0;
    z-index: 0;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 28px 56px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(104, 128, 255, 0.08);
    border-color: rgba(140, 160, 255, 0.28);
}

.card.card-shine-sweep:hover::after {
    opacity: 1;
    animation: card-shine-sweep 0.75s ease forwards;
}

.card.card-shine-glow:hover {
    box-shadow:
        0 26px 52px rgba(0, 0, 0, 0.38),
        0 0 22px rgba(104, 128, 255, 0.14);
}

.card.card-shine-edge:hover {
    border-color: rgba(170, 190, 255, 0.38);
    box-shadow:
        0 24px 48px rgba(0, 0, 0, 0.36),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.card.card-shine-none:hover::after,
.clan-card::after,
.profile-card::after,
.top-clans-card::after,
.stats-card::after {
    display: none;
}

@keyframes card-shine-sweep {
    to {
        transform: translateX(620%) skewX(-10deg);
    }
}

.card.is-inview,
.server-card.is-inview,
.home-changelog-item.is-inview,
.home-feature-card.is-inview {
    animation: none;
}

@keyframes card-pop {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ── Поиск и заголовки ── */

.search-panel h1,
.info-page h1,
.placeholder-page h1 {
    background: linear-gradient(135deg, #ffffff 0%, #dce4ff 45%, #9eb4ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
}

.search-panel {
    position: relative;
}

.search-panel::before {
    content: "";
    position: absolute;
    top: -40px;
    left: 50%;
    width: 200px;
    height: 200px;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(104, 128, 255, 0.15), transparent 70%);
    pointer-events: none;
    animation: pulse-soft 4s ease-in-out infinite;
}

@keyframes pulse-soft {
    0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.15); }
}

.search-form {
    border: 1px solid rgba(104, 128, 255, 0.22);
    border-radius: 16px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 12px 40px rgba(54, 85, 212, 0.12);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-form:focus-within {
    border-color: rgba(140, 160, 255, 0.55);
    box-shadow: 0 16px 48px rgba(54, 85, 212, 0.22);
}

.search-form button {
    background: linear-gradient(135deg, #4a6bff 0%, #6880ff 50%, #8ca0ff 100%);
    box-shadow: 0 8px 24px rgba(74, 107, 255, 0.35);
    transition: transform 0.25s var(--ease-out-expo), box-shadow 0.25s ease;
}

.search-form button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 32px rgba(74, 107, 255, 0.45);
}

.search-form button:active {
    transform: translateY(0) scale(0.98);
}

/* ── Профиль ── */

.profile-card .avatar {
    border-radius: 20px;
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.35),
        0 0 0 2px rgba(104, 128, 255, 0.15);
    transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s ease;
}

.profile-card:hover .avatar {
    transform: scale(1.04) rotate(-2deg);
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.4),
        0 0 32px rgba(104, 128, 255, 0.25);
}

.badge.online {
    animation: online-pulse 2.5s ease-in-out infinite;
}

@keyframes online-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(62, 207, 142, 0.35); }
    50% { box-shadow: 0 0 0 6px rgba(62, 207, 142, 0); }
}

.info-item {
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s var(--ease-out-expo);
}

.info-item:hover {
    background: rgba(104, 128, 255, 0.08);
    border-color: rgba(104, 128, 255, 0.2);
    transform: translateY(-2px);
}

.stat-box,
.highlight-box {
    transition: transform 0.3s var(--ease-out-expo), border-color 0.3s ease, background 0.3s ease;
}

.stat-box:hover,
.highlight-box:hover {
    transform: translateY(-3px);
    border-color: rgba(140, 160, 255, 0.28);
}

/* ── Placeholder / info pages ── */

.placeholder-page,
.info-page {
    position: relative;
    padding: 40px 28px 48px;
    border-radius: 28px;
    border: 1px solid var(--glass-border);
    background:
        radial-gradient(circle at top, rgba(104, 128, 255, 0.1), transparent 55%),
        rgba(13, 18, 36, 0.75);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
}

.placeholder-page::before {
    content: "🎮";
    display: block;
    font-size: 3rem;
    margin-bottom: 16px;
    animation: bounce-soft 2.5s ease-in-out infinite;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
}

@keyframes bounce-soft {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.donate-card {
    overflow: hidden;
}

.donate-progress-fill {
    background: linear-gradient(90deg, #4a6bff, #6880ff, #3ecf8e);
    background-size: 200% 100%;
    animation: progress-flow 3s ease infinite;
}

@keyframes progress-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.donate-btn {
    transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s ease;
}

.donate-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 16px 40px rgba(74, 107, 255, 0.4);
}

/* ── Анимации появления ── */

.anim-fade,
.anim-rise {
    animation: none;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rise-in-theme {
    from {
        opacity: 0;
        transform: translateY(32px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ── Лoader ── */

.page-loader {
    background:
        radial-gradient(circle at center, rgba(104, 128, 255, 0.25), transparent 50%),
        rgba(6, 9, 18, 0.94);
}

.loader-orbit {
    box-shadow: 0 0 40px rgba(104, 128, 255, 0.3);
}

/* ── Footer glow ── */

.site-footer {
    position: relative;
    border-top-color: rgba(255, 255, 255, 0.1);
    background:
        radial-gradient(ellipse 80% 60% at 50% 100%, rgba(104, 128, 255, 0.12), transparent 70%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(8, 12, 24, 0.95));
}

.site-footer-logo-wrap {
    transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s ease;
}

.site-footer-logo-wrap:hover {
    transform: scale(1.05) rotate(3deg);
    box-shadow: 0 16px 40px rgba(104, 128, 255, 0.25);
}

/* ── Reduced motion ── */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .site-bg-orb,
    .site-bg-float {
        animation: none;
    }
}
