/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

/* Page Transition and Loading Styles */
#root {
    position: relative;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease;
}
#root.app-ready {
    opacity: 1;
}

#root.page-transition-out {
    opacity: 0;
}

#root.page-transition-in {
    animation: pageFadeIn 0.4s ease forwards;
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading Overlay */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-bg);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.page-loader.active {
    opacity: 1;
    visibility: visible;
}

.loader-spinner {
    width: 48px;
    height: 48px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: loaderSpin 0.8s linear infinite;
    position: relative;
}

.loader-spinner::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 2px solid rgba(255, 255, 255, 0.05);
    border-top-color: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    animation: loaderSpinReverse 1.2s linear infinite;
}

@keyframes loaderSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes loaderSpinReverse {
    to {
        transform: rotate(-360deg);
    }
}

/* Cloudflare Turnstile Styles */
.cf-turnstile {
    margin: 20px 0;
    width: 100%;
    min-height: 65px;
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: visible !important;
}

.cf-turnstile iframe {
    border-radius: 8px;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
}

:root {
    --primary-bg: #000000;
    --secondary-bg: #010101;
    --accent-bg: #020202;
    --border-color: rgba(255, 255, 255, 0.07);
    --text-primary: rgba(255, 255, 255, 0.96);
    --text-secondary: rgba(255, 255, 255, 0.74);
    --accent-color: rgba(255, 255, 255, 0.95);
    --glow-color: rgba(255, 255, 255, 0.07);
    --card-glow: rgba(255, 255, 255, 0.035);
    --bg-blur: 1px;
    --starfield-pattern:
        radial-gradient(0.8px 0.8px at 15% 15%, rgba(255, 255, 255, 1) 0 0.8px, transparent 0.8px),
        radial-gradient(0.7px 0.7px at 85% 25%, rgba(255, 255, 255, 1) 0 0.7px, transparent 0.7px),
        radial-gradient(0.9px 0.9px at 45% 45%, rgba(255, 255, 255, 1) 0 0.9px, transparent 0.9px),
        radial-gradient(0.7px 0.7px at 25% 75%, rgba(255, 255, 255, 1) 0 0.7px, transparent 0.7px),
        radial-gradient(0.8px 0.8px at 75% 85%, rgba(255, 255, 255, 1) 0 0.8px, transparent 0.8px),
        radial-gradient(1px 1px at 10% 90%, rgba(255, 255, 255, 1) 0 1px, transparent 1px),
        radial-gradient(0.6px 0.6px at 90% 10%, rgba(255, 255, 255, 1) 0 0.6px, transparent 0.6px),
        radial-gradient(0.6px 0.6px at 60% 30%, rgba(255, 255, 255, 1) 0 0.6px, transparent 0.6px),
        radial-gradient(0.8px 0.8px at 30% 60%, rgba(255, 255, 255, 1) 0 0.8px, transparent 0.8px),
        radial-gradient(1.2px 1.2px at 80% 50%, rgba(255, 255, 255, 1) 0 1.2px, transparent 1.2px),
        radial-gradient(1.4px 1.4px at 20% 40%, rgba(255, 255, 255, 1) 0 1.4px, transparent 1.4px),
        radial-gradient(2px 2px at 50% 80%, rgba(255, 255, 255, 1) 0 2px, transparent 2px),
        radial-gradient(0.5px 0.5px at 5% 5%, rgba(255, 255, 255, 1) 0 0.5px, transparent 0.5px),
        radial-gradient(0.6px 0.6px at 95% 5%, rgba(255, 255, 255, 1) 0 0.6px, transparent 0.6px),
        radial-gradient(0.7px 0.7px at 5% 95%, rgba(255, 255, 255, 1) 0 0.7px, transparent 0.7px),
        radial-gradient(0.5px 0.5px at 95% 95%, rgba(255, 255, 255, 1) 0 0.5px, transparent 0.5px),
        radial-gradient(0.8px 0.8px at 40% 20%, rgba(255, 255, 255, 1) 0 0.8px, transparent 0.8px),
        radial-gradient(0.6px 0.6px at 70% 10%, rgba(255, 255, 255, 1) 0 0.6px, transparent 0.6px),
        radial-gradient(0.9px 0.9px at 20% 70%, rgba(255, 255, 255, 1) 0 0.9px, transparent 0.9px),
        radial-gradient(0.7px 0.7px at 80% 30%, rgba(255, 255, 255, 1) 0 0.7px, transparent 0.7px),
        radial-gradient(1px 1px at 55% 55%, rgba(255, 255, 255, 1) 0 1px, transparent 1px),
        radial-gradient(0.5px 0.5px at 35% 85%, rgba(255, 255, 255, 1) 0 0.5px, transparent 0.5px),
        radial-gradient(0.6px 0.6px at 65% 15%, rgba(255, 255, 255, 1) 0 0.6px, transparent 0.6px),
        radial-gradient(0.8px 0.8px at 12% 50%, rgba(255, 255, 255, 1) 0 0.8px, transparent 0.8px),
        radial-gradient(0.7px 0.7px at 88% 50%, rgba(255, 255, 255, 1) 0 0.7px, transparent 0.7px),
        radial-gradient(0.5px 0.5px at 50% 12%, rgba(255, 255, 255, 1) 0 0.5px, transparent 0.5px),
        radial-gradient(0.6px 0.6px at 50% 88%, rgba(255, 255, 255, 1) 0 0.6px, transparent 0.6px),
        radial-gradient(1.1px 1.1px at 33% 33%, rgba(255, 255, 255, 1) 0 1.1px, transparent 1.1px),
        radial-gradient(1.1px 1.1px at 67% 67%, rgba(255, 255, 255, 1) 0 1.1px, transparent 1.1px),
        radial-gradient(0.4px 0.4px at 8% 42%, rgba(255, 255, 255, 1) 0 0.4px, transparent 0.4px),
        radial-gradient(0.4px 0.4px at 92% 42%, rgba(255, 255, 255, 1) 0 0.4px, transparent 0.4px),
        radial-gradient(0.5px 0.5px at 8% 58%, rgba(255, 255, 255, 1) 0 0.5px, transparent 0.5px),
        radial-gradient(0.5px 0.5px at 92% 58%, rgba(255, 255, 255, 1) 0 0.5px, transparent 0.5px),
        radial-gradient(0.6px 0.6px at 42% 8%, rgba(255, 255, 255, 1) 0 0.6px, transparent 0.6px),
        radial-gradient(0.6px 0.6px at 42% 92%, rgba(255, 255, 255, 1) 0 0.6px, transparent 0.6px),
        radial-gradient(0.7px 0.7px at 58% 8%, rgba(255, 255, 255, 1) 0 0.7px, transparent 0.7px),
        radial-gradient(0.7px 0.7px at 58% 92%, rgba(255, 255, 255, 1) 0 0.7px, transparent 0.7px);
    --starfield-size:
        450px 450px,
        550px 550px,
        650px 650px,
        480px 480px,
        520px 520px,
        600px 600px,
        400px 400px,
        580px 580px,
        700px 700px,
        750px 750px,
        800px 800px,
        900px 900px,
        350px 350px,
        380px 380px,
        420px 420px,
        300px 300px,
        500px 500px,
        450px 450px,
        550px 550px,
        480px 480px,
        620px 620px,
        400px 400px,
        520px 520px,
        560px 560px,
        440px 440px,
        480px 480px,
        460px 460px,
        500px 500px,
        580px 580px,
        580px 580px,
        320px 320px,
        340px 340px,
        360px 360px,
        380px 380px,
        400px 400px,
        420px 420px,
        440px 440px,
        460px 460px,
        480px 480px;
    --starfield-position:
        0 0,
        15% 25%,
        35% 10%,
        65% 45%,
        85% 75%,
        25% 85%,
        10% 65%,
        90% 35%,
        45% 90%,
        75% 15%,
        5% 40%,
        55% 5%,
        2% 2%,
        98% 2%,
        2% 98%,
        98% 98%,
        40% 20%,
        70% 10%,
        20% 70%,
        80% 30%,
        55% 55%,
        35% 85%,
        65% 15%,
        12% 50%,
        88% 50%,
        50% 12%,
        50% 88%,
        33% 33%,
        67% 67%,
        8% 42%,
        92% 42%,
        8% 58%,
        92% 58%,
        42% 8%,
        42% 92%,
        58% 8%,
        58% 92%;
}

/* Ensure all pages have consistent background effects */
body.login-page,
body.register-page,
body.profile-page,
body {
    background: var(--primary-bg);
    color: var(--text-primary);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    min-height: 100vh;
    position: relative;
    isolation: isolate;
}

 #root {
     position: relative;
     z-index: 5;
 }

body::after,
.light-rays-container,
.noise-overlay {
    display: block !important;
    visibility: visible !important;
    opacity: inherit;
}

/* Цветной слой звёзд/туманностей полностью отключён */
body::before {
    display: none !important;
}

/* Light Rays Background Animation */
.light-rays-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
    opacity: 0;
    mix-blend-mode: screen;
    will-change: transform, opacity;
}

.light-rays-container::before {
    content: '';
    position: absolute;
    top: -80%;
    left: -80%;
    width: 260%;
    height: 260%;
    background: 
        radial-gradient(ellipse at 6% 50%, rgba(255, 255, 255, 0.22) 0%, transparent 62%),
        radial-gradient(ellipse at 94% 50%, rgba(255, 255, 255, 0.2) 0%, transparent 64%),
        linear-gradient(90deg, rgba(255, 255, 255, 0.10) 0%, transparent 26%, transparent 74%, rgba(255, 255, 255, 0.09) 100%),
        radial-gradient(ellipse at 20% 30%, rgba(255, 255, 255, 0.01) 0%, transparent 52%),
        radial-gradient(ellipse at 80% 70%, rgba(255, 255, 255, 0.007) 0%, transparent 55%),
        radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.005) 0%, transparent 62%),
        linear-gradient(45deg, rgba(255, 255, 255, 0.003) 0%, transparent 72%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.002) 0%, transparent 72%),
        linear-gradient(225deg, rgba(255, 255, 255, 0.002) 0%, transparent 72%);
    animation: lightRaysMove 20s ease-in-out infinite;
    filter: blur(clamp(14px, 3.2vw, 44px));
    opacity: 1;
    -webkit-mask-image: radial-gradient(ellipse at 50% 50%, transparent 0%, rgba(0,0,0,0.92) 42%, rgba(0,0,0,1) 100%);
    mask-image: radial-gradient(ellipse at 50% 50%, transparent 0%, rgba(0,0,0,0.92) 42%, rgba(0,0,0,1) 100%);
}

