:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --text-primary: #ffffff;
    --text-secondary: #808080;
    --accent-cyan: #00ffff;
    --accent-blue: #0066ff;
    --accent-purple: #9945ff;
    --grid-color: rgba(255, 255, 255, 0.03);
    --glow-intensity: 0 0 20px;
}

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

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Space Mono', monospace;
    background: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: fadeIn 1s ease-out;
}

/* Grid Background */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

#grid-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

@keyframes gridMove {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 50px 50px;
    }
}

/* Planet System */
.planet-system {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    pointer-events: none;
    z-index: 1;
}

/* Central Planet */
.planet {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
}

.planet svg {
    width: 100%;
    height: 100%;
}

/* Canvas planet */
.planet-canvas {
    width: 100%;
    height: 100%;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.planet-atmo {
    display: none; /* Atmospheric glow removed */
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 52% 48%, rgba(0,255,230,0.0) 65%, rgba(0,255,230,0.15) 100%);
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 2;
}

/* PS1 Jitter Effect */
.ps1-jitter { animation: ps1Jitter 0.2s infinite; }

@keyframes ps1Jitter {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    25% {
        transform: translate(calc(-50% + 0.3px), calc(-50% - 0.3px)) scale(1);
    }
    50% {
        transform: translate(calc(-50% - 0.3px), calc(-50% + 0.3px)) scale(1);
    }
    75% {
        transform: translate(calc(-50% + 0.2px), calc(-50% + 0.2px)) scale(1);
    }
}

/* rotation handled in canvas */

/* Orbit Container */
.orbit-container {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: orbitTilt 20s infinite ease-in-out;
}

@keyframes orbitTilt {
    0%, 100% {
        transform: rotateX(0deg);
    }
    50% {
        transform: rotateX(10deg);
    }
}

/* MCP Miners */
.mcp-miner {
    position: absolute;
    width: 40px;
    height: 40px;
    color: var(--text-secondary);
    margin: -20px 0 0 -20px;
}

.mcp-miner svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 5px var(--accent-cyan));
}

/* Individual Orbits */
.mcp-miner[data-orbit="1"] {
    animation: orbit1 15s infinite linear, minerGlitch 5s infinite;
    top: 50%; left: 50%;
}

.mcp-miner[data-orbit="2"] {
    animation: orbit2 20s infinite linear, minerGlitch 6s infinite;
    animation-delay: 0s;
    top: 30%; left: 50%;
}

.mcp-miner[data-orbit="3"] {
    animation: orbit3 25s infinite linear, minerGlitch 7s infinite;
    animation-delay: 0s;
    top: 70%; left: 50%;
}

.mcp-miner[data-orbit="4"] {
    animation: orbit4 28s infinite linear, minerGlitch 8s infinite;
    animation-delay: 0s;
    top: 25%; left: 50%;
}
.mcp-miner[data-orbit="5"] {
    animation: orbit5 18s infinite linear reverse, minerPulse 3s infinite;
    animation-delay: 0s;
    top: 75%; left: 50%;
}
.mcp-miner[data-orbit="6"] {
    animation: orbit6 35s infinite linear, minerGlitch 9s infinite;
    animation-delay: 0s;
    top: 40%; left: 50%;
}
.mcp-miner[data-orbit="7"] {
    animation: orbit7 22s infinite linear reverse, minerPulse 4s infinite;
    animation-delay: 0s;
    top: 60%; left: 50%;
}

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

@keyframes orbit1 {
    from {
        transform: rotate(0deg) translateX(220px) rotate(0deg) translateY(0px);
    }
    to {
        transform: rotate(360deg) translateX(220px) rotate(-360deg) translateY(0px);
    }
}

@keyframes orbit2 {
    from {
        transform: rotate(90deg) translateX(270px) rotate(-90deg) translateY(-80px);
    }
    to {
        transform: rotate(450deg) translateX(270px) rotate(-450deg) translateY(-80px);
    }
}

@keyframes orbit3 {
    from {
        transform: rotate(180deg) translateX(320px) rotate(-180deg) translateY(60px);
    }
    to {
        transform: rotate(540deg) translateX(320px) rotate(-540deg) translateY(60px);
    }
}

