:root {
    --bg-color: #050505;
    --text-color: #f0f0f0;
    --accent-color: #4a90e2;
    --secondary-color: #888;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
    --snap-align: start;
}

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

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    height: 100vh;
    overflow-y: scroll;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

section {
    min-height: 100vh;
    width: 100%;
    scroll-snap-align: var(--snap-align);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    /* Prevent horizontal overflow */
}

@media (max-width: 768px) {
    section {
        padding: 6rem 1rem 2rem;
        /* Add top padding for nav */
        height: auto;
        /* Allow content to dictate height on mobile */
    }
}

.container-wrapper {
    width: 100%;
    max-width: 1000px;
    padding: 0 2rem;
}

@media (max-width: 768px) {
    .container-wrapper {
        padding: 0;
    }
}

/* Glassmorphism Nav */
.nav-container {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    padding: 0.5rem 1.5rem;
    display: flex;
    gap: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 90%;
    /* Prevent nav from touching edges on very small screens */
    flex-wrap: nowrap;
    overflow-x: auto;
    /* Allow horizontal scroll if needed on tiny screens */
}

@media (max-width: 480px) {
    .nav-container {
        gap: 1rem;
        padding: 0.5rem 1rem;
        width: max-content;
    }

    .nav-link {
        font-size: 0.8rem;
    }
}

.nav-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-color);
}

/* Whimsy Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Whimsy Hover effect */
.squishy {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.squishy:hover {
    transform: scale(1.05);
}

.squishy:active {
    transform: scale(0.95);
}

/* Whimsical Blob */
.whimsy-blob {
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(74, 144, 226, 0.2) 0%, rgba(138, 43, 226, 0.1) 50%, transparent 100%);
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    z-index: -1;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Typography Refinement */
h1 {
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 900;
    letter-spacing: -0.05em;
    margin-bottom: 0.5rem;
    text-align: center;
    background: linear-gradient(to bottom, #fff 40%, #888 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sub-header {
    font-size: 1.1rem;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-weight: 700;
    opacity: 0.8;
}

/* Custom indicator for scroll */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 60px;
    background: linear-gradient(to bottom, var(--accent-color), transparent);
    animation: scroll-anim 2s infinite ease-in-out;
}

@keyframes scroll-anim {
    0% {
        transform: translateX(-50%) scaleY(0);
        transform-origin: top;
    }

    50% {
        transform: translateX(-50%) scaleY(1);
        transform-origin: top;
    }

    51% {
        transform: translateX(-50%) scaleY(1);
        transform-origin: bottom;
    }

    100% {
        transform: translateX(-50%) scaleY(0);
        transform-origin: bottom;
    }
}

/* Responsive Content Box */
.content-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    padding: 3rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    width: 100%;
}

.cta-buttons {
    display: flex;
    gap: 2rem;
    margin-top: 3rem;
    flex-wrap: wrap;
    justify-content: center;
}

@media (max-width: 768px) {
    .content-box {
        padding: 1.5rem;
        border-radius: 30px;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .cta-buttons .nav-link {
        width: 100%;
        text-align: center;
    }
}

/* Documentation Styles */
.subnav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
    padding: 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.subnav-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.subnav-link:hover,
.subnav-link.active {
    color: var(--accent-color);
    background: rgba(74, 144, 226, 0.1);
}

.doc-content {
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
}

.doc-content h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.doc-content h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.doc-content p {
    text-align: left;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
    max-width: none;
    line-height: 1.8;
}

.doc-content ul {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.doc-content li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--secondary-color);
    line-height: 1.8;
}

.doc-content li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

.steps {
    padding-left: 1.5rem;
}

.steps li {
    margin-bottom: 1rem;
}

.accent-link {
    color: var(--accent-color);
    text-decoration: none;
}

.accent-link:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .subnav {
        padding: 0.5rem;
        border-radius: 20px;
        gap: 0.5rem;
    }

    .subnav-link {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .doc-content h2 {
        font-size: 1.8rem;
    }
}