.light-rays-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        conic-gradient(from 0deg at 0% 50%,
            transparent 0deg,
            rgba(255, 255, 255, 0.15) 6deg,
            transparent 14deg,
            rgba(255, 255, 255, 0.12) 22deg,
            transparent 32deg,
            rgba(255, 255, 255, 0.08) 44deg,
            transparent 58deg,
            rgba(255, 255, 255, 0.05) 74deg,
            transparent 98deg,
            transparent 360deg
        ),
        conic-gradient(from 180deg at 100% 50%,
            transparent 0deg,
            rgba(255, 255, 255, 0.15) 6deg,
            transparent 14deg,
            rgba(255, 255, 255, 0.12) 22deg,
            transparent 32deg,
            rgba(255, 255, 255, 0.08) 44deg,
            transparent 58deg,
            rgba(255, 255, 255, 0.05) 74deg,
            transparent 98deg,
            transparent 360deg
        );
    opacity: 0.85;
    filter: blur(clamp(16px, 3.5vw, 44px));
    pointer-events: none;
    z-index: -3;
    mix-blend-mode: screen;
}

.cube-field {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--cube-field-top, 78px);
    bottom: 0;
    pointer-events: none;
    z-index: 3;
    overflow: hidden;
    contain: paint;
    opacity: 0.35;
    background-image:
        radial-gradient(1px 1px at 12% 18%, rgba(255, 255, 255, 0.45) 0 1px, transparent 1px),
        radial-gradient(1px 1px at 78% 22%, rgba(255, 255, 255, 0.35) 0 1px, transparent 1px),
        radial-gradient(1px 1px at 36% 62%, rgba(255, 255, 255, 0.28) 0 1px, transparent 1px),
        radial-gradient(1px 1px at 64% 78%, rgba(255, 255, 255, 0.25) 0 1px, transparent 1px),
        radial-gradient(1px 1px at 92% 58%, rgba(255, 255, 255, 0.22) 0 1px, transparent 1px),
        linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 0);
    background-size:
        420px 420px,
        520px 520px,
        620px 620px,
        700px 700px,
        840px 840px,
        1px 1px;
    background-position:
        0 0,
        20% 10%,
        35% 60%,
        70% 75%,
        90% 30%,
        0 0;
    background-repeat: repeat;
}

.cube-field::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(45deg, rgba(255, 255, 255, 0.06) 0%, transparent 60%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, transparent 60%);
    opacity: 0.35;
    filter: blur(18px);
}

.cube-wrap,
.cube,
.cube-face {
    display: none;
}

.cube-wrap {
    position: absolute;
    width: var(--s);
    height: var(--s);
    transform-style: preserve-3d;
    animation: cubeFloat var(--float, 12s) cubic-bezier(0.45, 0, 0.55, 1) infinite;
    will-change: transform;
}

.cube {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    animation: cubeSpin var(--spin, 10s) linear infinite;
}

.cube-face {
    position: absolute;
    inset: 0;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(0, 0, 0, 0));
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(2px);
    opacity: 0.6;
}

.cube-face.front { transform: translateZ(calc(var(--s) * 0.5)); }
.cube-face.back { transform: rotateY(180deg) translateZ(calc(var(--s) * 0.5)); }
.cube-face.right { transform: rotateY(90deg) translateZ(calc(var(--s) * 0.5)); }
.cube-face.left { transform: rotateY(-90deg) translateZ(calc(var(--s) * 0.5)); }
.cube-face.top { transform: rotateX(90deg) translateZ(calc(var(--s) * 0.5)); }
.cube-face.bottom { transform: rotateX(-90deg) translateZ(calc(var(--s) * 0.5)); }

@keyframes cubeFloat {
    0%, 100% {
        transform: translate3d(calc(var(--dx, 0px) * -0.15), calc(var(--dy, 0px) * -0.15), calc(var(--dz, 0px) * -0.15));
    }
    50% {
        transform: translate3d(var(--dx, 0px), var(--dy, 0px), var(--dz, 0px));
    }
}

@keyframes cubeSpin {
    0% {
        transform: rotateX(12deg) rotateY(0deg) rotateZ(0deg);
    }
    100% {
        transform: rotateX(12deg) rotateY(360deg) rotateZ(360deg);
    }
}

@keyframes lightRaysMove {
    0%, 100% {
        transform: rotate(0deg) scale(1);
        opacity: 0.6;
    }
    25% {
        transform: rotate(90deg) scale(1.1);
        opacity: 0.4;
    }
    50% {
        transform: rotate(180deg) scale(0.9);
        opacity: 0.7;
    }
    75% {
        transform: rotate(270deg) scale(1.05);
        opacity: 0.5;
    }
}

/* Meteor Shower Effect */
.meteor-shower {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    opacity: 0.9;
}

.meteor {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 1);
    border-radius: 50%;
    box-shadow: 0 0 8px 2px rgba(255, 255, 255, 0.7);
    opacity: 0;
    animation: meteorFall 5s linear infinite;
    will-change: transform, opacity;
}

/* Хвост падающей звезды */
.meteor::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 160px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0));
    transform: translate(-100%, -50%) rotate(-45deg);
    transform-origin: right center;
}

/* Позиции и тайминги — разбросаны по небу для непрерывного потока */
.meteor:nth-child(1)  { top: -2%;  left: 30%; animation-delay: 0s;   animation-duration: 2.6s; }
.meteor:nth-child(2)  { top: 5%;   left: 60%; animation-delay: 0.6s; animation-duration: 3s;   }
.meteor:nth-child(3)  { top: -4%;  left: 90%; animation-delay: 1.2s; animation-duration: 2.4s; }
.meteor:nth-child(4)  { top: 8%;   left: 45%; animation-delay: 1.8s; animation-duration: 3.2s; }
.meteor:nth-child(5)  { top: -2%;  left: 75%; animation-delay: 2.4s; animation-duration: 2.8s; }
.meteor:nth-child(6)  { top: 3%;   left: 15%; animation-delay: 3s;   animation-duration: 2.6s; }
.meteor:nth-child(7)  { top: -3%;  left: 55%; animation-delay: 3.6s; animation-duration: 3s;   }
.meteor:nth-child(8)  { top: 6%;   left: 85%; animation-delay: 4.2s; animation-duration: 2.4s; }
.meteor:nth-child(9)  { top: -1%;  left: 38%; animation-delay: 4.8s; animation-duration: 3.2s; }
.meteor:nth-child(10) { top: 4%;   left: 68%; animation-delay: 5.4s; animation-duration: 2.8s; }
.meteor:nth-child(11) { top: -4%;  left: 22%; animation-delay: 6s;   animation-duration: 2.6s; }
.meteor:nth-child(12) { top: 2%;   left: 95%; animation-delay: 6.6s; animation-duration: 3s;   }
/* остальные точки не используем как метеоры */
.meteor:nth-child(n+13) { display: none; }

@keyframes meteorFall {
    0% {
        opacity: 0;
        transform: translate3d(0, 0, 0);
    }
    8% {
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate3d(-560px, 560px, 0);
    }
}

/* Noise Overlay Effect */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.06) 2px,
            rgba(255, 255, 255, 0.06) 4px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 3px,
            rgba(255, 255, 255, 0.03) 3px,
            rgba(255, 255, 255, 0.03) 6px
        );
    animation: noiseShift 10s steps(10) infinite;
    will-change: transform;
}

/* Falling Stars Effect (from shadedev.space) */
.particles {
    pointer-events: none;
    z-index: 50;
    mix-blend-mode: screen;
    position: fixed;
    inset: 0;
    overflow: hidden;
}

.particle {
    filter: blur(0.3px);
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    width: 3px;
    height: 3px;
    animation: linear infinite snowfall;
    position: absolute;
    top: -10vh;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.45);
    will-change: transform, opacity;
}

@keyframes snowfall {
    0% {
        opacity: 0;
        transform: translate(0);
    }
    8% {
        opacity: 0.85;
    }
    92% {
        opacity: 0.85;
    }
    to {
        transform: translate3d(var(--drift, 0px), 115vh, 0);
        opacity: 0;
    }
}

@keyframes noiseShift {
    0% {
        transform: translate(0, 0);
    }
    10% {
        transform: translate(-5px, -5px);
    }
    20% {
        transform: translate(-10px, 5px);
    }
    30% {
        transform: translate(5px, -10px);
    }
    40% {
        transform: translate(-5px, 15px);
    }
    50% {
        transform: translate(-10px, -10px);
    }
    60% {
        transform: translate(15px, 5px);
    }
    70% {
        transform: translate(0, -5px);
    }
    80% {
        transform: translate(-15px, 0);
    }
    90% {
        transform: translate(10px, 10px);
    }
    100% {
        transform: translate(0, 0);
    }
}

/* Additional Background Effects */
body::before {
    display: none;
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        /* разноцветные звёзды — повторяются по всему фону */
        radial-gradient(1.4px 1.4px at 20% 30%, rgba(255, 255, 255, 0.95) 0 1.4px, transparent 1.6px),
        radial-gradient(1.2px 1.2px at 70% 62%, rgba(255, 185, 140, 0.9) 0 1.2px, transparent 1.4px),
        radial-gradient(1.7px 1.7px at 45% 82%, rgba(205, 150, 255, 0.88) 0 1.7px, transparent 1.9px),
        radial-gradient(1px 1px at 86% 18%, rgba(150, 255, 230, 0.85) 0 1px, transparent 1.2px),
        radial-gradient(1.3px 1.3px at 10% 72%, rgba(255, 150, 180, 0.85) 0 1.3px, transparent 1.5px),
        radial-gradient(1.1px 1.1px at 55% 10%, rgba(255, 235, 170, 0.9) 0 1.1px, transparent 1.3px),
        /* туманности — мягкое цветное свечение, не повторяется */
        radial-gradient(ellipse 60% 50% at 18% 24%, rgba(60, 86, 190, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 55% 45% at 82% 72%, rgba(125, 55, 165, 0.11) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 62% 14%, rgba(30, 95, 150, 0.09) 0%, transparent 62%),
        radial-gradient(ellipse 45% 40% at 38% 88%, rgba(150, 60, 120, 0.08) 0%, transparent 60%);
    background-size:
        340px 340px,
        420px 420px,
        500px 500px,
        380px 380px,
        460px 460px,
        300px 300px,
        100% 100%,
        100% 100%,
        100% 100%,
        100% 100%;
    background-repeat:
        repeat, repeat, repeat, repeat, repeat, repeat,
        no-repeat, no-repeat, no-repeat, no-repeat;
    pointer-events: none;
    z-index: 0;
    animation: backgroundPulse 15s ease-in-out infinite;
    filter: none;
    will-change: opacity;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-color: #000000;
    background-image: var(--starfield-pattern);
    background-size: var(--starfield-size);
    background-position: var(--starfield-position);
    background-repeat: repeat;
    opacity: 0;
    filter: blur(var(--bg-blur, 4px));
    pointer-events: none;
    z-index: 0;
    animation: twinkle-stars 2s ease-in-out infinite;
    will-change: opacity, filter;
}

@keyframes twinkle-stars {
    0%, 100% {
        opacity: 0.85;
        filter: brightness(1) blur(var(--bg-blur, 4px));
    }
    50% {
        opacity: 1;
        filter: brightness(1.25) blur(var(--bg-blur, 4px));
    }
}

/* Плавный «дрейф» звёздного поля — звёзды как будто плавают */
@keyframes starfield-float {
    0%   { transform: translate3d(0, 0, 0); }
    25%  { transform: translate3d(-38px, 28px, 0); }
    50%  { transform: translate3d(26px, -34px, 0); }
    75%  { transform: translate3d(32px, 22px, 0); }
    100% { transform: translate3d(0, 0, 0); }
}

/* Cursor Glow Effect */
.cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 40%, transparent 70%);
    filter: blur(22px);
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    z-index: 1;
}