@keyframes orbit4 {
    from {
        transform: rotate(270deg) translateX(250px) rotate(-270deg) translateY(-100px);
    }
    to {
        transform: rotate(630deg) translateX(250px) rotate(-630deg) translateY(-100px);
    }
}

@keyframes orbit5 {
    from {
        transform: rotate(45deg) translateX(290px) rotate(-45deg) translateY(90px);
    }
    to {
        transform: rotate(405deg) translateX(290px) rotate(-405deg) translateY(90px);
    }
}

@keyframes orbit6 {
    from {
        transform: rotate(135deg) translateX(340px) rotate(-135deg) translateY(-50px);
    }
    to {
        transform: rotate(495deg) translateX(340px) rotate(-495deg) translateY(-50px);
    }
}

@keyframes orbit7 {
    from {
        transform: rotate(225deg) translateX(240px) rotate(-225deg) translateY(120px);
    }
    to {
        transform: rotate(585deg) translateX(240px) rotate(-585deg) translateY(120px);
    }
}

@keyframes minerGlitch {
    0%, 90%, 100% {
        opacity: 0.8;
        filter: drop-shadow(0 0 5px var(--accent-cyan));
    }
    92% {
        opacity: 1;
        filter: drop-shadow(0 0 15px var(--accent-cyan)) brightness(1.5);
        transform: scale(1.1);
    }
    94% {
        opacity: 0.6;
        filter: drop-shadow(0 0 3px var(--accent-blue));
    }
    96% {
        opacity: 0.9;
        filter: drop-shadow(0 0 10px var(--accent-purple));
    }
}

/* Main Container */
.container {
    position: fixed;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    text-align: center;
}

.content {
    animation: slideUp 1s ease-out;
    background: linear-gradient(to top, rgba(10, 10, 10, 0.95), transparent);
    padding: 2rem;
    border-radius: 10px;
}

/* Glitch Text Effect */
.glitch {
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 700;
    text-transform: lowercase;
    letter-spacing: -0.02em;
    position: relative;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    animation: textGlow 4s ease-in-out infinite alternate;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch1 0.5s infinite;
    color: var(--accent-cyan);
    z-index: -1;
    opacity: 0.8;
}

.glitch::after {
    animation: glitch2 0.5s infinite;
    color: var(--accent-blue);
    z-index: -2;
    opacity: 0.8;
}

@keyframes glitch1 {
    0%, 100% {
        clip-path: inset(0 0 0 0);
        transform: translate(0);
    }
    20% {
        clip-path: inset(20% 0 30% 0);
        transform: translate(-2px, 2px);
    }
    40% {
        clip-path: inset(50% 0 20% 0);
        transform: translate(2px, -2px);
    }
    60% {
        clip-path: inset(10% 0 60% 0);
        transform: translate(-1px, 1px);
    }
    80% {
        clip-path: inset(80% 0 5% 0);
        transform: translate(1px, -1px);
    }
}

@keyframes glitch2 {
    0%, 100% {
        clip-path: inset(0 0 0 0);
        transform: translate(0);
    }
    20% {
        clip-path: inset(60% 0 20% 0);
        transform: translate(2px, -1px);
    }
    40% {
        clip-path: inset(10% 0 70% 0);
        transform: translate(-2px, 1px);
    }
    60% {
        clip-path: inset(40% 0 40% 0);
        transform: translate(1px, 2px);
    }
    80% {
        clip-path: inset(5% 0 85% 0);
        transform: translate(-1px, -2px);
    }
}

@keyframes textGlow {
    0% {
        text-shadow: var(--glow-intensity) rgba(0, 255, 255, 0.3);
    }
    100% {
        text-shadow: var(--glow-intensity) rgba(0, 102, 255, 0.3);
    }
}

/* Tagline */
.tagline {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    letter-spacing: 0.1em;
    animation: fadeIn 2s ease-out 0.5s both;
}

/* Waitlist Form */
.waitlist-form {
    max-width: 450px;
    margin: 0 auto;
    animation: fadeIn 2s ease-out 1s both;
}

