/* ============================================
   REGOLITH ENGINE - Custom Styles
   ============================================ */

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background: rgba(0, 212, 255, 0.3);
    color: white;
}

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

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00d4ff;
}

/* ============================================
   Starfield Background
   ============================================ */
#starfield {
    background: radial-gradient(ellipse at bottom, #1a1a2e 0%, #0a0a0a 100%);
    overflow: hidden;
}

#starfield::before,
#starfield::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20px 30px, #ffffff, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #ffffff, transparent),
        radial-gradient(2px 2px at 160px 120px, rgba(255,255,255,0.9), transparent),
        radial-gradient(1px 1px at 230px 80px, #ffffff, transparent),
        radial-gradient(2px 2px at 300px 200px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 350px 150px, #ffffff, transparent),
        radial-gradient(2px 2px at 420px 60px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 500px 180px, #ffffff, transparent),
        radial-gradient(2px 2px at 580px 90px, rgba(255,255,255,0.9), transparent);
    background-repeat: repeat;
    background-size: 600px 300px;
    animation: twinkle 8s ease-in-out infinite;
}

#starfield::after {
    background-image:
        radial-gradient(1px 1px at 50px 100px, rgba(0,212,255,0.6), transparent),
        radial-gradient(1px 1px at 150px 50px, rgba(255,255,255,0.5), transparent),
        radial-gradient(2px 2px at 250px 180px, rgba(0,212,255,0.4), transparent),
        radial-gradient(1px 1px at 380px 120px, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 480px 200px, rgba(0,212,255,0.5), transparent),
        radial-gradient(1px 1px at 100px 250px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 200px 300px, rgba(0,212,255,0.3), transparent),
        radial-gradient(2px 2px at 320px 280px, rgba(255,255,255,0.4), transparent);
    background-size: 500px 350px;
    animation: twinkle 12s ease-in-out infinite reverse;
    animation-delay: -4s;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

/* ============================================
   Canvas Container
   ============================================ */
#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#canvas-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* ============================================
   Glassmorphism Cards
   ============================================ */
.glass-card {
    background: rgba(17, 17, 17, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.glass-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(0, 212, 255, 0.1);
}

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

/* ============================================
   Animations
   ============================================ */

/* Float Animation for Logo */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

/* Glow Pulse */
@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 212, 255, 0.4);
    }
}

/* ============================================
   Button Styles
   ============================================ */
button, a {
    cursor: pointer;
}

/* Focus States */
input:focus,
button:focus,
a:focus {
    outline: 2px solid rgba(0, 212, 255, 0.5);
    outline-offset: 2px;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    #starfield::before,
    #starfield::after {
        background-size: 400px 200px;
    }

    .glass-card:hover {
        transform: translateY(-4px);
    }
}

/* ============================================
   Roadmap Timeline Styles
   ============================================ */

/* Trajectory particles animation */
.trajectory-particles {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    overflow: hidden;
}

.trajectory-particles::before,
.trajectory-particles::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(to bottom, transparent, #00d4ff, transparent);
    border-radius: 50%;
    animation: trajectory-flow 3s ease-in-out infinite;
    box-shadow: 0 0 10px #00d4ff, 0 0 20px #00d4ff;
}

.trajectory-particles::after {
    animation-delay: 1.5s;
    height: 15px;
    opacity: 0.6;
}

@keyframes trajectory-flow {
    0% {
        top: -20px;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

/* Roadmap card hover effects */
.roadmap-card.completed {
    border-color: rgba(74, 222, 128, 0.2);
}

.roadmap-card.completed:hover {
    border-color: rgba(74, 222, 128, 0.4);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
                0 0 40px rgba(74, 222, 128, 0.1);
}

.roadmap-card.in-progress {
    border-color: rgba(0, 212, 255, 0.3);
}

.roadmap-card.in-progress:hover {
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
                0 0 40px rgba(0, 212, 255, 0.15);
}

.roadmap-card.future:hover {
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
                0 0 40px rgba(168, 85, 247, 0.1);
}

/* Mobile responsive roadmap */
@media (max-width: 768px) {
    #roadmap .flex.items-center.w-full {
        flex-direction: column;
    }

    #roadmap .w-1\/2 {
        width: 100%;
        padding-left: 3rem;
        padding-right: 1rem;
        text-align: left !important;
    }

    #roadmap .w-1\/2.pr-8 {
        padding-right: 1rem;
        padding-left: 3rem;
    }

    #roadmap .w-1\/2.pl-8 {
        padding-left: 3rem;
        padding-right: 1rem;
    }

    #roadmap .ml-auto {
        margin-left: 0;
    }

    #roadmap .justify-end {
        justify-content: flex-start;
    }

    /* Move center line to left */
    #roadmap .absolute.left-1\/2.transform.-translate-x-1\/2.w-px {
        left: 1rem;
        transform: none;
    }

    #roadmap .trajectory-particles {
        left: 1rem;
        transform: none;
    }

    /* Move nodes to left */
    #roadmap .absolute.left-1\/2.transform.-translate-x-1\/2.z-10 {
        left: 1rem;
        transform: translateX(-50%);
    }

    /* Hide empty columns on mobile */
    #roadmap .w-1\/2:empty {
        display: none;
    }

    /* Adjust card max-width on mobile */
    #roadmap .max-w-md {
        max-width: 100%;
    }
}

/* ============================================
   Loading State for 3D
   ============================================ */
#canvas-container.loading::after {
    content: 'Loading 3D Model...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(0, 212, 255, 0.5);
    font-family: 'Roboto Mono', monospace;
    font-size: 12px;
    letter-spacing: 2px;
}

/* ============================================
   Hero Section Overlay Gradient
   ============================================ */
#hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to top, #0a0a0a, transparent);
    pointer-events: none;
    z-index: 5;
}

/* ============================================
   Text Gradient Animation (Optional)
   ============================================ */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animated-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
}

/* ============================================
   Noise Texture Overlay (Subtle)
   ============================================ */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    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");
    opacity: 0.02;
    pointer-events: none;
    z-index: 1000;
}
