/* ===== ТЕМЫ ===== */
:root {
    --bg: #0b0f1a;
    --surface: rgba(255,255,255,0.05);
    --text: #e6edf7;
    --text-secondary: #8b98b3;
    --accent: #4f8cff;
    --grid: rgba(255,255,255,0.04);
}

@media (prefers-color-scheme: light) {
    :root {
        --bg: #f6f8fc;
        --surface: rgba(255,255,255,0.7);
        --text: #031455;
        --text-secondary: #5b6475;
        --accent: #4f8cff;
        --grid: rgba(0,0,0,0.05);
    }
}

/* ===== BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Outfit", system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow: hidden;
}

/* ===== GRID ===== */
.grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* ===== GLOW ===== */
.glow {
    position: fixed;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(79,140,255,0.25), transparent 70%);
    filter: blur(120px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ===== PARTICLES ===== */
.particles span {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--text);
    opacity: 0.4;
    animation: float linear infinite;
}

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

/* ===== WRAPPER ===== */
.wrapper {
    position: relative;
    z-index: 2;
    height: 100vh;
    display: grid;
    place-items: center;
    perspective: 1200px;
}

/* ===== CARD ===== */
.container {
    backdrop-filter: blur(20px);
    background: var(--surface);
    border-radius: 24px;
    padding: 3rem;
    max-width: 520px;
    width: 100%;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.08);
    transform-style: preserve-3d;
    box-shadow: 0 20px 80px rgba(0,0,0,0.25);
    animation: fadeIn 0.8s ease-out;
}

/* ===== LOGO ===== */
.logo {
    margin-bottom: 1.5rem;
    fill: var(--text);
    height: min-content;
}

/* ===== TEXT ===== */
h1 {
    font-size: 2.2rem;
    margin-bottom: 0.6rem;
}

.subtitle {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

/* ===== LOADER ===== */
.loader {
    width: 140px;
    height: 6px;
    margin: 0 auto;
    border-radius: 999px;
    background: rgba(0,0,0,0.08);
    overflow: hidden;
    position: relative;
}

.loader::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(91, 142, 236, 0.2);
}

.loader::after {
    content: "";
    position: absolute;
    height: 100%;
    width: 40%;
    border-radius: inherit;

    background: linear-gradient(
        90deg,
        #4f8cff,
        #7aa2ff,
        #9f7aea,
        #4f8cff
    );

    background-size: 200% 100%;

    box-shadow:
        0 0 10px rgba(79,140,255,0.5),
        0 0 25px rgba(79,140,255,0.25);

    animation: loaderMove 2.2s cubic-bezier(0.4,0,0.2,1) infinite,
               gradientShift 3s linear infinite;
}

@keyframes loaderMove {
    0% { transform: translateX(-220%); }
    50% { transform: translateX(60%); }
    100% { transform: translateX(220%); }
}

@keyframes gradientShift {
    to { background-position: 200% 50%; }
}

/* ===== ANIMATION ===== */
@keyframes fadeIn {
    from { opacity:0; transform: translateY(30px);}
    to { opacity:1; transform: translateY(0);}
}

/* ===== MOBILE ===== */
@media (max-width: 500px) {
    .container {
        padding: 2rem;
    }

    h1 {
        font-size: 1.6rem;
    }
}