/* Animated Header */
.animated-header {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 35px;
    background: var(--primary-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.42);
    z-index: 1000;
    transition: all 0.3s ease;
    min-height: 60px;
}

nav {
    display: inline-flex;
    gap: 5px;
    padding: 5px;
    border-radius: 999px;
    background: var(--secondary-bg);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.05),
        0 10px 22px rgba(0, 0, 0, 0.25);
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    position: relative;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 14px;
    border-radius: 999px;
    line-height: 1.2;
}

.nav-link::after {
    content: none;
}

.nav-link:hover {
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.095);
}

.nav-link:active {
    transform: translateY(1px);
}

.nav-link[aria-current="page"],
.nav-link.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.12);
}

.logo-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.logo-container {
    position: relative;
}

.logo-container:has(.nav-link) {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border-radius: 999px;
    background: var(--secondary-bg);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.05),
        0 10px 22px rgba(0, 0, 0, 0.25);
}

.logo {
    font-size: 12px;
    font-weight: 800;
    position: relative;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    animation: none;
    text-shadow: 0 0 28px rgba(255, 255, 255, 0.22);
}

.logo::before,
.logo::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.logo::before {
    animation: none;
    opacity: 0;
    color: rgba(255, 255, 255, 0.46);
    filter: blur(1px);
    z-index: -1;
}

.logo::after {
    animation: none;
    opacity: 0;
    color: rgba(255, 255, 255, 0.32);
    filter: blur(2px);
    z-index: -2;
}

.logo-container:hover .logo {
    text-shadow: 0 0 38px rgba(255, 255, 255, 0.38);
}

.logo-container:hover .logo::before {
    opacity: 0.78;
    animation: logoAura 1.2s ease-in-out infinite;
}

.logo-container:hover .logo::after {
    opacity: 0.62;
    animation: logoAura 1.5s ease-in-out infinite;
}

@keyframes logoAura {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(1.4px, -1.4px);
    }
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 20px 80px;
    overflow: hidden;
}

.hero-bg {
    position: fixed;
    inset: 0;
    background: none;
    opacity: 0;
    pointer-events: none;
    z-index: -3;
}

@keyframes heroBgMove {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.glitch-text {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 0;
    position: relative;
    color: rgba(200, 200, 200, 0.9);
    text-shadow: 
        1px 1px 0 rgba(255, 255, 255, 0.1),
        -1px -1px 0 rgba(0, 0, 0, 0.8),
        0 0 30px rgba(255, 255, 255, 0.3),
        0 0 60px rgba(255, 255, 255, 0.2),
        0 0 100px rgba(255, 255, 255, 0.1);
    animation: textGlow 3s ease-in-out infinite;
}

/* Draggable Card for Hero Title */
.draggable-card {
    position: relative;
    background: transparent;
    backdrop-filter: none;
    border: none;
    border-radius: 20px;
    padding: 15px 25px;
    cursor: grab;
    z-index: 100;
    box-shadow: none;
    user-select: none;
    transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55), box-shadow 0.3s ease, border-color 0.3s ease;
    margin: 100px auto 40px auto;
    will-change: transform;
    display: block;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: rgba(200, 200, 200, 0.9);
    text-shadow:
        1px 1px 0 rgba(255, 255, 255, 0.1),
        -1px -1px 0 rgba(0, 0, 0, 0.8),
        0 0 30px rgba(255, 255, 255, 0.3),
        0 0 60px rgba(255, 255, 255, 0.2);
}

.draggable-card:hover {
    box-shadow: none;
}

.draggable-card:active {
    cursor: grabbing;
    transition: none;
}

.draggable-card::before {
    content: none;
}

.glitch-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.03) 2px,
        rgba(255, 255, 255, 0.03) 4px
    );
    pointer-events: none;
    animation: scanlines 0.1s linear infinite;
    z-index: 1;
}

.glitch-text::after {
    display: none;
}

@keyframes textGlow {
    0%, 100% {
        text-shadow: 
            1px 1px 0 rgba(255, 255, 255, 0.1),
            -1px -1px 0 rgba(0, 0, 0, 0.8),
            0 0 30px rgba(255, 255, 255, 0.3),
            0 0 60px rgba(255, 255, 255, 0.2),
            0 0 100px rgba(255, 255, 255, 0.1);
    }
    50% {
        text-shadow: 
            1px 1px 0 rgba(255, 255, 255, 0.15),
            -1px -1px 0 rgba(0, 0, 0, 0.8),
            0 0 40px rgba(255, 255, 255, 0.4),
            0 0 80px rgba(255, 255, 255, 0.3),
            0 0 120px rgba(255, 255, 255, 0.15);
    }
}

@keyframes scanlines {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
}

@keyframes glitch-2 {
    0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
    20% { clip-path: inset(60% 0 10% 0); transform: translate(1px, -0.5px); }
    40% { clip-path: inset(20% 0 50% 0); transform: translate(-1px, 1px); }
    60% { clip-path: inset(30% 0 40% 0); transform: translate(0.5px, -1px); }
    80% { clip-path: inset(5% 0 80% 0); transform: translate(-0.5px, 0.5px); }
}

.fade-in-text {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    animation: fadeInUp 1s ease-out;
}

.site-stats {
    display: flex;
    gap: 40px;
    justify-content: center;
    margin-top: 50px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 30px 40px;
    background: rgba(10, 10, 12, 0.85);
    border: none;
    border-radius: 20px;
    backdrop-filter: blur(20px);
    box-shadow: none;
    min-width: 280px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 35px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.primary-btn {
    background: rgba(255, 255, 255, 0.14);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.secondary-btn {
    background: transparent;
    color: var(--accent-color);
    border: 1px solid var(--border-color);
}

.btn-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.18) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
    pointer-events: none;
    z-index: -1;
}

.btn:hover .btn-glow {
    width: 300px;
    height: 300px;
}

.btn:hover {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
}

.btn:active {
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.4);
}

.secondary-btn:hover {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255,255,255,0.035);
}

/* Floating Particles */
.floating-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 10s infinite linear;
}

/* Typing Effect from shadedev.space */
.typed-char {
    opacity: 0;
    animation: 1ms linear forwards typedReveal;
    animation-delay: var(--d,0s);
    display: inline-block;
    transform: translateY(.12em)
}

@keyframes typedReveal {
    to {
        opacity: 1;
        transform: translateY(0)
    }
}

/* Running Shine/Sheen Effect on Letters */
.grad-text .typed-char {
    color: #0000;
    -webkit-text-fill-color: transparent;
    animation-name: typedReveal,sheenChar;
    animation-duration: 1ms,4s;
    animation-timing-function: linear,ease-in-out;
    animation-iteration-count: 1,infinite;
    animation-fill-mode: forwards,none;
    animation-delay: var(--d,0s),calc(.4s + var(--d,0s) * 2.5);
    background-image: linear-gradient(115deg,#0000 35%,#ffffff,#0000 65%),linear-gradient(#ffffff,#d4d4d4,#a8a8a8);
    background-position: 220% 0,0 0;
    background-repeat: no-repeat;
    background-size: 320% 100%,100% 100%;
    -webkit-background-clip: text;
    background-clip: text
}

@keyframes sheenChar {
    0% {
        background-position: 220% 0,0 0
    }
    22% {
        background-position: -120% 0,0 0
    }
    to {
        background-position: -120% 0,0 0
    }
}

.typed-line {
    font-family: var(--font-display, system-ui);
    letter-spacing: -0.025em;
    white-space: nowrap;
    line-height: 1.05;
    display: block
}

.grad-word {
    color: #0000;
    -webkit-text-fill-color: transparent;
    background: linear-gradient(#fff,#b5b5b5,#5a5a5a);
    -webkit-background-clip: text;
    background-clip: text;
    display: inline-block
}

/* Terms Page Styles */
.terms-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.terms-section {
    background: rgba(10, 10, 12, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    padding: 30px 40px;
    margin-bottom: 30px;
    backdrop-filter: blur(20px);
}

.terms-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.terms-section p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 15px;
}

.terms-section ul {
    list-style: none;
    padding-left: 0;
    margin-top: 15px;
}

.terms-section li {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    padding-left: 25px;
    position: relative;
    margin-bottom: 10px;
}

.terms-section li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: rgba(255, 255, 255, 0.5);
    font-weight: bold;
}

@keyframes float {
    from {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    to {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

/* Falling Stars Effect */
.falling-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.falling-star {
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    box-shadow: 0 0 6px 1px rgba(255, 255, 255, 0.4);
    opacity: 0;
    animation: starFall linear infinite;
}

.falling-star::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.6), transparent);
    transform: translate(-100%, -50%) rotate(-45deg);
    opacity: 0.5;
}

@keyframes starFall {
    0% {
        opacity: 0;
        transform: translateY(-100px) translateX(0) scale(0.5);
    }
    5% {
        opacity: 1;
        transform: translateY(0) translateX(0) scale(1);
    }
    15% {
        opacity: 1;
        transform: translateY(100px) translateX(-30px) scale(1);
    }
    30% {
        opacity: 0;
        transform: translateY(300px) translateX(-60px) scale(0.5);
    }
    100% {
        opacity: 0;
        transform: translateY(300px) translateX(-60px) scale(0.5);
    }
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.title-underline {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    margin: 0 auto;
    animation: slideGradient 3s ease-in-out infinite;
}

@keyframes slideGradient {
    0%, 100% { transform: translateX(-20px); }
    50% { transform: translateX(20px); }
}

/* Features Section */
.features {
    padding: 120px 40px 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 40px;
}

.feature-card {
    background: rgba(10, 10, 12, 0.55);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 50px 36px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, var(--card-glow), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.6);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
    color: var(--accent-color);
    transition: transform 0.3s ease;
}

.bw-emoji {
    filter: grayscale(100%) brightness(200%);
    font-size: 2.5rem;
    display: inline-block;
}

.feature-card:hover .bw-emoji {
    transform: scale(1.1);
}

.feature-card:hover .card-icon {
    transform: scale(1.1);
}

.feature-card h3,
.card-title {
    font-size: 1.5rem;
    margin-bottom: 5px;
    font-weight: 700;
}

.card-title-group {
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.card-price {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
    opacity: 0.8;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.feature-card:hover .card-glow {
    opacity: 1;
}

/* Profile Panel */
.profile-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(14, 14, 14, 0.92), rgba(8, 8, 8, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 26px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.profile-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 12% 20%, rgba(255, 255, 255, 0.08), transparent 45%),
        radial-gradient(circle at 85% 70%, rgba(255, 255, 255, 0.05), transparent 45%);
    opacity: 0.6;
    pointer-events: none;
}

.profile-row {
    display: grid;
    grid-template-columns: minmax(160px, 230px) minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 12px 16px 12px 22px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(120deg, rgba(20, 20, 20, 0.9), rgba(12, 16, 20, 0.92));
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
    transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.profile-row::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 10px;
    bottom: 10px;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(245, 245, 245, 0.9), rgba(170, 170, 170, 0.75));
    opacity: 0.85;
}

.profile-row:nth-child(3n + 2)::before {
    background: linear-gradient(180deg, rgba(235, 235, 235, 0.85), rgba(150, 150, 150, 0.7));
}

.profile-row:nth-child(3n)::before {
    background: linear-gradient(180deg, rgba(220, 220, 220, 0.85), rgba(130, 130, 130, 0.7));
}

.profile-row:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: linear-gradient(120deg, rgba(24, 24, 24, 0.95), rgba(14, 20, 28, 0.94));
    transform: translateY(-1px);
}

