/* Main styles linked in HTML */

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

@supports not (scroll-behavior: smooth) {
    html {
        scroll-behavior: auto;
    }
}

.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background: transparent;
}

/* Stars layers */
.stars-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Base star styles */
.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0;
    animation: twinkle linear infinite;
}

/* Distant stars (small, slow) */
.star-distant {
    width: 1px;
    height: 1px;
    box-shadow: 0 0 2px rgba(255, 255, 255, 0.5);
}

/* Medium stars (normal) */
.star-medium {
    width: 2px;
    height: 2px;
    box-shadow: 0 0 3px rgba(255, 255, 255, 0.8);
}

/* Close stars (large, bright) */
.star-close {
    width: 3px;
    height: 3px;
    box-shadow: 0 0 4px rgba(255, 255, 255, 1),
                0 0 8px rgba(0, 240, 255, 0.3);
}

/* Shooting stars (meteors) - Class 1: Smaller overall */
.shooting-star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 6px white,
                0 0 12px rgba(0, 240, 255, 1),
                0 0 20px rgba(0, 240, 255, 0.8);
    animation: shoot linear forwards;
    /* CSS variables set by JavaScript */
    --shoot-x: -300px;
    --shoot-y: 300px;
    --shoot-angle: -45deg;
}

.shooting-star::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 12px;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 1) 0%,
        rgba(0, 240, 255, 0.95) 10%,
        rgba(0, 240, 255, 0.8) 30%,
        rgba(0, 240, 255, 0.5) 60%,
        transparent 100%);
    transform-origin: 100% 50%;
    /* Rotate opposite to movement + 180deg to point behind */
    transform: translate(-50%, -50%) rotate(calc(var(--shoot-angle) + 180deg));
    pointer-events: none;
    filter: blur(2px);
}

/* Burst/flock shooting stars (Class 2) - longer tails */
.shooting-star.shooting-star-burst::after {
    width: 1500px;
    height: 18px;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 1) 0%,
        rgba(0, 240, 255, 0.95) 10%,
        rgba(0, 240, 255, 0.8) 25%,
        rgba(0, 240, 255, 0.6) 50%,
        rgba(0, 240, 255, 0.4) 70%,
        rgba(123, 47, 247, 0.3) 85%,
        transparent 100%);
    filter: blur(4px);
}

/* Colorful meteor shower (Class 3) - EXACTLY like class 2 but with longer tails and more colors */
.shooting-star.shooting-star-colorful::after {
    width: 2500px;
    height: 20px;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 1) 0%,
        rgba(0, 240, 255, 0.95) 8%,
        rgba(123, 47, 247, 0.9) 15%,
        rgba(255, 20, 147, 0.85) 22%,
        rgba(0, 240, 255, 0.8) 30%,
        rgba(255, 150, 50, 0.75) 38%,
        rgba(123, 47, 247, 0.7) 45%,
        rgba(0, 255, 200, 0.65) 52%,
        rgba(255, 20, 147, 0.6) 58%,
        rgba(123, 47, 247, 0.55) 65%,
        rgba(0, 240, 255, 0.5) 72%,
        rgba(255, 150, 50, 0.45) 78%,
        rgba(123, 47, 247, 0.4) 83%,
        rgba(0, 255, 200, 0.35) 87%,
        rgba(255, 20, 147, 0.3) 90%,
        rgba(123, 47, 247, 0.25) 93%,
        transparent 100%);
    filter: blur(4px);
}

/* Nebula clouds (cosmic gas clouds) */
.nebula-cloud {
    position: absolute;
    /* Size set by JavaScript (150-800px) */
    border-radius: 50%;
    /* Filter set by JavaScript for varied blur */
    opacity: 0;
    animation: nebulaDrift ease-in-out infinite;
    --nebula-drift-x: -100px;
    --nebula-drift-y: 50px;
}

/* Galaxy glows (pulsing) */
.galaxy-glow {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, 
        rgba(138, 43, 226, 0.15) 0%, 
        rgba(0, 191, 255, 0.1) 50%,
        transparent 100%);
    filter: blur(20px);
    opacity: 0;
    animation: galaxyPulse ease-in-out infinite;
}

/* Asteroids (floating rocks) */
.asteroid {
    position: absolute;
    background: linear-gradient(135deg, 
        rgba(180, 180, 180, 0.9) 0%, 
        rgba(100, 100, 100, 1) 100%);
    border-radius: 40% 60% 50% 70%;
    box-shadow: inset -3px -3px 6px rgba(0, 0, 0, 0.6),
                inset 2px 2px 4px rgba(255, 255, 255, 0.2),
                0 0 12px rgba(150, 150, 150, 0.4);
    animation: asteroidFloat linear forwards, asteroidRotate linear infinite;
    --asteroid-x: 1000px;
    --asteroid-y: 0px;
    --rotation-duration: 15s;
}

