:root {
    --void-bg: #030305;
    --neural-synapse: #00ff9d;
    --neural-accent: #7000ff;
    --text-primary: #ffffff;
    --text-secondary: #8888aa;
    --card-bg: rgba(10, 10, 15, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);

    --font-display: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
    /* Custom cursor */
}

body {
    background-color: var(--void-bg);
    color: var(--text-primary);
    font-family: var(--font-display);
    overflow-x: hidden;
    height: 100vh;
    width: 100vw;
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--neural-synapse);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid var(--neural-synapse);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

body:hover .cursor-outline {
    background-color: rgba(0, 255, 157, 0.1);
}

/* ThreeJS Canvas */
#swarm-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.8;
}

/* Loading Overlay */
.loader-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    font-family: var(--font-mono);
}

.loader-bar {
    width: 200px;
    height: 2px;
    background: #333;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}

.loader-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--neural-synapse);
    width: 0%;
    /* Animated via JS */
}

/* Main UI */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    mix-blend-mode: difference;
    z-index: 50;
}

.brand {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -1px;
}

/* Scroll Container */
.smooth-scroll {
    position: relative;
    width: 100%;
}

/* Sections */
section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 10%;
    position: relative;
}

.hero h1 {
    font-size: 6vw;
    line-height: 0.9;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: -0.05em;
    mix-blend-mode: overlay;
    background: linear-gradient(to right, #fff, #888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-family: var(--font-mono);
    max-width: 500px;
    margin-top: 2rem;
    color: var(--neural-synapse);
    font-size: 1.1rem;
}

.hero .meta-tag {
    position: absolute;
    top: 30%;
    right: 15%;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    backdrop-filter: blur(5px);
}

/* Simulation UI */
.sim-container {
    display: flex;
    gap: 2rem;
    margin-top: 10vh;
}

.sim-card {
    flex: 1;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: 0.3s;
    transform-style: preserve-3d;
}

.sim-card:hover {
    border-color: var(--neural-synapse);
    transform: translateY(-10px);
    box-shadow: 0 20px 50px -10px rgba(0, 255, 157, 0.1);
}

.card-header {
    font-family: var(--font-mono);
    color: var(--neural-accent);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
}

.hologram-text {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Interactive Terminal */
.terminal-input-area {
    margin-top: 3rem;
    border-bottom: 1px solid var(--text-secondary);
    padding-bottom: 0.5rem;
    width: fit-content;
}

.terminal-input-area input {
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1.5rem;
    width: 300px;
    outline: none;
}

/* Feature Grid */
.grid-3d {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    perspective: 1000px;
}

.grid-item {
    height: 400px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    transition: transform 0.5s;
}

.grid-item:hover {
    transform: translateZ(50px);
    background: rgba(255, 255, 255, 0.05);
}

/* Utilities */
.scramble-text {
    display: inline-block;
}

.accent {
    color: var(--neural-synapse);
}

@media(max-width: 768px) {
    .grid-3d {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 12vw;
    }

    nav {
        padding: 1.5rem;
    }
}