.profile-row > * {
    position: relative;
    z-index: 1;
}

.profile-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    min-height: 36px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: 0.3px;
    font-size: 0.8rem;
    justify-self: start;
    width: fit-content;
    max-width: 100%;
}

.profile-row:nth-child(3n + 2) .profile-label {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.16);
}

.profile-row:nth-child(3n) .profile-label {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.16);
}

.profile-label i {
    font-size: 1rem;
}

.profile-label span {
    white-space: nowrap;
}

.profile-value {
    display: flex;
    align-items: center;
    min-height: 36px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
}

.profile-actions {
    display: flex;
    justify-self: end;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    outline: none;
}

.profile-input::placeholder {
    color: var(--text-secondary);
}

.profile-input:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.1);
}

.small-btn {
    padding: 10px 18px;
    font-size: 0.75rem;
    letter-spacing: 0.6px;
    border-radius: 8px;
}

.profile-panel .small-btn {
    padding: 8px 14px;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    border-radius: 7px;
}

/* Profile Dashboard (dark + unusual) */
.profile-page {
    --profile-accent: #e0e0e0;
    --profile-accent-strong: #b8b8b8;
    --profile-surface: rgba(12, 12, 12, 0.92);
    --profile-surface-strong: rgba(6, 6, 6, 0.95);
    --profile-border: rgba(255, 255, 255, 0.08);
}

.profile-page::after {
    content: "";
    position: fixed;
    inset: 0;
    background-color: #000000;
    background-image: var(--starfield-pattern);
    background-size: var(--starfield-size);
    background-position: var(--starfield-position);
    background-repeat: repeat;
    opacity: 0.9;
    pointer-events: none;
    z-index: -3;
}

.profile-hero {
    padding: 140px 24px 110px;
}

.profile-hero-content {
    max-width: 1100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding-top: 0;
    margin-top: 20px;
}

.profile-hero .glitch-text {
    font-size: clamp(2rem, 5vw, 3.5rem);
    text-shadow: 0 0 18px rgba(255, 255, 255, 0.35);
}

.profile-hero .fade-in-text {
    font-size: 1rem;
    max-width: 760px;
    text-align: center;
}

.profile-hero-meta {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(8, 8, 8, 0.65);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
    flex-wrap: wrap;
    justify-content: center;
}

.profile-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    min-width: 120px;
}

.profile-meta-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-secondary);
}

.profile-meta-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #f3f3f3;
}

.profile-meta-divider {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.14);
}

.profile-hero-panels {
    width: min(1120px, 100%);
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.profile-auth-card {
    width: min(440px, 100%);
    position: relative;
    overflow: hidden;
    padding: 28px;
    border-radius: 20px;
    border: 1px solid var(--profile-border);
    background: linear-gradient(160deg, rgba(18, 18, 18, 0.96), rgba(8, 8, 8, 0.98));
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(18px);
}

.profile-auth-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.06), transparent 55%),
        radial-gradient(circle at 80% 75%, rgba(255, 255, 255, 0.04), transparent 45%);
    opacity: 0.8;
    pointer-events: none;
}

.profile-auth-card .auth-form {
    max-width: none;
    position: relative;
    z-index: 1;
}

.profile-auth-card .btn {
    width: 100%;
}

.profile-auth-card .input-group {
    margin-bottom: 16px;
}

.profile-auth-card input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(10, 12, 16, 0.75);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.profile-auth-card input::placeholder {
    color: rgba(248, 248, 248, 0.45);
}

.profile-auth-card input:focus {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(12, 14, 18, 0.85);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

.profile-auth-card .primary-btn {
    padding: 16px 24px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.22);
    color: var(--text-primary);
    letter-spacing: 2px;
}

.profile-auth-card .primary-btn:hover {
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.55);
}

.profile-auth-card .auth-links {
    margin-top: 16px;
}

.profile-auth-card .auth-links .nav-link {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 600;
    text-transform: none;
}

 .profile-auth-card .auth-links .recovery-link {
     padding: 6px 10px;
     font-size: 0.72rem;
     font-weight: 600;
     letter-spacing: 0.2px;
     opacity: 0.85;
 }

.profile-auth-card .auth-links .nav-link:hover {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.06);
}

 .password-input-wrap {
     position: relative;
     display: flex;
     align-items: center;
 }

 .password-input-wrap input {
     padding-right: 46px;
 }

 .password-toggle {
     position: absolute;
     right: 12px;
     top: 50%;
     transform: translateY(-50%);
     width: 32px;
     height: 32px;
     border-radius: 10px;
     border: 1px solid rgba(255, 255, 255, 0.08);
     background: transparent;
     color: rgba(255, 255, 255, 0.92);
     cursor: pointer;
     display: inline-flex;
     align-items: center;
     justify-content: center;
     transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
 }

 .password-toggle i {
     font-size: 12px;
     line-height: 1;
 }

 .password-toggle .ph {
     font-family: "Phosphor" !important;
     font-style: normal;
     font-weight: normal;
 }

 .password-toggle:hover {
     border-color: rgba(255, 255, 255, 0.16);
 }

 .password-toggle.is-active {
     background: rgba(255, 255, 255, 0.92);
     border-color: rgba(255, 255, 255, 0.92);
     color: rgba(0, 0, 0, 0.95);
 }

 .password-toggle.is-active:hover {
     background: rgba(255, 255, 255, 0.98);
     border-color: rgba(255, 255, 255, 0.98);
 }

 .password-toggle:active {
     transform: translateY(-50%) scale(0.98);
 }

.profile-dashboard {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 26px;
    align-items: start;
    width: 100%;
    max-width: 1120px;
}

.profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.profile-sidebar-content {
    display: flex;
    flex-direction: row;
    gap: 18px;
    align-items: flex-start;
}

.profile-sidebar-content .profile-card {
    flex: 0 0 auto;
}

.profile-sidebar-content .profile-transactions-section {
    flex: 1;
}

.profile-nav {
    display: flex;
    gap: 10px;
    padding: 10px;
    border-radius: 14px;
    background: rgba(8, 8, 8, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.profile-page .profile-nav {
    display: none;
}

.profile-nav-item {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(12, 12, 12, 0.8);
    color: var(--text-secondary);
    font-size: 0.78rem;
    letter-spacing: 0.35px;
    cursor: pointer;
    transition: all 0.25s ease;
    appearance: none;
    -webkit-appearance: none;
}

.profile-nav-item i {
    font-size: 1rem;
}

.profile-nav-item.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
}

.profile-card {
    position: relative;
    overflow: hidden;
    padding: 22px;
    border-radius: 18px;
    background: linear-gradient(140deg, rgba(18, 18, 18, 0.96), rgba(8, 8, 8, 0.94));
    border: 1px solid var(--profile-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}

.profile-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 4px),
        radial-gradient(circle at top, rgba(255, 255, 255, 0.14), transparent 55%);
    opacity: 0.25;
    pointer-events: none;
}

.profile-card-header {
    display: flex;
    gap: 14px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.profile-avatar {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.35);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.profile-card-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-card-name {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-weight: 600;
}

.profile-role-chip {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #f1f1f1;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.profile-card-id {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.profile-card-subscription {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 1;
}

.profile-card-sub-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-card-sub-value {
    margin-top: 6px;
    font-size: 0.95rem;
    font-weight: 600;
}

.profile-card-progress {
    margin-top: 10px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.profile-card-progress span {
    display: block;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, rgba(235, 235, 235, 0.95), rgba(170, 170, 170, 0.9));
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
    transform-origin: left;
    transition: transform 1.6s ease, opacity 0.6s ease;
}

.profile-card-progress.is-draining span {
    transform-origin: right;
}

.profile-card-progress[data-state="inactive"] span {
    background: linear-gradient(90deg, rgba(148, 148, 148, 0.6), rgba(255, 255, 255, 0.35));
    box-shadow: none;
}

.profile-card-progress[data-state="lifetime"] span {
    background: linear-gradient(90deg, rgba(245, 245, 245, 0.95), rgba(190, 190, 190, 0.9));
}

.profile-card-actions {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.profile-download-btn {
    width: 100%;
    justify-content: center;
    padding: 10px 18px;
    font-size: 0.78rem;
    letter-spacing: 0.6px;
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.22);
    color: var(--text-primary);
}

.profile-admin-btn {
    width: 100%;
    justify-content: center;
    padding: 9px 18px;
    font-size: 0.74rem;
    letter-spacing: 0.6px;
    background: linear-gradient(120deg, rgba(24, 24, 28, 0.92), rgba(12, 14, 18, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: rgba(220, 220, 220, 0.85);
}

.profile-admin-btn:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: linear-gradient(120deg, rgba(32, 32, 36, 0.6), rgba(12, 14, 18, 0.96));
    box-shadow: 0 10px 26px rgba(100, 100, 100, 0.18);
}

.profile-download-hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.profile-details {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 20px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(10, 10, 10, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.07);
    overflow: hidden;
}

.profile-details::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 90% 0%, rgba(255, 255, 255, 0.1), transparent 55%);
    opacity: 0.5;
    pointer-events: none;
}

.profile-details::after {
    content: "";
    position: absolute;
    top: 18px;
    bottom: 18px;
    left: 50%;
    width: 1px;
    transform: translateX(-0.5px);
    background: rgba(255, 255, 255, 0.06);
    opacity: 0.7;
    pointer-events: none;
}

.profile-detail-row {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: 10px;
    row-gap: 8px;
    align-items: center;
    padding: 12px 16px;
    border-radius: 12px;
    background: linear-gradient(120deg, rgba(14, 14, 14, 0.9), rgba(8, 10, 12, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1;
}

.profile-detail-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border-radius: 0;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    white-space: nowrap;
}

.profile-detail-label i {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.profile-detail-label span::after {
    content: ":";
    margin-left: 4px;
    color: rgba(255, 255, 255, 0.45);
}

.profile-detail-value {
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 500;
}

.profile-detail-actions {
    display: flex;
    gap: 10px;
    justify-self: end;
}

.profile-detail-input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(12, 12, 12, 0.85);
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
}

.profile-detail-input:focus {
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.18);
}