/* Planets (distant spheres) */
.planet {
    position: absolute;
    border-radius: 50%;
    animation: planetOrbit linear forwards;
    filter: blur(1px);
}

.planet-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotateX(75deg);
    border: 2px solid rgba(200, 200, 200, 0.3);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(200, 200, 200, 0.2);
}

/* Comets (rare, dramatic) */
.comet {
    position: absolute;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px white,
                0 0 20px rgba(0, 240, 255, 1),
                0 0 30px rgba(0, 240, 255, 0.6);
    animation: cometFly linear forwards;
    --comet-x: -800px;
    --comet-y: 800px;
    --comet-angle: -45deg;
}

.comet::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 4px;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 1) 0%,
        rgba(0, 240, 255, 0.9) 20%,
        rgba(0, 240, 255, 0.6) 40%,
        rgba(138, 43, 226, 0.4) 70%,
        transparent 100%);
    transform-origin: 100% 50%;
    /* Rotate opposite to movement + 180deg to point behind */
    transform: translate(-50%, -50%) rotate(calc(var(--comet-angle) + 180deg));
    filter: blur(2px);
    pointer-events: none;
}

.comet::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 8px;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.8) 0%,
        rgba(0, 240, 255, 0.6) 30%,
        transparent 100%);
    transform-origin: 100% 50%;
    /* Rotate opposite to movement + 180deg to point behind */
    transform: translate(-50%, -50%) rotate(calc(var(--comet-angle) + 180deg));
    filter: blur(4px);
    pointer-events: none;
}

/* Animations */
@keyframes twinkle {
    0%, 100% {
        opacity: 0;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes shoot {
    0% {
        transform: translate(0, 0);
        opacity: 1;
    }
    100% {
        transform: translate(var(--shoot-x), var(--shoot-y));
        opacity: 0;
    }
}

@keyframes nebulaDrift {
    0% {
        transform: translate(0, 0) scale(0.9);
        opacity: 0;
    }
    15% {
        opacity: 0.6;
    }
    50% {
        transform: translate(calc(var(--nebula-drift-x) * 0.5), calc(var(--nebula-drift-y) * 0.5)) scale(1.1);
        opacity: 1;
    }
    85% {
        opacity: 0.6;
    }
    100% {
        transform: translate(var(--nebula-drift-x), var(--nebula-drift-y)) scale(0.9);
        opacity: 0;
    }
}

@keyframes galaxyPulse {
    0%, 100% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes asteroidFloat {
    0% {
        transform: translate(0, 0);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translate(var(--asteroid-x), var(--asteroid-y));
        opacity: 0;
    }
}

@keyframes asteroidRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes planetOrbit {
    0% {
        transform: translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.9;
    }
    90% {
        opacity: 0.9;
    }
    100% {
        transform: translateX(var(--planet-direction));
        opacity: 0;
    }
}

@keyframes cometFly {
    0% {
        transform: translate(0, 0);
        opacity: 1;
    }
    100% {
        transform: translate(var(--comet-x), var(--comet-y));
        opacity: 0;
    }
}

/* Spaceships with afterburners */
.spaceship {
    position: absolute;
    width: 20px;
    height: 8px;
    animation: shipFly linear forwards;
    --ship-x: 1000px;
    --ship-y: 0px;
    --ship-angle: 0deg;
}

/* Ship body (horizontal design, container handles rotation) */
.spaceship::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 8px;
    background: linear-gradient(90deg, 
        rgba(200, 200, 200, 0.9) 0%,
        rgba(150, 150, 150, 0.8) 100%);
    border-radius: 0 50% 50% 0;
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.6);
    /* No rotation - container handles it */
}

/* Afterburner trail (points behind ship, container handles rotation) */
.spaceship::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 50px;
    height: 6px;
    background: linear-gradient(90deg, 
        rgba(255, 150, 50, 0.9) 0%,
        rgba(255, 100, 0, 0.7) 50%,
        rgba(0, 240, 255, 0.5) 80%,
        transparent 100%);
    transform-origin: 100% 50%;
    transform: translateY(-50%) translateX(-50px);
    filter: blur(2px);
    animation: afterburnerPulse 0.1s ease-in-out infinite;
}

@keyframes shipFly {
    0% {
        transform: translate(0, 0) rotate(var(--ship-angle));
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translate(var(--ship-x), var(--ship-y)) rotate(var(--ship-angle));
        opacity: 0;
    }
}

