/* 
    ELITE GUARDIAN V4 - PREMIUM DESIGN SYSTEM 
    Author: Antigravity AI
*/

html {
    scroll-behavior: smooth;
}

:root {
    --elite-primary: 0, 194, 255;
    --elite-accent: 92, 124, 255;
    --elite-glass: rgba(10, 15, 29, 0.6);
    --elite-border: rgba(255, 255, 255, 0.08);
    --elite-glow: rgba(var(--elite-primary), 0.5);
    --elite-text: #e2e8f0;
    --elite-grain-opacity: 0; /* Removed grain 'purici' for a cleaner look */
    --elite-pulse-speed: 6s;
}

/* ── MODERN TYPOGRAPHY ── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;900&display=swap');

html {
    scroll-behavior: initial; /* Lenis handles this */
}

.elite-body {
    font-family: 'Outfit', sans-serif !important;
    background-color: #0a0f1d;
    color: var(--elite-text);
    perspective: 1200px; /* Essential for 3D Tilt */
    -webkit-font-smoothing: antialiased;
}

/* ── GRAIN OVERLAY ── */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: var(--elite-grain-opacity);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* ── GLASSMORPHISM V2 (REFINED) ── */
.glass-v2 {
    background: var(--elite-glass);
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    border: 1px solid var(--elite-border);
    box-shadow: 
        0 25px 80px -12px rgba(0, 0, 0, 0.6),
        inset 0 0 20px rgba(255, 255, 255, 0.02); /* Inner subtle glow */
    transition: transform 0.2s cubic-bezier(0.2, 0, 0.2, 1), 
                box-shadow 0.5s ease, 
                border-color 0.5s ease;
    transform-style: preserve-3d;
}

.glass-v2::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1),
        transparent 40%,
        transparent 60%,
        rgba(var(--elite-primary), 0.1)
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.glass-v2:hover {
    border-color: rgba(var(--elite-primary), 0.4);
    box-shadow: 
        0 40px 100px -20px rgba(0, 0, 0, 0.8),
        0 0 30px rgba(var(--elite-primary), 0.2);
}

/* ── LIGHT SWEEP ANIMATION (REFINED) ── */
.light-sweep {
    position: relative;
    overflow: hidden;
}

.light-sweep::after {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 0%,
        transparent 45%,
        rgba(255, 255, 255, 0.08) 50%,
        transparent 55%,
        transparent 100%
    );
    transform: rotate(-45deg);
    transition: none;
    pointer-events: none;
}

.glass-v2:hover .light-sweep::after,
.light-sweep.active::after {
    animation: sweep 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes sweep {
    0% { transform: translate(-100%, -100%) rotate(-45deg); }
    100% { transform: translate(100%, 100%) rotate(-45deg); }
}

/* ── PULSE GLOW ── */
.pulse-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(var(--elite-primary), 0.12) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.5;
    animation: pulse-glow-anim var(--elite-pulse-speed) ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes pulse-glow-anim {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.4; }
    50% { transform: translate(-50%, -50%) scale(1.3); opacity: 0.7; }
}

/* ── GLASS V3 (ULTRA FINE & FROSTED) ── */
.glass-v3 {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 40px 100px -20px rgba(0, 0, 0, 0.8),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05); /* Technical inner edge */
}

.glass-v3:hover {
    border-color: rgba(var(--elite-primary), 0.3);
    background: rgba(255, 255, 255, 0.05);
}

/* ── TEXT ENHANCEMENTS ── */
.text-glow {
    text-shadow: 0 0 15px rgba(var(--elite-primary), 0.4);
}

.text-glow-strong {
    text-shadow: 0 0 25px rgba(var(--elite-primary), 0.7);
}

.elite-title-gradient {
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.6) 100%);
    -webkit-background-clip: text;
    background-clip: text; /* Fixed lint error */
    -webkit-text-fill-color: transparent;
}

/* ── PREMIUM ANIMATIONS (REVEAL) ── */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.2, 1, 0.3, 1);
    will-change: transform, opacity;
}

[data-reveal="left"] { transform: translateX(-30px); }
[data-reveal="right"] { transform: translateX(30px); }

.reveal-active {
    opacity: 1 !important;
    transform: translate(0, 0) !important;
}