.profile-detail-hint {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.profile-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(5, 5, 6, 0.7);
    backdrop-filter: blur(6px);
    z-index: 60;
}

.profile-modal[hidden] {
    display: none;
}

.profile-modal-content {
    width: min(440px, 92vw);
    padding: 22px;
    border-radius: 16px;
    background: linear-gradient(160deg, rgba(18, 18, 18, 0.96), rgba(8, 8, 8, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: profileModalIn 0.25s ease-out;
}

.profile-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.profile-modal-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    color: var(--text-primary);
    letter-spacing: 0.4px;
}

.profile-modal-close {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(10, 10, 12, 0.6);
    color: rgba(255, 255, 255, 0.7);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-modal-close:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
    box-shadow: 0 8px 18px rgba(255, 255, 255, 0.12);
}

.profile-modal-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.profile-modal-input {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(12, 12, 12, 0.8);
    color: rgba(255, 255, 255, 0.8);
}

.profile-modal-input i {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.95rem;
}

.profile-modal-input input {
    flex: 1;
    background: transparent;
    border: none;
    color: #f7f3f3;
    font-size: 0.9rem;
    outline: none;
}

.profile-modal-input input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.profile-activate-btn {
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: var(--text-primary);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
}

.profile-activate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(255, 255, 255, 0.25);
}

@keyframes profileModalIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.profile-page .small-btn {
    padding: 8px 14px;
    font-size: 0.7rem;
    border-radius: 8px;
}

@media (max-width: 980px) {
    .profile-dashboard {
        grid-template-columns: 1fr;
    }

    .profile-nav {
        flex-wrap: wrap;
    }

    .profile-hero-meta {
        gap: 12px;
        padding: 10px 14px;
    }
}

@media (max-width: 640px) {
    .profile-details {
        grid-template-columns: 1fr;
    }

    .profile-details::after {
        display: none;
    }

    .profile-detail-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .profile-detail-actions {
        justify-self: start;
    }

    .profile-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Gallery Section */
.gallery-preview {
    padding: 100px 40px;
    background: var(--secondary-bg);
}

 .learn-more {
     padding: 40px 40px 100px;
     background: var(--secondary-bg);
 }

 .learn-more-subtitle {
     max-width: 900px;
     margin: 0 auto 30px;
     text-align: center;
     color: rgba(255, 255, 255, 0.75);
     font-size: 1rem;
     line-height: 1.6;
 }

 .video-embed {
     width: min(1100px, 100%);
     margin: 0 auto;
     border-radius: 18px;
     overflow: hidden;
     box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
     outline: 1px solid rgba(255, 255, 255, 0.08);
 }

 .video-embed iframe {
     width: 100%;
     aspect-ratio: 16/9;
     border: 0;
     display: block;
     background: black;
 }

 /* YouTube Embed Container - стандартный плеер */
 .youtube-embed-container {
     width: min(1100px, 100%);
     margin: 0 auto;
     border-radius: 18px;
     overflow: hidden;
     box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
     outline: 1px solid rgba(255, 255, 255, 0.08);
     background: #000;
 }

 .youtube-embed-container iframe {
     width: 100%;
     aspect-ratio: 16/9;
     border: 0;
     display: block;
 }

 .video-preview {
     position: relative;
     display: block;
     width: min(1100px, 100%);
     margin: 0 auto;
     padding: 0;
     border: none;
     background: transparent;
     border-radius: 12px;
     overflow: hidden;
     cursor: pointer;
     box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
     outline: none;
     transition: transform 0.2s ease, box-shadow 0.2s ease;
 }

 .video-preview:hover {
     transform: scale(1.01);
     box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
 }

 .video-preview-img {
     width: 100%;
     height: auto;
     display: block;
     aspect-ratio: 16/9;
     object-fit: cover;
     transition: transform 0.3s ease;
 }

 .video-preview::after {
     content: "";
     position: absolute;
     inset: 0;
     background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.5) 100%);
     opacity: 1;
     pointer-events: none;
 }

 .video-preview-play {
     position: absolute;
     left: 50%;
     top: 50%;
     transform: translate(-50%, -50%);
     width: 68px;
     height: 48px;
     border-radius: 12px;
     display: flex;
     align-items: center;
     justify-content: center;
     z-index: 2;
     background: rgba(0, 0, 0, 0.8);
     border: none;
     transition: background 0.2s ease, transform 0.2s ease;
 }

 .video-preview-play::before {
     content: "";
     position: absolute;
     inset: 0;
     border-radius: 12px;
     background: #ff0000;
     opacity: 0;
     transition: opacity 0.2s ease;
 }

 .video-preview:hover .video-preview-play::before {
     opacity: 1;
 }

 .video-preview-play i {
     font-size: 1.8rem;
     color: #fff;
     margin-left: 2px;
     position: relative;
     z-index: 1;
 }

 .video-preview:hover .video-preview-img {
     transform: scale(1.05);
 }

 .video-preview:hover .video-preview-play {
     transform: translate(-50%, -50%) scale(1.1);
     background: transparent;
 }

 /* YouTube style duration badge */
 .video-preview-duration {
     position: absolute;
     right: 8px;
     bottom: 8px;
     background: rgba(0, 0, 0, 0.8);
     color: #fff;
     font-size: 0.75rem;
     font-weight: 600;
     padding: 2px 6px;
     border-radius: 4px;
     z-index: 2;
 }

 /* YouTube style title overlay */
 .video-preview-title {
     position: absolute;
     left: 12px;
     right: 12px;
     bottom: 12px;
     color: #fff;
     font-size: 1.1rem;
     font-weight: 600;
     line-height: 1.4;
     z-index: 2;
     text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
     overflow: hidden;
     display: -webkit-box;
     -webkit-line-clamp: 2;
     line-clamp: 2;
     -webkit-box-orient: vertical;
 }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 1400px;
    margin: 0 auto 60px;
}

@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1400px;
    }
}

.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 16/9;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .image-overlay {
    opacity: 1;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.overlay-content {
    text-align: center;
    color: var(--accent-color);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.image-overlay:hover .overlay-content {
    transform: translateY(0);
}

.overlay-content i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: block;
}

.gallery-actions {
    text-align: center;
}

 .video-modal-overlay {
     position: fixed;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     background: rgba(0, 0, 0, 0.95);
     display: flex;
     align-items: center;
     justify-content: center;
     z-index: 2500;
     opacity: 0;
     transition: opacity 0.25s ease;
 }

 .video-modal-overlay.is-open {
     opacity: 1;
 }

 .video-modal {
     width: min(1200px, 95vw);
     max-height: 90vh;
     border-radius: 0;
     overflow: hidden;
     position: relative;
     background: #000;
     box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
 }

 .video-modal video,
 .video-modal iframe {
     display: block;
     width: 100%;
     aspect-ratio: 16/9;
     border: 0;
     background: #000;
 }

 .video-modal-close {
     position: absolute;
     top: -50px;
     right: 0;
     width: 40px;
     height: 40px;
     border-radius: 50%;
     border: none;
     background: rgba(255, 255, 255, 0.1);
     color: #fff;
     cursor: pointer;
     display: flex;
     align-items: center;
     justify-content: center;
     transition: background 0.2s ease;
 }

 .video-modal-close:hover {
     background: rgba(255, 255, 255, 0.2);
 }

 .video-modal-close i {
     font-size: 1.25rem;
 }

 /* YouTube-style title bar in modal */
 .video-modal-header {
     position: absolute;
     top: 0;
     left: 0;
     right: 0;
     padding: 12px 16px;
     background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, transparent 100%);
     z-index: 10;
     opacity: 0;
     transition: opacity 0.3s ease;
 }

 .video-modal:hover .video-modal-header {
     opacity: 1;
 }

 .video-modal-title-bar {
     color: #fff;
     font-size: 1rem;
     font-weight: 500;
     text-shadow: 0 1px 2px rgba(0,0,0,0.5);
 }

/* Stats Section */
.stats {
    padding: 80px 40px;
    background: var(--accent-bg);
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.stat-item {
    padding: 30px;
    background: var(--secondary-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Footer */
footer {
    padding: 40px;
    text-align: center;
    background: var(--primary-bg);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.footer-logo span {
    color: var(--text-secondary);
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-link {
    color: var(--accent-color);
    text-decoration: none;
    margin-left: 6px;
}

.footer-link:visited {
    color: var(--accent-color);
}

.footer-link:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .animated-header {
        padding: 12px 14px;
    }
    
    nav {
        gap: 3px;
        padding: 3px;
    }

    .nav-link {
        font-size: 0.72rem;
        padding: 6px 8px;
    }

    .logo {
        font-size: 15px;
        letter-spacing: 0.8px;
        color: rgba(255, 255, 255, 1);
        text-shadow: 0 0 26px rgba(255, 255, 255, 0.55);
    }

    .hero {
        padding: 100px 20px 60px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .features,
    .gallery-preview {
        padding: 60px 20px;
    }
    
    .cards,
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .glitch-text {
        font-size: 2rem;
    }
    
    .fade-in-text {
        font-size: 1rem;
    }
    
    .btn {
        padding: 12px 25px;
        font-size: 0.8rem;
    }
    
    .feature-card {
        padding: 30px 20px;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
}

/* EULA Topbar (minimal) */
.eula-page {
    padding-top: 0;
}

.eula-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
    background: rgba(6, 7, 10, 0.66);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1200;
}

.eula-brand {
    display: inline-flex;
    align-items: baseline;
    gap: 0;
    text-decoration: none;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
}

.eula-brand-mark {
    color: rgba(239, 68, 68, 0.95);
}

.eula-brand-text {
    color: rgba(255, 255, 255, 0.88);
}

.eula-topbar-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.eula-top-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.86rem;
    letter-spacing: 0.2px;
    transition: color 0.2s ease;
}

.eula-top-link i {
    font-size: 0.95rem;
    color: rgba(239, 68, 68, 0.92);
}

.eula-top-link:hover {
    color: rgba(255, 255, 255, 0.95);
}

.eula-top-link.active {
    color: rgba(239, 68, 68, 0.95);
}

.eula-page .hero {
    padding-top: 110px;
}

/* EULA Page Styles - Увеличенная карточка */
.eula-container {
    display: block;
    max-width: 95vw;
    width: 100%;
    margin: 0 auto;
    padding: 20px 10px;
    min-height: calc(100vh - 140px);
}

.eula-content-full {
    width: 100%;
}

.eula-card {
    background: var(--secondary-bg);
    backdrop-filter: blur(16px);
    border-radius: 16px;
    padding: 24px 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.24);
    max-width: 100%;
}

.eula-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4px;
    text-align: left;
}

.eula-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 24px;
    text-align: left;
}

.eula-section-content {
    margin-bottom: 20px;
}

.eula-section-content h2 {
    color: var(--accent-color);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    text-align: left;
}

.eula-section-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 4px;
    text-align: left;
}