@keyframes afterburnerPulse {
    0%, 100% {
        opacity: 1;
        transform: translateY(-50%) translateX(-50px) scaleX(1);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-50%) translateX(-50px) scaleX(1.2);
    }
}

/* Rocket ships (vertical launches with bright afterburners) */
.rocket-ship {
    position: absolute;
    width: 12px;
    height: 30px;
    animation: rocketLaunch linear forwards;
    --rocket-x: 0px;
    --rocket-y: -1000px;
    --rocket-angle: -90deg;
}

/* Rocket body (sleek vertical design) */
.rocket-ship::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 12px;
    height: 30px;
    background: linear-gradient(180deg, 
        rgba(220, 220, 220, 0.95) 0%,
        rgba(180, 180, 180, 0.9) 50%,
        rgba(150, 150, 150, 0.85) 100%);
    border-radius: 50% 50% 20% 20%;
    box-shadow: 0 0 10px rgba(255, 150, 50, 0.8),
                inset 2px 0 4px rgba(255, 255, 255, 0.3);
    transform-origin: 50% 100%;
    /* Rocket is vertical by default, so add 90deg to align with angle */
    transform: rotate(calc(var(--rocket-angle) + 90deg));
}

/* Bright rocket afterburner (points behind rocket) */
.rocket-ship::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    width: 16px;
    height: 60px;
    background: linear-gradient(180deg, 
        rgba(255, 200, 100, 1) 0%,
        rgba(255, 150, 50, 0.9) 30%,
        rgba(255, 100, 0, 0.7) 60%,
        rgba(0, 240, 255, 0.4) 85%,
        transparent 100%);
    transform-origin: 50% 0%;
    /* Afterburner rotates with rocket body */
    transform: translateX(-50%) rotate(calc(var(--rocket-angle) + 90deg));
    filter: blur(3px);
    animation: rocketBurn 0.08s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(255, 150, 50, 0.8);
}

@keyframes rocketLaunch {
    0% {
        transform: translate(0, 0);
        opacity: 0;
    }
    5% {
        transform: translate(0, 0);
        opacity: 1;
    }
    95% {
        transform: translate(var(--rocket-x), var(--rocket-y));
        opacity: 1;
    }
    100% {
        transform: translate(var(--rocket-x), var(--rocket-y));
        opacity: 0;
    }
}

@keyframes rocketBurn {
    0%, 100% {
        opacity: 1;
        transform: translateX(-50%) rotate(calc(var(--rocket-angle) + 90deg)) scaleY(1);
    }
    50% {
        opacity: 0.9;
        transform: translateX(-50%) rotate(calc(var(--rocket-angle) + 90deg)) scaleY(1.3);
    }
}

/* === V2 OVERRIDES === */
body {
    display: block !important;
    padding-top: 120px !important;
    height: auto !important;
    min-height: 100vh;
    overflow-y: auto !important;
}

/* Ensure all content is above stars */
.main-grid,
.content-section,
footer {
    position: relative;
    z-index: 1;
}

/* Sticky nav must stay fixed at top */
.sticky-nav {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
    background: linear-gradient(180deg, rgba(26, 28, 32, 0.95) 0%, rgba(26, 28, 32, 0.9) 100%) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 2px solid rgba(241, 7, 163, 0.3) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
}

.sticky-nav .nav-container {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
}

.main-grid {
    transform: none !important;
    margin: 0 auto 4rem auto !important;
    max-width: 1200px !important;
    width: 100% !important;
    left: auto !important;
    top: auto !important;
    display: grid !important;
}

@media (min-width: 769px) {
    .main-grid {
        grid-template-rows: 1fr auto !important;
        transform: none !important;
    }
}


/* === MODEL INFO OVERLAY === */
/* Styles inherited from ../style.css (v1) - no overrides needed */


/* MYTHOS logo split effect */
.nav-logo {
    perspective: 600px !important;
    transform-style: preserve-3d !important;
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
}

/* Logo image styling in sticky nav */
.sticky-nav .nav-logo img {
    height: 32px !important;
    width: auto !important;
    max-height: 32px !important;
    display: block !important;
    object-fit: contain !important;
}


/* Space dust particles (subtle ambient) */
.space-dust {
    position: absolute;
    background: rgba(200, 200, 200, 0.3);
    border-radius: 50%;
    animation: dustDrift linear infinite;
}

@keyframes dustDrift {
    0% {
        transform: translate(0, 0);
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        transform: translate(100px, -50px);
        opacity: 0.3;
    }
}

/* Star clusters (distant glowing groups) */
.star-cluster {
    position: absolute;
    border-radius: 50%;
    animation: clusterPulse ease-in-out infinite;
    filter: blur(15px);
}

@keyframes clusterPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.2);
    }
}
