:root {
    /* --- Nebula Theme Tokens --- */
    --bg-space: #05070a;
    --nebula-jade: #2de29b;
    --nebula-purple: #8b5cf6;
    --text-main: #e2e8f0;

    /* Legacy/Shared mappings */
    --jadeite: var(--nebula-jade);
    --hot-pink: var(--nebula-purple);
    --grid-color: var(--nebula-jade);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-space);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, sans-serif;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;

    /* Creating the 'Nebula' effect with radial gradients */
    background-image:
        radial-gradient(circle at 50% 50%, rgba(45, 226, 155, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 40%);
    background-attachment: fixed;
}

/* --- The World (Legacy elements) --- */
.world {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
    perspective: 100vh;
}

/* Stars: Hidden for Nebula theme */
.stars {
    display: none;
}

/* Retro Sun: Hidden for Nebula theme */
.sun {
    display: none;
}

/* Grid: Kept but subtly integrated */
.ground-grid {
    position: absolute;
    bottom: -50%;
    left: -50%;
    width: 200%;
    height: 100%;
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 60px 60px;
    transform: rotateX(75deg);
    animation: gridMove 1.5s linear infinite;
    z-index: 0;
    opacity: 0.15;
    /* Very subtle in nebula */
    mask-image: linear-gradient(to top, black 0%, transparent 80%);
    -webkit-mask-image: linear-gradient(to top, black 0%, transparent 80%);
}

/* --- Foreground (Floating Content) --- */
.glass-card {
    position: relative;
    z-index: 100;
    text-align: center;
    padding: 3rem 4rem;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    max-width: 800px;
    width: 90%;
    animation: float 6s ease-in-out infinite;
}

h1.glitch {
    font-family: 'Orbitron', sans-serif;
    font-weight: 800;
    /* from user request */
    font-size: 7rem;
    margin: 0;
    letter-spacing: 0.1em;
    /* from user request */
    position: relative;

    /* Nebula Text Style */
    color: var(--text-main);
    text-shadow: 0 0 20px var(--nebula-jade), 0 0 40px rgba(45, 226, 155, 0.3);

    /* Removed gradient background clip to allow simple text shadow */
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: initial;
    filter: none;
}

.mascot-heart {
    width: 300px;
    height: auto;
    margin-bottom: -40px;
    /* Slight overlap with text for depth */
    filter: drop-shadow(0 0 30px rgba(4, 255, 178, 0.3));
    /* Jade glow */
    animation: float 8s ease-in-out infinite reverse;
    /* Counter-float to container */
    position: relative;
    z-index: 101;
    /* Above container context if needed */
}

h1.glitch::before,
h1.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-obsidian);
    /* Needs to match card bg mostly, but card is transparent. Using obsidian to hide */
    /* Actually for glass card glitch, it's tricker. Let's just use simple shadows to avoid background clipping issues */
    background: transparent;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: var(--jadeite);
    opacity: 0.8;
}

h1.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--hot-pink);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

h1.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--jadeite);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 1s infinite linear alternate-reverse;
}

/* Decorative Line */
.glitch-line {
    height: 4px;
    width: 60px;
    background: var(--hot-pink);
    margin: 1rem auto;
    box-shadow: 0 0 15px var(--hot-pink);
    border-radius: 2px;
}

p {
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 2rem 0 3rem;
}

/* Button */
.btn {
    display: inline-block;
    background: var(--jadeite);
    color: #000;
    /* Contrast black on jadeite */
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
    text-decoration: none;
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(4, 255, 178, 0.4);
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(4, 255, 178, 0.6);
    background: #fff;
    color: var(--hot-pink);
}

/* --- Overlays --- */
.vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 40%, #000 120%);
    pointer-events: none;
    z-index: 20;
}

.screen-scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0),
            rgba(255, 255, 255, 0) 50%,
            rgba(0, 0, 0, 0.1) 50%,
            rgba(0, 0, 0, 0.1));
    background-size: 100% 4px;
    z-index: 30;
    pointer-events: none;
    opacity: 0.5;
}

/* --- Animations --- */
@keyframes gridMove {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 0 60px;
    }
}

/* --- Debris Field (User Requested) --- */
.debris-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* Keeps buttons clickable */
    overflow: hidden;
    z-index: 10;
    /* Raise above grid/world */
}