.eula-section-content ul {
    margin: 8px 0 12px 16px;
    padding-left: 0;
}

.eula-section-content li {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 4px;
}

.eula-section-content a {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Старые стили для совместимости */
.eula-sidebar {
    display: none;
}

.eula-nav {
    display: none;
}

.eula-content {
    display: none;
}

.eula-section {
    display: block;
}

@media (max-width: 768px) {
    .eula-container {
        max-width: 100vw;
        padding: 16px 12px;
    }

    .eula-card {
        padding: 20px 16px;
    }

    .eula-title {
        font-size: 1.6rem;
    }

    .eula-section-content h2 {
        font-size: 1.2rem;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--primary-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Selection Styling */
::selection {
    background: rgba(255, 255, 255, 0.22);
    color: var(--text-primary);
}

/* Loading Animation */
.loading {
    animation: none;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
    max-width: 360px;
}

.toast {
    background: rgba(20, 20, 20, 0.92);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-color);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.85rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transform: translateY(8px);
    animation: toastIn 0.35s ease forwards;
}

.toast-success {
    border-left-color: #22c55e;
}

.toast-error {
    border-left-color: #ef4444;
}

.toast-warning {
    border-left-color: #f59e0b;
}

.toast-info {
    border-left-color: #4a6ee8;
}

.toast-hide {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateY(8px);
    }
}

/* Auth Forms */
.auth-form {
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

 .input-label {
     display: block;
     text-align: left;
     font-size: 0.9rem;
     color: var(--text-secondary);
     margin: 0 0 8px 6px;
 }

 .auth-links {
     margin-top: 14px;
     text-align: center;
 }

.admin-users-section {
    padding-top: 60px;
    padding-bottom: 70px;
}

.admin-users-section .section-header {
    margin-bottom: 32px;
}

.admin-users-section .section-title {
    font-size: clamp(1.6rem, 3.4vw, 2.4rem);
    margin-bottom: 12px;
}

.admin-users-section .title-underline {
    width: 60px;
    height: 2px;
}

.admin-panel-card {
    position: relative;
    overflow: hidden;
    padding: 24px;
    border-radius: 18px;
    background: linear-gradient(160deg, rgba(18, 18, 18, 0.92), rgba(10, 10, 10, 0.94));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 45px rgba(0, 0, 0, 0.4);
}

.admin-panel-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.05), transparent 45%),
        radial-gradient(circle at 85% 75%, rgba(255, 255, 255, 0.04), transparent 50%);
    opacity: 0.8;
    pointer-events: none;
}

.admin-panel-card > * {
    position: relative;
    z-index: 1;
}

.admin-panel-card .admin-toolbar {
    margin-top: 0;
    margin-bottom: 12px;
    gap: 12px;
    align-items: center;
}

.admin-panel-card .admin-table {
    margin-top: 10px;
    border-radius: 12px;
    background: rgba(12, 12, 12, 0.55);
    border-color: rgba(255, 255, 255, 0.06);
}

.admin-users-section .input-group {
    margin-bottom: 12px;
}

.admin-users-section .input-label {
    font-size: 0.75rem;
    margin: 0 0 6px 4px;
}

.admin-users-section .input-group input {
    padding: 10px 14px;
    font-size: 0.85rem;
    border-radius: 10px;
}

.admin-users-section .admin-search {
    min-width: 200px;
    max-width: 320px;
}

.admin-users-section .admin-toolbar .btn {
    padding: 8px 16px;
    font-size: 0.72rem;
    letter-spacing: 0.6px;
}

.admin-users-section .admin-action-btn {
    margin: 3px 5px 3px 0;
    padding: 5px 10px;
    font-size: 0.66rem;
    letter-spacing: 0.5px;
}

.admin-users-section .admin-table th,
.admin-users-section .admin-table td {
    padding: 9px 10px;
    font-size: 0.78rem;
}

.admin-users-section .admin-table th {
    font-size: 0.72rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 24px;
    background: rgba(15, 15, 15, 0.55);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    font-size: 0.85rem;
    color: var(--text-primary);
    vertical-align: middle;
}

.admin-table th {
    background: rgba(255, 255, 255, 0.04);
    font-weight: 600;
    color: var(--text-secondary);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-page .btn {
    padding: 10px 22px;
    font-size: 0.8rem;
    letter-spacing: 0.7px;
}

.admin-page .admin-action-btn {
    margin: 4px 6px 4px 0;
    padding: 6px 12px;
    font-size: 0.75rem;
}

.admin-key-output {
    margin-top: 12px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px dashed var(--border-color);
    font-size: 0.85rem;
    color: var(--text-primary);
    word-break: break-all;
}

.admin-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.admin-search {
    flex: 1;
    min-width: 220px;
    max-width: 360px;
}

.admin-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.65);
    z-index: 50;
}

.admin-modal[hidden] {
    display: none;
}

.admin-modal-content {
    width: min(520px, 95vw);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: rgba(15, 15, 15, 0.92);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}

.admin-modal-title {
    margin-bottom: 16px;
}

.admin-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.checkbox-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.mono {
    font-family: "Courier New", monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.input-group {
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    padding: 15px 20px;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.input-group select {
    width: 100%;
    padding: 15px 20px;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.input-group input::placeholder {
    color: var(--text-secondary);
}

.input-group input:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.input-group select:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.hero h1 {
    margin-bottom: 40px;
    text-align: center;
}

/* Utility Classes */
.fade-in {
    animation: fadeInUp 0.8s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 640px) {
    .toast-container {
        left: 12px;
        right: 12px;
        bottom: 12px;
        max-width: none;
    }
}

/* Integrated Admin Panel Styles */
.admin-panel-section {
    grid-column: 1 / -1;
    position: relative;
    overflow: hidden;
    padding: 24px;
    border-radius: 18px;
    background: linear-gradient(140deg, rgba(18, 18, 18, 0.96), rgba(8, 8, 8, 0.94));
    border: 1px solid var(--profile-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
    margin-top: 20px;
}

.admin-panel-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 4px),
        radial-gradient(circle at top, rgba(255, 255, 255, 0.14), transparent 55%);
    opacity: 0.25;
    pointer-events: none;
}

.admin-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.admin-panel-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.admin-panel-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.admin-panel-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.admin-panel-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.admin-tabs {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    background: rgba(10, 10, 10, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-tab-btn {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.admin-tab-btn:hover {
    background: rgba(255, 255, 255, 0.09);
    color: var(--text-primary);
}

.admin-tab-btn.active {
    background: rgba(255, 255, 255, 0.14);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
}

.admin-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    padding-top: 14px;
}

.admin-page-label {
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.admin-card {
    position: relative;
    overflow: hidden;
    padding: 24px;
    border-radius: 16px;
    background: rgba(10, 10, 10, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
}

.admin-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.06), transparent 55%),
        radial-gradient(circle at 80% 75%, rgba(255, 255, 255, 0.04), transparent 45%);
    opacity: 0.8;
    pointer-events: none;
}

.admin-card-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.admin-card-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.admin-card-description {
    color: var(--text-secondary);
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.admin-stat-card {
    position: relative;
    overflow: hidden;
    padding: 20px;
    border-radius: 12px;
    background: rgba(10, 10, 10, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-stat-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.06), transparent 55%);
    opacity: 0.8;
    pointer-events: none;
}

.admin-stat-icon {
    font-size: 2rem;
    color: var(--accent-color);
    position: relative;
    z-index: 1;
}

.admin-stat-content {
    position: relative;
    z-index: 1;
}

.admin-stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-weight: 500;
}

.admin-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.status-paid {
    color: #4ade80;
    font-weight: 600;
}

.status-cancelled {
    color: #f87171;
    font-weight: 600;
}

.status-pending {
    color: #fbbf24;
    font-weight: 600;
}

.admin-input-group {
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.admin-input-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}

.admin-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    outline: none;
}

.admin-input::placeholder {
    color: var(--text-secondary);
}

.admin-input:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.1);
}

.admin-checkbox-line {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.admin-checkbox-line input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.admin-create-btn {
    width: 100%;
    justify-content: center;
    margin-top: 8px;
    position: relative;
    z-index: 1;
}

.admin-key-output {
    margin-top: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: monospace;
    word-break: break-all;
    position: relative;
    z-index: 1;
}

.admin-users-section {
    position: relative;
}

.admin-section-header {
    margin-bottom: 16px;
}

.admin-section-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.admin-toolbar {
    display: flex;
    gap: 12px;
    align-items: end;
    flex-wrap: wrap;
}

.admin-search-group {
    flex: 1;
    min-width: 200px;
}

.admin-table-container {
    background: rgba(10, 10, 10, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .admin-panel-section {
        padding: 16px;
        margin-top: 16px;
    }
    
    .admin-panel-content {
        gap: 16px;
    }
    
    .admin-card {
        padding: 16px;
    }
    
    .admin-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-search-group {
        min-width: auto;
    }
}

/* Payment Modal */
.payment-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
}

.payment-modal[hidden] {
    display: none;
}

.payment-modal-content {
    width: min(380px, 92vw);
    padding: 24px;
    border-radius: 16px;
    background: linear-gradient(160deg, rgba(20, 20, 20, 0.98), rgba(10, 10, 10, 0.99));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
    position: relative;
    animation: paymentModalIn 0.3s ease-out;
}

@keyframes paymentModalIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.payment-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.payment-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.payment-section {
    margin-bottom: 20px;
}

.payment-section-title {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.payment-method {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: all 0.2s ease;
}

.payment-method-disabled {
    cursor: default;
    pointer-events: none;
    opacity: 0.7;
}

.payment-method-x {
    font-size: 1.6rem;
    line-height: 1;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

.payment-method:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
}

.payment-method.active {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.1);
}

.payment-method-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
}

.payment-method-text {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.5px;
}

.payment-method-highlight {
    color: #4a9eff;
}

.payment-method .ph-discord-logo {
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.8);
}

.payment-method-text-small {
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

.payment-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    margin: 20px 0;
}

.payment-plan-name {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.promocode-input {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 14px;
}

.promocode-input i {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
}

.promocode-input input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
}

.promocode-input input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.terms-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.terms-checkbox input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.checkmark::after {
    content: '';
    position: absolute;
    width: 5px;
    height: 9px;
    border: solid rgba(255, 255, 255, 0.9);
    border-width: 0 2px 2px 0;
    opacity: 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    transition: opacity 0.2s ease;
}

.terms-checkbox input:checked + .checkmark::after {
    opacity: 1;
}

.terms-text a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
}

.terms-text a:hover {
    text-decoration: underline;
}

.payment-btn {
    width: 100%;
    padding: 14px 20px;
    border-radius: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.14);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.payment-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.15);
}

.payment-btn-price {
    font-weight: 500;
}

.payment-btn .ph-trash {
    font-size: 1.1rem;
}

/* Footer Social - Ghot Style */
.footer-social {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
}

