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

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --text-primary: #e4e4e7;
    --text-secondary: #a1a1aa;
    --accent: #6366f1;
    --accent-hover: #818cf8;
}

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
}

.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

#graphics-canvas {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
}

.canvas-container::before,
.canvas-container::after {
    content: "";
    position: absolute;
    display: none;
    width: 75vmax;
    height: 75vmax;
    border-radius: 50%;
    opacity: 0;
    will-change: transform;
}

.content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.hero {
    text-align: center;
    max-width: 600px;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .subtitle {
    font-size: clamp(1rem, 3vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.links a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--accent);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    background: rgba(99, 102, 241, 0.1);
}

.links a:hover {
    background: var(--accent);
    transform: translateY(-2px);
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    font-size: 1.25rem;
    color: var(--text-secondary);
}

@media (max-width: 768px), (pointer: coarse) {
    .canvas-container {
        background:
            radial-gradient(circle at 50% 45%, rgba(35, 37, 80, 0.2), transparent 52%),
            var(--bg-primary);
    }

    .canvas-container::before,
    .canvas-container::after {
        display: block;
        opacity: 1;
    }

    .canvas-container::before {
        top: -36vmax;
        left: -32vmax;
        background: radial-gradient(
            circle,
            rgba(99, 102, 241, 0.32) 0%,
            rgba(79, 70, 229, 0.12) 38%,
            transparent 68%
        );
        animation: mobile-orbit-one 14s ease-in-out infinite alternate;
    }

    .canvas-container::after {
        right: -40vmax;
        bottom: -34vmax;
        background: radial-gradient(
            circle,
            rgba(129, 140, 248, 0.24) 0%,
            rgba(67, 56, 202, 0.1) 42%,
            transparent 70%
        );
        animation: mobile-orbit-two 18s ease-in-out infinite alternate;
    }

    #graphics-canvas {
        opacity: 0.88;
    }
}

@keyframes mobile-orbit-one {
    from {
        transform: translate3d(0, 0, 0) scale(0.9);
    }
    to {
        transform: translate3d(42vw, 38vh, 0) scale(1.18);
    }
}

@keyframes mobile-orbit-two {
    from {
        transform: translate3d(0, 0, 0) scale(1.12);
    }
    to {
        transform: translate3d(-36vw, -32vh, 0) scale(0.88);
    }
}

@media (max-width: 480px) {
    .links {
        flex-direction: column;
        width: 100%;
    }

    .links a {
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .canvas-container::before,
    .canvas-container::after {
        animation: none;
        will-change: auto;
    }
}