/* Individual Debris Shards - Tiny Binary Swirl */
.shard {
    position: absolute;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    opacity: 0;
    /* Starts invisible, fades in */
    animation: swirlUp 15s linear infinite;
    pointer-events: none;
    text-shadow: 0 0 5px currentColor;
    /* Glow matches text color */
}

/* Colors matching the Mascot */
.shard-jade {
    color: var(--jadeite);
}

.shard-ember {
    color: var(--ember);
}

.shard-purple {
    color: var(--nebula-purple);
}

/* Irregular Glitch Shapes - Scaled Up & Jagged */
/* Animation: Swirl Upwards */
@keyframes swirlUp {
    0% {
        transform: translateY(110vh) translateX(-20px) rotate(0deg);
        opacity: 0;
    }

    20% {
        opacity: 0.8;
    }

    50% {
        transform: translateY(50vh) translateX(50px) rotate(180deg);
        opacity: 0.6;
    }

    80% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(-10vh) translateX(-20px) rotate(360deg);
        opacity: 0;
    }
}



/* Movement: Slow, floating drift */
@keyframes drift {
    from {
        transform: translateY(0) rotate(0deg);
    }

    to {
        transform: translateY(-120vh) rotate(360deg);
    }
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes glitch-anim {
    0% {
        clip: rect(42px, 9999px, 44px, 0);
        transform: skew(0.5deg);
    }

    5% {
        clip: rect(12px, 9999px, 50px, 0);
        transform: skew(0.5deg);
    }

    10% {
        clip: rect(85px, 9999px, 90px, 0);
        transform: skew(0.1deg);
    }

    15% {
        clip: rect(3px, 9999px, 10px, 0);
        transform: skew(0.1deg);
    }

    20% {
        clip: rect(60px, 9999px, 20px, 0);
        transform: skew(0.5deg);
    }

    25% {
        clip: rect(2px, 9999px, 80px, 0);
        transform: skew(0.5deg);
    }

    30% {
        clip: rect(15px, 9999px, 20px, 0);
        transform: skew(0.1deg);
    }

    35% {
        clip: rect(95px, 9999px, 100px, 0);
        transform: skew(0.1deg);
    }

    40% {
        clip: rect(5px, 9999px, 40px, 0);
        transform: skew(0.1deg);
    }

    45% {
        clip: rect(25px, 9999px, 30px, 0);
        transform: skew(0.5deg);
    }

    50% {
        clip: rect(70px, 9999px, 50px, 0);
        transform: skew(0.1deg);
    }

    55% {
        clip: rect(10px, 9999px, 90px, 0);
        transform: skew(0.5deg);
    }

    60% {
        clip: rect(30px, 9999px, 10px, 0);
        transform: skew(0.1deg);
    }

    65% {
        clip: rect(45px, 9999px, 60px, 0);
        transform: skew(0.5deg);
    }

    70% {
        clip: rect(80px, 9999px, 20px, 0);
        transform: skew(0.1deg);
    }

    75% {
        clip: rect(15px, 9999px, 40px, 0);
        transform: skew(0.5deg);
    }

    80% {
        clip: rect(90px, 9999px, 5px, 0);
        transform: skew(0.1deg);
    }

    85% {
        clip: rect(50px, 9999px, 95px, 0);
        transform: skew(0.1deg);
    }

    90% {
        clip: rect(20px, 9999px, 30px, 0);
        transform: skew(0.5deg);
    }

    95% {
        clip: rect(10px, 9999px, 80px, 0);
        transform: skew(0.1deg);
    }

    100% {
        clip: rect(42px, 9999px, 44px, 0);
        transform: skew(0.5deg);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(10px, 9999px, 80px, 0);
        transform: skew(0.5deg);
    }

    20% {
        clip: rect(80px, 9999px, 10px, 0);
        transform: skew(0.1deg);
    }

    40% {
        clip: rect(20px, 9999px, 90px, 0);
        transform: skew(0.5deg);
    }

    60% {
        clip: rect(90px, 9999px, 20px, 0);
        transform: skew(0.1deg);
    }

    80% {
        clip: rect(30px, 9999px, 5px, 0);
        transform: skew(0.5deg);
    }

    100% {
        clip: rect(10px, 9999px, 80px, 0);
        transform: skew(0.1deg);
    }
}

/* Responsiveness */
@media (max-width: 768px) {
    h1.glitch {
        font-size: 4rem;
    }

    .glass-card {
        padding: 2rem;
        width: 95%;
    }

    .sun {
        width: 250px;
        height: 250px;
    }
}