.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.footer-social-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.15), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.footer-social-link:hover {
    transform: translateY(-2px) scale(1.05);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.1);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
}

.footer-social-link:hover::before {
    opacity: 1;
}

.footer-social-link svg,
.footer-social-link img {
    width: 22px;
    height: 22px;
    fill: rgba(255, 255, 255, 0.85);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.footer-social-link:hover svg,
.footer-social-link:hover img {
    fill: #fff;
    transform: scale(1.1);
}

/* Discord pulse animation */
.footer-social-link.discord::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid rgba(88, 101, 242, 0.4);
    opacity: 0;
    animation: discordPulse 2s ease-out infinite;
}

@keyframes discordPulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.3); opacity: 0; }
}

/* Telegram pulse animation */
.footer-social-link.telegram::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid rgba(0, 176, 240, 0.4);
    opacity: 0;
    animation: telegramPulse 2s ease-out infinite 0.5s;
}

@keyframes telegramPulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.3); opacity: 0; }
}

@media (max-width: 480px) {
    .footer-social-link {
        width: 38px;
        height: 38px;
    }

    .footer-social-link svg,
    .footer-social-link img {
        width: 20px;
        height: 20px;
    }

    .footer-social {
        gap: 12px;
    }
}

/* Transactions Section Styles */
.profile-transactions-section {
    padding: 20px;
    background: var(--secondary-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.profile-section-header {
    margin-bottom: 20px;
}

.profile-section-title {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.transactions-loading,
.transactions-empty,
.transactions-error {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

.transactions-error {
    color: #fca5a5;
}

.transaction-item {
    display: grid;
    grid-template-columns: 100px 1fr 90px;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    background: #000;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 12px;
}

.transaction-item:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: #111;
}

.transaction-item .tx-promocode,
.transaction-item .tx-price {
    display: none;
}

.transaction-header {
    display: none;
}

.transaction-product {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
}

.transaction-status {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-paid {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-cancelled {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.transaction-date {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 0;
}

.transaction-promocode {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0;
}

.transaction-discount {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 11px;
}

.transaction-price {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

@media (max-width: 768px) {
    .profile-transactions-section {
        padding: 16px;
        margin-top: 20px;
    }

    .profile-section-title {
        font-size: 16px;
    }

    .transaction-item {
        padding: 12px;
    }

    .transaction-product {
        font-size: 12px;
    }

    .transaction-price {
        font-size: 15px;
    }
}

/* Promocode Admin Styles */
.status-active {
    color: #4ade80;
}

.status-inactive {
    color: #f87171;
}

.admin-modal-section {
    margin-bottom: 20px;
}

.admin-modal-section-title {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-modal-section h4 {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-modal-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.admin-modal-info div {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.admin-modal-info strong {
    color: rgba(255, 255, 255, 0.6);
}

.promocode-transactions-list {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.promocode-transaction-item {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 80px;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(37, 37, 66, 0.8);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 13px;
}

.tx-date {
    color: rgba(255, 255, 255, 0.5);
}

.tx-product {
    color: #fff;
    font-weight: 500;
}

.tx-price {
    color: #fbbf24;
    font-weight: 600;
}

.tx-status {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
    text-align: center;
}

.tx-paid {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.tx-cancelled {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.tx-pending {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.admin-modal-footer {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.user-transactions-list {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.user-transaction-item {
    display: grid;
    grid-template-columns: 100px 1fr 90px 120px 80px;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    background: #000;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 12px;
}

.user-transaction-item:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: #111;
}

.tx-header {
    display: none;
}

.tx-product {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 12px;
}

.tx-date {
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
    margin-bottom: 0;
}

.tx-price {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 0;
}

.tx-promocode {
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
}

.tx-discount {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
}

@media (max-width: 600px) {
    .promocode-transaction-item {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .tx-status {
        grid-column: 1 / -1;
    }
}

/* Case Opening Animation Styles - New Horizontal Scroll */
.case-opening-content {
    max-width: 600px;
    text-align: center;
}

.case-opening-title {
    color: #fff;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.case-animation-container {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(20, 20, 25, 0.95), rgba(10, 10, 15, 0.98));
    border-radius: 20px;
    margin-bottom: 30px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        inset 0 0 60px rgba(255, 255, 255, 0.02);
}

.case-scroll-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0;
    gap: 20px;
    will-change: transform;
    position: relative;
    height: 100%;
}

.case-scroll-item {
    min-width: 160px;
    height: 140px;
    padding: 20px;
    background: linear-gradient(145deg, rgba(40, 40, 50, 0.9), rgba(25, 25, 35, 0.95));
    border-radius: 16px;
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.case-scroll-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.case-scroll-item:hover::before {
    left: 100%;
}

.case-scroll-item .reward-icon {
    font-size: 36px;
    margin-bottom: 5px;
}

.case-scroll-item .reward-text {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.8;
}

.case-scroll-item[data-reward="30"] {
    border-color: rgba(76, 175, 80, 0.5);
    box-shadow: 0 0 30px rgba(76, 175, 80, 0.2);
}

.case-scroll-item[data-reward="30"] .reward-icon {
    color: #4CAF50;
    text-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
}

.case-scroll-item[data-reward="90"] {
    border-color: rgba(33, 150, 243, 0.5);
    box-shadow: 0 0 30px rgba(33, 150, 243, 0.2);
}

.case-scroll-item[data-reward="90"] .reward-icon {
    color: #2196F3;
    text-shadow: 0 0 20px rgba(33, 150, 243, 0.5);
}

.case-scroll-item[data-reward="180"] {
    border-color: rgba(255, 152, 0, 0.5);
    box-shadow: 0 0 30px rgba(255, 152, 0, 0.2);
}

.case-scroll-item[data-reward="180"] .reward-icon {
    color: #FF9800;
    text-shadow: 0 0 20px rgba(255, 152, 0, 0.5);
}

.case-scroll-item[data-reward="nothing"] {
    border-color: rgba(244, 67, 54, 0.5);
    box-shadow: 0 0 30px rgba(244, 67, 54, 0.2);
}

.case-scroll-item[data-reward="nothing"] .reward-icon {
    color: #f44336;
    text-shadow: 0 0 20px rgba(244, 67, 54, 0.5);
}

.case-highlight-line {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, transparent, rgba(255, 107, 107, 0.8), transparent);
    z-index: 10;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.6);
}

.case-highlight-line::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: rgba(255, 107, 107, 0.3);
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0.2;
    }
}

.case-result {
    padding: 30px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(76, 175, 80, 0.1));
    border: 2px solid rgba(76, 175, 80, 0.4);
    border-radius: 16px;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    animation: resultFadeIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    text-align: center;
}

@keyframes resultFadeIn {
    from {
        opacity: 0;
        transform: scale(0.5) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.case-counter {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin: 15px 0;
    font-weight: 500;
}

.case-counter span {
    color: #ff6b6b;
    font-weight: 700;
    font-size: 16px;
}

.case-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.case-buttons .btn {
    width: 100%;
    padding: 18px 35px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
}

.case-credits {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
    font-weight: 600;
}

.case-credits span {
    color: #C0C0C0;
    font-weight: 700;
}

/* Case Opening Modal Styles - New Design */
.case-opening-content {
    max-width: 1200px;
    padding: 40px;
    text-align: center;
    background: linear-gradient(135deg, rgba(15, 15, 20, 0.98), rgba(10, 10, 15, 0.99));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.6),
        inset 0 0 80px rgba(255, 255, 255, 0.02);
}

.case-opening-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 30px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
}

.case-roulette-container {
    position: relative;
    width: 900px;
    max-width: 100%;
    height: 240px;
    margin: 0 auto 30px auto;
    overflow: hidden;
    border-radius: 20px;

    background:
        linear-gradient(
            180deg,
            rgba(15,15,20,.98),
            rgba(25,25,30,.95)
        );

    border: none;

    box-shadow:
        0 0 80px rgba(255,255,255,.06),
        inset 0 0 80px rgba(0,0,0,.6);
}

/* Затемнение по краям ленты — карточки красиво растворяются */
.case-roulette-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 160px;
    z-index: 6;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(12,12,16,1), rgba(12,12,16,0));
}

.case-roulette-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 160px;
    z-index: 6;
    pointer-events: none;
    background: linear-gradient(270deg, rgba(12,12,16,1), rgba(12,12,16,0));
}

.case-roulette-wheel {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;

    padding: 0 100px;

    height: 100%;

    transition:
        transform 5s cubic-bezier(
            0.08,
            0.9,
            0.15,
            1
        );

    will-change: transform;

    position: absolute;
    left: 0;
    top: 0;

    width: max-content;
}

.case-roulette-item {
    width: 220px;
    height: 180px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    border-radius: 18px;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.06),
            rgba(255,255,255,.02)
        );

    border: none;

    backdrop-filter: blur(10px);

    flex-shrink: 0;

    transition: .3s;

    position: relative;

    box-shadow:
        0 10px 30px rgba(0,0,0,.35);

    overflow: hidden;
}

.case-roulette-item::before {
    content: '';

    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,.08),
            transparent 40%
        );

    pointer-events: none;
}

.case-roulette-item.winner {
    transform: scale(1.12);

    box-shadow:
        0 0 40px rgba(255,215,0,.9),
        0 0 120px rgba(255,215,0,.3);
}

/* Иконка в карточке всегда пустая — прячем, чтобы текст был ровно по центру */
.item-icon {
    display: none;
}

.item-text {
    font-size: 16px;
    font-weight: 800;
    text-align: center;
}
.case-roulette-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.case-roulette-item:hover::before {
    left: 100%;
}

.case-roulette-item .item-text {
    font-size: 22px;
    font-weight: 800;
    opacity: 1;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    line-height: 1.2;
    padding: 0 8px;
    white-space: normal;
    width: 100%;
}

.case-roulette-item:nth-child(odd) {
    background: linear-gradient(145deg, rgba(45, 45, 55, 0.9), rgba(30, 30, 40, 0.95));
}

.case-roulette-item[data-days="30"] {
    border-color: rgba(192,192,192,.7);
    box-shadow:
        0 0 40px rgba(192,192,192,.4),
        inset 0 0 20px rgba(192,192,192,.1);
    background: linear-gradient(
        145deg,
        rgba(60,60,70,.98),
        rgba(40,40,50,.99)
    );
}

.case-roulette-item[data-days="30"] .item-icon {
    color: #C0C0C0;
    text-shadow: 0 0 15px rgba(192, 192, 192, 0.5);
}

.case-roulette-item[data-days="90"] {
    border-color: rgba(169,169,169,.7);
    box-shadow:
        0 0 40px rgba(169,169,169,.4),
        inset 0 0 20px rgba(169,169,169,.1);
    background: linear-gradient(
        145deg,
        rgba(70,70,80,.98),
        rgba(50,50,60,.99)
    );
}

.case-roulette-item[data-days="90"] .item-icon {
    color: #A9A9A9;
    text-shadow: 0 0 15px rgba(169, 169, 169, 0.5);
}

.case-roulette-item[data-days="180"] {
    border-color: rgba(255,255,255,.8);
    box-shadow:
        0 0 50px rgba(255,255,255,.5),
        inset 0 0 30px rgba(255,255,255,.15);
    background: linear-gradient(
        145deg,
        rgba(80,80,90,.98),
        rgba(60,60,70,.99)
    );
}

.case-roulette-item[data-days="180"] .item-icon {
    color: #FFFFFF;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.case-roulette-item[data-days="nothing"] {
    border-color: rgba(100,100,100,.7);
    box-shadow:
        0 0 40px rgba(100,100,100,.4),
        inset 0 0 20px rgba(100,100,100,.1);
    background: linear-gradient(
        145deg,
        rgba(40,40,45,.98),
        rgba(30,30,35,.99)
    );
}

.case-roulette-item[data-days="nothing"] .item-icon {
    color: #646464;
    text-shadow: 0 0 15px rgba(100, 100, 100, 0.5);
}

/* Центральный указатель — золотая светящаяся линия со стрелками */
.case-roulette-pointer {
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    transform: translateX(-50%);
    z-index: 12;
    pointer-events: none;
    background: linear-gradient(180deg, #ffd700, #ffffff, #ffd700);
    box-shadow:
        0 0 18px rgba(255,215,0,.9),
        0 0 40px rgba(255,215,0,.45);
}

.case-roulette-pointer::before,
.case-roulette-pointer::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    filter: drop-shadow(0 0 6px rgba(255,215,0,.8));
}

.case-roulette-pointer::before {
    top: -1px;
    border-top: 14px solid #ffd700;
}

.case-roulette-pointer::after {
    bottom: -1px;
    border-bottom: 14px solid #ffd700;
}

.case-roulette-arrow {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    z-index: 15;
    pointer-events: none;
    filter: drop-shadow(0 0 10px rgba(192,192,192,.6));
}

.case-roulette-arrow-top {
    top: 15px;
    border-top: 30px solid rgba(192,192,192,.9);
}

.case-roulette-arrow-bottom {
    bottom: 15px;
    border-bottom: 30px solid rgba(192,192,192,.9);
}

.case-roulette-item.winner {
    transform: scale(1.12);
    box-shadow:
        0 0 40px rgba(255,215,0,.9),
        0 0 120px rgba(255,215,0,.3);
}

/* Mobile Responsive Styles for Case Roulette */
@media (max-width: 768px) {
    .case-roulette-container {
        width: 100%;
        height: 200px;
        margin: 0 auto 20px auto;
    }
    
    .case-roulette-wheel {
        padding: 0 20px;
        gap: 15px;
    }
    
    .case-roulette-item {
        width: 140px;
        height: 140px;
        font-size: 10px;
    }
    
    .case-roulette-item .item-text {
        font-size: 20px;
    }
    
    .case-roulette-item .item-icon {
        font-size: 18px;
    }
    
    .case-roulette-pointer {
        width: 3px;
    }
    
    .case-opening-content {
        max-width: 100%;
        padding: 20px;
    }
    
    .case-opening-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
}

.case-roulette-pointer::before {
    display: none;
}

@keyframes pointerPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0.3;
    }
}

.case-result {
    padding: 25px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(76, 175, 80, 0.1));
    border: 2px solid rgba(76, 175, 80, 0.4);
    border-radius: 16px;
    animation: resultFadeIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    text-align: center;
}

.case-result-text {
    color: #4CAF50;
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 0 20px rgba(76, 175, 80, 0.3);
}

.case-result-text span {
    color: #81C784;
    font-weight: 800;
    font-size: 24px;
}

/* Modal Overlay Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    position: relative;
    background: var(--secondary-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* ============================================================= */
/* ===============  ENHANCED COSMIC BACKGROUND  ================ */
/* Monochrome deep-space look, richer & prettier. Layers are     */
/* mounted globally by app-shell.js (mountCosmicBackground()).    */
/* ============================================================= */

/* Slightly deeper, layered base so the void has gradient depth */
body {
    background-color: #000000;
}

/* Cosmic background wrapper injected on every page */
.cosmic-bg {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    contain: strict;
}

/* Drifting nebula clouds (very soft, mostly monochrome with a faint cool tint) */
.cosmic-nebula {
    position: absolute;
    inset: -25%;
    background:
        radial-gradient(closest-side at 22% 30%, rgba(255, 255, 255, 0.10) 0%, transparent 70%),
        radial-gradient(closest-side at 78% 22%, rgba(255, 255, 255, 0.09) 0%, transparent 70%),
        radial-gradient(closest-side at 65% 75%, rgba(255, 255, 255, 0.08) 0%, transparent 72%),
        radial-gradient(closest-side at 30% 80%, rgba(255, 255, 255, 0.07) 0%, transparent 72%),
        radial-gradient(closest-side at 50% 50%, rgba(255, 255, 255, 0.04) 0%, transparent 75%);
    filter: blur(40px) saturate(115%);
    opacity: 0.9;
    will-change: transform, opacity;
    animation: nebulaDrift 46s ease-in-out infinite;
}

@keyframes nebulaDrift {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.85; }
    25%      { transform: translate3d(2.5%, -2%, 0) scale(1.06); opacity: 1; }
    50%      { transform: translate3d(-2%, 2.5%, 0) scale(1.03); opacity: 0.8; }
    75%      { transform: translate3d(1.5%, 1.5%, 0) scale(1.08); opacity: 0.95; }
}

