@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

body {
    font-family: 'Space Grotesk', sans-serif;
    background: #060a12;
}

.mono {
    font-family: 'JetBrains Mono', monospace;
}

/* Grid background */
.grid-bg {
    background-image: 
        linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

/* Radar sweep */
.radar-sweep {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0deg, rgba(0, 255, 136, 0.15) 30deg, transparent 60deg);
    animation: radarSweep 4s linear infinite;
    opacity: 0.5;
}

@keyframes radarSweep {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Radar rings */
.radar-ring {
    position: absolute;
    border: 1px solid rgba(0, 255, 136, 0.1);
    border-radius: 50%;
    animation: radarPulse 3s ease-out infinite;
}

@keyframes radarPulse {
    0% { transform: scale(0.8); opacity: 0.5; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* Blips */
.blip {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 20px #00ff88, 0 0 40px #00ff88;
    animation: blipPulse 2s ease-in-out infinite;
}

.blip-red {
    background: #ff3366;
    box-shadow: 0 0 20px #ff3366, 0 0 40px #ff3366;
}

.blip-blue {
    background: #00d4ff;
    box-shadow: 0 0 20px #00d4ff, 0 0 40px #00d4ff;
}

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

/* Scan line */
.scan-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.3), transparent);
    animation: scanLine 3s linear infinite;
}

@keyframes scanLine {
    0% { top: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* Floating data */
.float-data {
    animation: floatData 6s ease-in-out infinite;
}

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

/* Glow text */
.glow-green {
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.5), 0 0 40px rgba(0, 255, 136, 0.3);
}

.glow-red {
    text-shadow: 0 0 20px rgba(255, 51, 102, 0.5), 0 0 40px rgba(255, 51, 102, 0.3);
}

.glow-purple {
    text-shadow: 0 0 20px rgba(153, 69, 255, 0.5), 0 0 40px rgba(153, 69, 255, 0.3);
}

/* Ticker tape */
.ticker-wrap {
    overflow: hidden;
    background: rgba(0, 255, 136, 0.05);
    border-top: 1px solid rgba(0, 255, 136, 0.1);
    border-bottom: 1px solid rgba(0, 255, 136, 0.1);
}

.ticker {
    display: flex;
    width: max-content;
    animation: ticker 40s linear infinite;
}

.ticker-item {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 2rem;
    padding-right: 2rem;
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Input glow */
.input-glow:focus {
    box-shadow: 0 0 0 2px rgba(153, 69, 255, 0.3), 0 0 20px rgba(153, 69, 255, 0.2);
}

/* Button hover effect */
.btn-radar {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.btn-radar:hover::before {
    left: 100%;
}

.btn-radar:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(153, 69, 255, 0.3);
}

/* Card glass effect */
.glass-card {
    background: rgba(10, 15, 26, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 255, 136, 0.1);
}

/* Status indicator */
.status-live {
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Noise overlay */
.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ==================== */
/* PARTICLE BACKGROUND */
/* ==================== */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(0, 255, 136, 0.5);
    border-radius: 50%;
    animation: particleFloat linear infinite;
}

.particle:nth-child(odd) {
    background: rgba(0, 212, 255, 0.4);
}

.particle:nth-child(3n) {
    background: rgba(255, 51, 102, 0.3);
    width: 2px;
    height: 2px;
}

.particle:nth-child(5n) {
    background: rgba(153, 69, 255, 0.4);
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

/* ==================== */
/* ANIMATED GRADIENT */
/* ==================== */
.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        #060a12 0%,
        #0a1628 25%,
        #060a12 50%,
        #120a18 75%,
        #060a12 100%
    );
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: -1;
}

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

/* ==================== */
/* GLITCH TEXT EFFECT */
/* ==================== */
.glitch {
    position: relative;
    display: inline-block;
}

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

.glitch::before {
    color: #00ff88;
    animation: glitchTop 3s infinite linear alternate-reverse;
    clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
}

.glitch::after {
    color: #ff3366;
    animation: glitchBottom 2.5s infinite linear alternate-reverse;
    clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
}

@keyframes glitchTop {
    0%, 90%, 100% { transform: translate(0); opacity: 0; }
    92% { transform: translate(-3px, -1px); opacity: 1; }
    94% { transform: translate(3px, 1px); opacity: 1; }
    96% { transform: translate(-2px, 0); opacity: 1; }
    98% { transform: translate(2px, -1px); opacity: 1; }
}

@keyframes glitchBottom {
    0%, 90%, 100% { transform: translate(0); opacity: 0; }
    91% { transform: translate(2px, 1px); opacity: 1; }
    93% { transform: translate(-3px, 0); opacity: 1; }
    95% { transform: translate(1px, -1px); opacity: 1; }
    97% { transform: translate(-2px, 1px); opacity: 1; }
}

/* ==================== */
/* TYPING EFFECT */
/* ==================== */
.typing-container {
    display: inline-block;
}

.typing-text {
    display: inline-block;
    overflow: hidden;
    border-right: 2px solid #00ff88;
    white-space: nowrap;
    animation: 
        typing 3s steps(30, end) forwards,
        blinkCursor 0.75s step-end infinite;
}

.typing-text-second {
    display: inline-block;
    overflow: hidden;
    border-right: 2px solid #00ff88;
    white-space: nowrap;
    opacity: 0;
    animation: 
        typing 2.5s steps(35, end) forwards,
        blinkCursor 0.75s step-end infinite,
        fadeIn 0.1s ease forwards;
    animation-delay: 3.2s, 3.2s, 3.2s;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blinkCursor {
    from, to { border-color: transparent; }
    50% { border-color: #00ff88; }
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* ==================== */
/* MOBILE RESPONSIVE */
/* ==================== */
@media (max-width: 768px) {
    /* Reduce particles on mobile for performance */
    .particle:nth-child(n+25) {
        display: none;
    }
    
    /* Hide radar animation on small screens */
    .radar-sweep,
    .radar-ring {
        display: none;
    }
    
    /* Adjust typing effect for mobile */
    .typing-text,
    .typing-text-second {
        white-space: normal;
        border-right: none;
        animation: fadeInText 1s ease forwards;
    }
    
    .typing-text-second {
        animation-delay: 1s;
    }
    
    @keyframes fadeInText {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    /* Reduce glow effects for better performance */
    .glow-green {
        text-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
    }
    
    .glow-red {
        text-shadow: 0 0 10px rgba(255, 51, 102, 0.4);
    }
    
    .glow-purple {
        text-shadow: 0 0 10px rgba(153, 69, 255, 0.4);
    }
    
    /* Smaller blips on mobile */
    .blip {
        width: 6px;
        height: 6px;
    }
    
    /* Adjust glass card */
    .glass-card {
        backdrop-filter: blur(10px);
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .ticker-item {
        gap: 1rem;
        padding-right: 1rem;
    }
    
    /* Hide more particles */
    .particle:nth-child(n+15) {
        display: none;
    }
    
    /* Simplify glitch on very small screens */
    .glitch::before,
    .glitch::after {
        display: none;
    }
}