.input-group {
    display: flex;
    gap: 0;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.input-group:hover,
.input-group:focus-within {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
}

input[type="email"] {
    flex: 1;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: 'Space Mono', monospace;
    font-size: 0.95rem;
    outline: none;
}

input[type="email"]::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

.cta-button {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border: none;
    color: var(--text-primary);
    font-family: 'Space Mono', monospace;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.cta-button:hover {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
    transform: translateX(2px);
}

.cta-button .arrow {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.cta-button:hover .arrow {
    transform: translateX(4px);
}

.form-message {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--accent-cyan);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-message.show {
    opacity: 1;
}

.form-message.error {
    color: #ff4545;
}


/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .planet-system {
        width: 100vw;
        height: 100vh;
    }
    
    .planet {
        width: 350px;
        height: 350px;
    }
    
    .mcp-miner {
        width: 30px;
        height: 30px;
        margin: -15px 0 0 -15px;
    }
    
    .mcp-miner[data-orbit="1"] {
        animation: orbit1Mobile 15s infinite linear, minerGlitch 5s infinite;
    }
    
    .mcp-miner[data-orbit="2"] {
        animation: orbit2Mobile 20s infinite linear, minerGlitch 6s infinite;
    }
    
    .mcp-miner[data-orbit="3"] {
        animation: orbit3Mobile 25s infinite linear, minerGlitch 7s infinite;
    }
    
    .mcp-miner[data-orbit="4"] {
        animation: orbit4Mobile 30s infinite linear, minerGlitch 8s infinite;
    }
    
    .mcp-miner[data-orbit="5"] {
        animation: orbit5Mobile 18s infinite linear reverse, minerPulse 3s infinite;
    }
    
    .mcp-miner[data-orbit="6"] {
        animation: orbit6Mobile 35s infinite linear, minerGlitch 9s infinite;
    }
    
    .mcp-miner[data-orbit="7"] {
        animation: orbit7Mobile 22s infinite linear reverse, minerPulse 4s infinite;
    }
    
    @keyframes orbit1Mobile {
        from { transform: rotate(0deg) translateX(100px) rotate(0deg); }
        to { transform: rotate(360deg) translateX(100px) rotate(-360deg); }
    }
    
    @keyframes orbit2Mobile {
        from { transform: rotate(90deg) translateX(130px) rotate(-90deg); }
        to { transform: rotate(450deg) translateX(130px) rotate(-450deg); }
    }
    
    @keyframes orbit3Mobile {
        from { transform: rotate(180deg) translateX(150px) rotate(-180deg); }
        to { transform: rotate(540deg) translateX(150px) rotate(-540deg); }
    }
    
    @keyframes orbit4Mobile {
        from { transform: rotate(270deg) translateX(120px) rotate(-270deg); }
        to { transform: rotate(630deg) translateX(120px) rotate(-630deg); }
    }
    
    @keyframes orbit5Mobile {
        from { transform: rotate(206deg) translateX(140px) rotate(-206deg); }
        to { transform: rotate(566deg) translateX(140px) rotate(-566deg); }
    }
    
    @keyframes orbit6Mobile {
        from { transform: rotate(257deg) translateX(160px) rotate(-257deg); }
        to { transform: rotate(617deg) translateX(160px) rotate(-617deg); }
    }
    
    @keyframes orbit7Mobile {
        from { transform: rotate(309deg) translateX(110px) rotate(-309deg); }
        to { transform: rotate(669deg) translateX(110px) rotate(-669deg); }
    }
    
    .container {
        bottom: 5%;
        padding: 1rem;
    }
    
    .content {
        padding: 1.5rem;
    }
    
    .glitch {
        font-size: clamp(1.75rem, 10vw, 3rem);
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .cta-button {
        width: 100%;
        justify-content: center;
        padding: 1rem;
    }
    
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .grid-bg {
        animation: none;
    }
    
    .mcp-icon {
        animation: none;
        opacity: 0.2;
    }
    
    .glitch::before,
    .glitch::after {
        display: none;
    }
}
