/* ==========================================================
   TOPSEO PREMIUM UI - OLED NEBULA & PARTICLE LOADER
   Anti-Generic Aesthetic Framework ($100/mo App Feeling)
   ========================================================== */

/* 🧱 Design Tokens (Premium "High-Punch" Standard) */
:root {
    /* Surface Foundations */
    --bg-void: #050505;
    --bg-surface: #0c0c0c;
    --bg-elevated: #141414;

    /* Borders & Glass */
    --border-subtle: rgba(255, 255, 255, 0.04);
    --border-default: rgba(255, 255, 255, 0.08);

    /* Elite Accent (The Punch) */
    --accent-glow: rgba(56, 189, 248, 0.15);
    /* Tech Blue Glow */
    --accent-strong: rgba(56, 189, 248, 0.4);

    /* Motion Constants */
    --ease-antigravity: cubic-bezier(0.16, 1, 0.3, 1);
}

/* 1. Spectacular Backgrounds */
body {
    background-color: var(--bg-void) !important;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(56, 189, 248, 0.04), transparent 35%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.04), transparent 35%);
    background-size: 200% 200%;
    animation: nebulaPan 25s ease-in-out infinite alternate;
    color: #fafafa !important;
}

@keyframes nebulaPan {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* 2. High-Fidelity Glass & Surfaces */
.glass {
    background: rgba(12, 12, 12, 0.6) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border: 1px solid var(--border-default) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
}

.glass-arctic {
    background: rgba(15, 23, 42, 0.4) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow:
        0 4px 24px -8px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

/* Overrides for generic elements */
.sidebar {
    background: rgba(15, 23, 42, 0.3) !important;
    backdrop-filter: blur(20px) !important;
    border-right: 1px solid var(--border-subtle) !important;
}

.topbar {
    background: rgba(15, 23, 42, 0.2) !important;
    backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid var(--border-subtle) !important;
}

.card,
.modal-content,
.audit-progress-card {
    background: rgba(30, 41, 59, 0.4) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
    transition: transform 0.4s var(--ease-antigravity), box-shadow 0.4s var(--ease-antigravity) !important;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 20px var(--accent-glow) !important;
}

/* Auth Guard Overrides */
.auth-guard-card {
    background: rgba(15, 23, 42, 0.7) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}


/* ==========================================================
   PARTICLE LOADER COMPONENT (Anti-Generic Replacement)
   ========================================================== */

/* Container */
.particle-loader-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    font-family: 'Inter', sans-serif;
}

.particle-loader-wrapper.inline {
    padding: 0;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

/* Orbital System */
.particle-orbital-system {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.particle-loader-wrapper.inline .particle-orbital-system {
    width: 24px;
    height: 24px;
}

/* Center Orb */
.particle-core-orb {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.6), inset 0 0 10px rgba(255, 255, 255, 0.4);
    animation: orbPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    z-index: 10;
}

.particle-loader-wrapper.inline .particle-core-orb {
    width: 10px;
    height: 10px;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.6);
}

@keyframes orbPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: .7;
        transform: scale(1.1);
        box-shadow: 0 0 40px rgba(59, 130, 246, 0.8);
    }
}

/* Orbiting Satellites */
.particle-satellite {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: orbit 3s linear infinite;
}

.particle-loader-wrapper.inline .particle-satellite {
    animation: orbit 2s linear infinite;
}

.particle-satellite::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #60a5fa;
    box-shadow: 0 0 10px #60a5fa;
}

.particle-loader-wrapper.inline .particle-satellite::before {
    width: 3px;
    height: 3px;
}

.particle-satellite:nth-child(2) {
    animation-delay: -1s;
    animation-duration: 4s;
}

.particle-satellite:nth-child(3) {
    animation-delay: -2s;
    animation-duration: 2.5s;
}

@keyframes orbit {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Ambient Particles */
.particle-ambient {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(52, 211, 153, 0.6);
    animation: particleFloat 4s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

@keyframes particleFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }

    25% {
        transform: translate(15px, -15px) scale(1.2);
        opacity: 0.6;
    }

    50% {
        transform: translate(-10px, -25px) scale(0.8);
        opacity: 0.8;
    }

    75% {
        transform: translate(20px, 10px) scale(1.1);
        opacity: 0.5;
    }
}

.particle-ambient:nth-child(4) {
    top: 20%;
    left: 20%;
    animation-delay: 0.2s;
}

.particle-ambient:nth-child(5) {
    top: 70%;
    left: 80%;
    animation-delay: 1.5s;
    width: 4px;
    height: 4px;
}

.particle-ambient:nth-child(6) {
    top: 80%;
    left: 20%;
    animation-delay: 0.8s;
}

.particle-ambient:nth-child(7) {
    top: 30%;
    left: 80%;
    animation-delay: 2.1s;
    width: 2px;
    height: 2px;
}

/* Text */
.particle-message {
    margin-top: 1.5rem;
    font-weight: 500;
    color: #fafafa;
    letter-spacing: 0.5px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.particle-loader-wrapper.inline .particle-message {
    margin-top: 0;
    font-size: 0.9em;
}

.particle-submessage {
    margin-top: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: rgba(250, 250, 250, 0.5);
}

.particle-loader-wrapper.inline .particle-submessage {
    display: none;
}

/* Wave Bar */
.particle-wave-container {
    display: flex;
    gap: 4px;
    margin-top: 1rem;
    height: 20px;
    align-items: flex-end;
}

.particle-loader-wrapper.inline .particle-wave-container {
    display: none;
}

.particle-wave-bar {
    width: 4px;
    background: linear-gradient(to top, #059669, #34d399);
    border-radius: 2px;
    animation: waveBar 1.2s ease-in-out infinite;
}

@keyframes waveBar {

    0%,
    100% {
        height: 20%;
    }

    50% {
        height: 100%;
        box-shadow: 0 0 8px #34d399;
    }
}

.particle-wave-bar:nth-child(1) {
    animation-delay: 0.0s;
}

.particle-wave-bar:nth-child(2) {
    animation-delay: 0.1s;
}

.particle-wave-bar:nth-child(3) {
    animation-delay: 0.2s;
}

.particle-wave-bar:nth-child(4) {
    animation-delay: 0.3s;
}

.particle-wave-bar:nth-child(5) {
    animation-delay: 0.4s;
}