/* ===== RESET ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #020208;
    --accent: #00e5ff;
    --accent-dim: rgba(0,229,255,0.25);
    --purple: #8b5cf6;
    --magenta: #e91e90;
    --text: #ffffff;
    --text-dim: rgba(255,255,255,0.5);
    --text-dark: rgba(255,255,255,0.25);
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    cursor: crosshair;
}

::selection {
    background: var(--accent);
    color: var(--bg);
}

::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); }

/* ===== NEBULA CLOUDS ===== */
.nebula {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.nc {
    position: absolute;
    border-radius: 50%;
    animation: nebula-drift 30s ease-in-out infinite;
}

.nc-1 {
    width: 700px; height: 700px;
    background: radial-gradient(circle, rgba(100,20,180,0.15), transparent 70%);
    top: -10%; left: -5%;
    animation-duration: 35s;
}

.nc-2 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(20,50,200,0.12), transparent 70%);
    top: 40%; right: -10%;
    animation-duration: 40s;
    animation-delay: -10s;
}

.nc-3 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(200,20,120,0.10), transparent 70%);
    bottom: -5%; left: 30%;
    animation-duration: 45s;
    animation-delay: -20s;
}

.nc-4 {
    width: 450px; height: 450px;
    background: radial-gradient(circle, rgba(20,180,160,0.08), transparent 70%);
    top: 20%; left: 60%;
    animation-duration: 38s;
    animation-delay: -5s;
}

.nc-5 {
    width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(140,80,255,0.10), transparent 70%);
    top: 60%; left: 10%;
    animation-duration: 42s;
    animation-delay: -15s;
}

@keyframes nebula-drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(60px, -40px) scale(1.05); }
    50% { transform: translate(-30px, 50px) scale(0.95); }
    75% { transform: translate(40px, 20px) scale(1.02); }
}

/* ===== CANVAS ===== */
#space {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* ===== SPACESHIP ===== */
.ship-wrapper {
    position: fixed;
    z-index: 10;
    top: 46%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: ship-float 7s ease-in-out infinite;
}

.ship-svg {
    width: 360px;
    height: auto;
    display: block;
    filter: drop-shadow(0 0 20px rgba(0,229,255,0.08));
}

@keyframes ship-float {
    0%, 100% { transform: translate(-50%, -50%) translateY(0px) rotate(-0.8deg); }
    50% { transform: translate(-50%, -50%) translateY(-22px) rotate(0.8deg); }
}

/* ===== ENGINE TRAILS ===== */
.engine-trail {
    position: absolute;
    top: 50%;
    border-radius: 50%;
    pointer-events: none;
}

.et-1 {
    right: -50px;
    transform: translateY(-50%);
    width: 70px;
    height: 8px;
    background: linear-gradient(to right, rgba(0,229,255,0.5), rgba(0,229,255,0.08), transparent);
    filter: blur(2px);
    animation: et-pulse-1 1.2s ease-in-out infinite;
}

.et-2 {
    right: -90px;
    transform: translateY(-50%);
    width: 110px;
    height: 14px;
    background: linear-gradient(to right, rgba(0,229,255,0.2), rgba(0,180,255,0.04), transparent);
    filter: blur(6px);
    animation: et-pulse-2 1.5s ease-in-out infinite;
}

.et-3 {
    right: -130px;
    transform: translateY(-50%);
    width: 150px;
    height: 22px;
    background: linear-gradient(to right, rgba(0,229,255,0.08), rgba(0,150,255,0.02), transparent);
    filter: blur(10px);
    animation: et-pulse-3 1.8s ease-in-out infinite;
}

@keyframes et-pulse-1 {
    0%, 100% { opacity: 1; width: 70px; }
    50% { opacity: 0.7; width: 55px; }
}

@keyframes et-pulse-2 {
    0%, 100% { opacity: 1; width: 110px; }
    50% { opacity: 0.6; width: 90px; }
}

@keyframes et-pulse-3 {
    0%, 100% { opacity: 1; width: 150px; }
    50% { opacity: 0.5; width: 120px; }
}

/* ===== UI OVERLAY ===== */
.ui-overlay {
    position: fixed;
    z-index: 20;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    padding-top: 20vh;
}

.ui-top {
    position: fixed;
    top: 28px;
    left: 32px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 30;
}

.status-light {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-dim);
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.status-text {
    font-family: var(--font-display);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: var(--text-dark);
    text-transform: uppercase;
}

.main-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 7rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(255,255,255,0.7);
    text-shadow: 0 0 60px rgba(0,229,255,0.15);
    margin-bottom: 12px;
    animation: title-in 2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

@keyframes title-in {
    0% { opacity: 0; transform: translateY(30px); letter-spacing: 0.3em; }
    100% { opacity: 1; transform: translateY(0); letter-spacing: 0.08em; }
}

.main-sub {
    font-family: var(--font-display);
    font-size: clamp(0.9rem, 2vw, 1.3rem);
    font-weight: 300;
    color: var(--text-dim);
    letter-spacing: 0.15em;
    margin-bottom: 28px;
    animation: fade-up 2s 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

@keyframes fade-up {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.title-line {
    width: 50px;
    height: 1px;
    background: var(--accent);
    opacity: 0.4;
    margin-bottom: 28px;
    animation: fade-up 2s 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.coords {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    animation: fade-up 2s 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.coord-label {
    color: var(--text-dark);
    font-size: 0.6rem;
}

.coord-value {
    color: var(--accent);
}

.coord-sep {
    color: rgba(255,255,255,0.1);
    font-size: 0.5rem;
}

/* ===== SCANLINES ===== */
.scanlines {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 50;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.02) 2px,
        rgba(0,0,0,0.02) 4px
    );
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .ship-svg {
        width: 240px;
    }
    .et-1 { right: -35px; width: 50px; }
    .et-2 { right: -60px; width: 75px; }
    .et-3 { right: -85px; width: 100px; }
    .ui-overlay {
        padding-top: 25vh;
    }
    .coords {
        font-size: 0.6rem;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .ship-svg {
        width: 180px;
    }
    .et-1 { right: -25px; width: 40px; height: 6px; }
    .et-2 { right: -45px; width: 60px; height: 10px; }
    .et-3 { display: none; }
}