:root {
    --purple-deep: #0b061a;
    --purple-mid: #1a0b3d;
    --glow-violet: #7b43ff;
    --glow-cyan: #00d2ff;
    --glow-pink: #ff43a8;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

html, body {
    width: 100%;
    overflow-x: hidden; /* Stops horizontal sliding */
    background: var(--purple-deep);
    color: white;
    font-family: 'Space Grotesk', sans-serif;
}

/* Background Depth */
.sky-void {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, #0b061a 0%, #1a0b3d 100%);
    z-index: -1;
}

.stars-overlay {
    position: absolute;
    width: 100%; height: 100%;
    background-image: radial-gradient(white 1px, transparent 0);
    background-size: 50px 50px;
    opacity: 0.1;
}

.nebula {
    position: absolute;
    filter: blur(120px);
    opacity: 0.4;
    transform: translateZ(0);
}

.nebula-1 { width: 60vw; height: 60vh; background: var(--glow-violet); top: -20%; right: -10%; }
.nebula-2 { width: 50vw; height: 50vh; background: #3d0b2e; bottom: -10%; left: -10%; }

/* Glass Nav */
.glass-nav {
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0; width: 100%;
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(11, 6, 26, 0.6);
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-family: 'Syne', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
}

.logo span { color: var(--glow-cyan); }

.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a { color: white; text-decoration: none; font-size: 0.9rem; opacity: 0.7; transition: 0.3s; }
.nav-links a:hover { opacity: 1; color: var(--glow-cyan); }

.mobile-menu-toggle { display: none; font-size: 1.5rem; cursor: pointer; }

.signup-btn {
    background: white;
    color: var(--purple-deep);
    border: none;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    padding: 140px 5% 60px;
    gap: 40px;
    min-height: 100vh;
}

.hero-text { flex: 1.2; }

.dev-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    width: max-content;
    padding: 6px 12px;
    background: rgba(0, 210, 255, 0.1);
    border: 1px solid var(--glow-cyan);
    border-radius: 50px;
    font-size: 0.75rem;
    margin-bottom: 20px;
    color: var(--glow-cyan);
    font-weight: 600;
}

.pulse-dot {
    width: 6px; height: 6px;
    background: var(--glow-cyan);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

h1 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2.2rem, 8vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.magic-text {
    background: linear-gradient(90deg, #fff, var(--glow-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.7;
    margin-bottom: 35px;
    max-width: 500px;
    line-height: 1.5;
}

.hero-btns { display: flex; flex-wrap: wrap; gap: 15px; }

.cta-primary, .cta-secondary {
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
    white-space: nowrap;
}

.cta-primary {
    background: white;
    color: var(--purple-deep);
    border: none;
    box-shadow: 0 10px 30px rgba(0, 210, 255, 0.2);
}

.cta-secondary {
    background: transparent;
    color: white;
    border: 1px solid var(--glass-border);
}

/* Hero Visual */
.hero-visual { flex: 1; display: flex; justify-content: center; position: relative; max-width: 100%; }

.chest-container {
    width: 280px; height: 280px;
    position: relative;
    animation: float 6s ease-in-out infinite;
}

.chest-box {
    font-size: 7rem;
    color: white;
    filter: drop-shadow(0 0 20px var(--glow-cyan));
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-node {
    position: absolute;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px 18px;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    font-weight: 700;
    font-size: 0.8rem;
    white-space: nowrap;
}

/* Adjust nodes so they don't clip off mobile screen */
.node-1 { top: -10%; right: 0; animation: hoverNode 5s infinite; }
.node-2 { bottom: 10%; left: -10%; animation: hoverNode 4s infinite 0.5s; }
.node-3 { top: 40%; right: -10%; animation: hoverNode 6s infinite 1s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes hoverNode {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(3px, -8px); }
}

/* Feature Cards */
.how-it-works { padding: 80px 5%; text-align: center; }
.section-title { font-family: 'Syne', sans-serif; font-size: 2.5rem; margin-bottom: 50px; }

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-card {
    padding: 60px 30px;
    border-radius: 30px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    transition: 0.4s;
}

/* Textures */
.grain-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('https://www.transparenttextures.com/patterns/paper-fibers.png');
    pointer-events: none;
    opacity: 0.03;
    z-index: 999;
}

/* Mobile Fixes (Updated) */
@media (max-width: 768px) {
    .glass-nav { padding: 15px 5%; }
    .nav-links { display: none; } /* Hide links for simple mobile view */
    .mobile-menu-toggle { display: block; }

    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 120px;
        padding-bottom: 40px;
        gap: 60px;
    }

    .hero-subtitle { margin: 0 auto 30px; font-size: 1rem; }
    .hero-btns { justify-content: center; }

    .hero-visual { order: -1; margin-bottom: 20px; } /* Moves image above text on mobile */
    .chest-container { width: 200px; height: 200px; }
    .chest-box { font-size: 5.5rem; }
    
    /* Reposition nodes for tight mobile screens */
    .node-1 { right: -20px; }
    .node-2 { left: -20px; }
    .node-3 { right: -30px; }

    .section-title { font-size: 2rem; }
}