/* ── HUD & TECHNICAL ELEMENTS ── */
.scanning-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, transparent, rgba(var(--elite-primary), 0.5), transparent);
    animation: scan 3s linear infinite;
    pointer-events: none;
    z-index: 5;
    opacity: 0.3;
}

@keyframes scan {
    0% { top: -5%; opacity: 0; }
    50% { opacity: 0.5; }
    100% { top: 105%; opacity: 0; }
}

.hud-label {
    font-family: monospace;
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 4px;
}

.node-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    background: rgba(var(--elite-primary), 0.05);
    border: 1px solid rgba(var(--elite-primary), 0.2);
    border-radius: 4px;
    font-family: monospace;
    font-size: 9px;
    text-transform: uppercase;
    color: rgba(var(--elite-primary), 0.8);
}

.node-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(var(--elite-primary), 1);
    box-shadow: 0 0 6px rgba(var(--elite-primary), 0.8);
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.5); }
}

/* ── CUSTOM CURSOR ── */
.elite-cursor {
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10001;
    mix-blend-mode: difference;
    transition: transform 0.15s ease-out;
}

.elite-cursor-follower {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(var(--elite-primary), 0.15) 0%, transparent 70%);
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: transform 0.1s linear;
}

/* ── CINEMATIC OVERLAYS ── */
.vignette-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 30%, rgba(0,0,0,0.6) 100%);
    pointer-events: none;
    z-index: 5;
}

.noise-overlay {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3%3Cfilter id='noiseFilter'%3%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3%3C/filter%3%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3%3C/svg%3");
    opacity: 0.05;
    pointer-events: none;
    z-index: 6;
}

/* ── PREMIUM TITLE STYLES ── */
.glass-text {
    position: relative;
    background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,0.7) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.glass-text::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        120deg, 
        transparent 30%, 
        rgba(255,255,255,0.3) 50%, 
        transparent 70%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    animation: text-sheen 6s infinite linear;
    pointer-events: none;
}

@keyframes text-sheen {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ── GLASS BUTTON PREMIUM ── */
.glass-btn-premium {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-btn-premium::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(var(--elite-primary), 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.8s ease;
}

.glass-btn-premium:hover::before {
    transform: translateX(100%);
}

.glass-btn-premium:hover {
    border-color: rgba(var(--elite-primary), 0.5);
    background: rgba(var(--elite-primary), 0.05);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.hud-data-tag {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.02);
    padding: 2px 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

/* ── SUPER PREMIUM (VAULT) STYLES ── */
.glass-v4 {
    background: rgba(10, 15, 29, 0.4);
    backdrop-filter: blur(80px) saturate(180%);
    -webkit-backdrop-filter: blur(80px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 
        0 4px 24px -1px rgba(0, 0, 0, 0.3),
        inset 0 0 1px 1px rgba(255, 255, 255, 0.02);
}

.premium-border {
    position: relative;
    border-radius: inherit;
}

.premium-border::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: conic-gradient(
        from 0deg at 50% 50%,
        rgba(255, 255, 255, 0.1) 0deg,
        rgba(255, 255, 255, 0) 60deg,
        rgba(var(--elite-primary), 0.3) 120deg,
        rgba(255, 255, 255, 0) 180deg,
        rgba(255, 255, 255, 0.1) 240deg,
        rgba(255, 255, 255, 0) 300deg,
        rgba(255, 255, 255, 0.1) 360deg
    );
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 10;
}

.light-sweep {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        transparent,
        rgba(255, 255, 255, 0.03) 50%,
        transparent
    );
    transform: skewX(-25deg);
    animation: sweep 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 2;
}

@keyframes sweep {
    0% { left: -100%; opacity: 0; }
    10% { opacity: 0.5; }
    30% { left: 150%; opacity: 0; }
    100% { left: 150%; opacity: 0; }
}

/* ── 3D ELEMENTS ── */
.tilt-card {
    will-change: transform;
    transition: transform 0.1s ease-out;
}

.tilt-inner {
    transform: translateZ(50px);
}

/* ── SPARKLINE ENHANCEMENT ── */
.sparkline-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: dash 6s cubic-bezier(0.4, 0, 0.2, 1) forwards infinite;
    filter: drop-shadow(0 0 5px rgba(var(--elite-primary), 0.5));
}