/* Soft aurora ribbon sweeping across the top — subtle, premium */
.cosmic-aurora {
    position: absolute;
    top: -30%;
    left: -20%;
    width: 140%;
    height: 90%;
    background:
        conic-gradient(from 210deg at 50% 50%,
            transparent 0deg,
            rgba(255, 255, 255, 0.10) 40deg,
            rgba(255, 255, 255, 0.08) 90deg,
            transparent 150deg,
            rgba(255, 255, 255, 0.07) 220deg,
            transparent 300deg,
            transparent 360deg);
    filter: blur(60px);
    opacity: 0.55;
    mix-blend-mode: screen;
    will-change: transform;
    animation: auroraSweep 38s linear infinite;
}

@keyframes auroraSweep {
    0%   { transform: rotate(0deg) scale(1.05); }
    50%  { transform: rotate(180deg) scale(1.15); }
    100% { transform: rotate(360deg) scale(1.05); }
}

/* Extra parallax star layer (denser, twinkling) on top of body::after */
.cosmic-stars {
    position: absolute;
    inset: 0;
    background-image: var(--starfield-pattern);
    background-size: var(--starfield-size);
    background-position: var(--starfield-position);
    background-repeat: repeat;
    opacity: 0.9;
    filter: blur(var(--bg-blur, 4px));
    animation: cosmicTwinkle 6s ease-in-out infinite, cosmicStarsDrift 120s linear infinite;
    will-change: opacity, transform;
}

.cosmic-stars.layer-2 {
    opacity: 0.32;
    filter: blur(0.4px);
    background-position: 40% 60%, 10% 30%, 70% 80%, 55% 12%, 88% 44%;
    animation: cosmicTwinkle 9s ease-in-out infinite reverse, cosmicStarsDrift 180s linear infinite reverse;
}

@keyframes cosmicTwinkle {
    0%, 100% { opacity: 0.70; filter: brightness(1) blur(var(--bg-blur, 4px)); }
    50%      { opacity: 0.95; filter: brightness(1.35) blur(var(--bg-blur, 4px)); }
}

@keyframes cosmicStarsDrift {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(-2%, -1.5%, 0); }
}

/* Vignette to focus the eye toward the centre/content */
.cosmic-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 75% 65% at 50% 42%, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
    opacity: 0.9;
}

/* Define the previously-missing pulse so body::before breathes gently */
@keyframes backgroundPulse {
    0%, 100% { opacity: 0.85; }
    50%      { opacity: 1; }
}

/* Richer, glowing meteors with a longer tail */
.meteor-shower { opacity: 0.55; }

.meteor {
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow:
        0 0 8px 2px rgba(255, 255, 255, 0.55),
        0 0 20px 4px rgba(255, 255, 255, 0.25);
}

.meteor::before {
    width: 90px;
    height: 1.5px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.25), transparent);
}

/* More meteors across the sky with varied timing */
.meteor:nth-child(6)  { top: 12%; left: 25%; animation-delay: 3s;  animation-duration: 5.2s; }
.meteor:nth-child(7)  { top: 3%;  left: 50%; animation-delay: 11s; animation-duration: 6.4s; }
.meteor:nth-child(8)  { top: 18%; left: 15%; animation-delay: 18s; animation-duration: 4.8s; }
.meteor:nth-child(9)  { top: 7%;  left: 85%; animation-delay: 25s; animation-duration: 5.6s; }
.meteor:nth-child(10) { top: 22%; left: 35%; animation-delay: 33s; animation-duration: 4.4s; }
.meteor:nth-child(11) { top: 9%;  left: 65%; animation-delay: 6s;  animation-duration: 5.9s; }
.meteor:nth-child(12) { top: 14%; left: 5%;  animation-delay: 14s; animation-duration: 6.1s; }
.meteor:nth-child(13) { top: 4%;  left: 95%; animation-delay: 20s; animation-duration: 4.7s; }
.meteor:nth-child(14) { top: 25%; left: 55%; animation-delay: 28s; animation-duration: 5.4s; }
.meteor:nth-child(15) { top: 16%; left: 75%; animation-delay: 36s; animation-duration: 5.0s; }

/* Brighter, prettier floating particles */
.particle {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.55);
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    .cosmic-nebula, .cosmic-aurora, .cosmic-stars, .meteor, .particle {
        animation: none !important;
    }
}

/* ============================================================= */
/* ===============  АНИМАЦИИ ПРОКРУТКИ  ======================== */
/* ============================================================= */

html { scroll-behavior: smooth; }

/* Тонкий прогресс-бар прокрутки сверху */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.15), rgba(160, 190, 255, 0.95));
    box-shadow: 0 0 12px rgba(160, 190, 255, 0.6);
    z-index: 9998;
    pointer-events: none;
    transition: width 0.12s linear;
    will-change: width;
}

/* Появление элементов при прокрутке (класс навешивает JS) */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 0.85s cubic-bezier(0.16, 0.84, 0.34, 1),
        transform 0.85s cubic-bezier(0.16, 0.84, 0.34, 1);
    transition-delay: calc(var(--reveal-i, 0) * 70ms);
    will-change: opacity, transform;
}
.reveal-on-scroll.in-view {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal-on-scroll {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .scroll-progress { display: none; }
}

/* ===============  Смена аватара  =============== */
.profile-avatar { position: relative; overflow: visible; }

.avatar-edit-btn {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(10, 10, 12, 0.92);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    z-index: 3;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
}
.avatar-edit-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    color: #000;
    transform: scale(1.1);
}
.avatar-edit-btn.loading {
    opacity: 0.55;
    pointer-events: none;
}
