:root {
    --neuro-gradient: linear-gradient(135deg, hsl(230, 25%, 18%), hsl(230, 30%, 5%));
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #050505;
    color: #ffffff;
    overflow: hidden; /* Prevent all scrolling */
    max-width: 500px;
}

/* Main layout container */
.main-container {
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    gap: 2vw;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
}

.main-container.visible {
    opacity: 1;
    visibility: visible;
}

/* Left side: Content */
.content-container {
    flex: 0 1 450px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    text-align: left;
}

.content {
    max-width: 500px;
}

header h1 {
    font-size: 3.5rem;
    margin: 0 0 15px 0;
    letter-spacing: 1px;
    font-weight: 600;
    line-height: 1.6;
    color: #ffffff;
}

header p {
    font-size: 1.2rem;
    color: #ffffff;
    line-height: 1.6;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    width: 24px;
    height: 40px;
    border: 2px solid #fff;
    border-radius: 50px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 8px;
    opacity: 0.7;
}

.scroll-indicator span {
    width: 4px;
    height: 8px;
    background-color: #fff;
    border-radius: 2px;
    animation: scroll-bounce 2s infinite;
}

@keyframes scroll-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(10px);
    }
    60% {
        transform: translateY(5px);
    }
}

/* Right side: 3D Canvas */
#canvas-container {
    flex: 0 0 45vh; /* Don't grow or shrink, base size on viewport height */
    width: 45vh;
    height: 45vh;
    max-width: 500px;
    max-height: 500px;
    position: relative;
    border-radius: 50%;
    overflow: hidden; /* This creates the circular frame */
    padding: 3px; /* Creates the border width */
    /* background: var(--neuro-gradient); */
    background-size: 200% 200%;
    animation: gradient-flow 4s ease infinite;
    border: 1px solid #ffffff;
}

@keyframes gradient-flow {
	0% { background-position: 0% 50%; }
	50% { background-position: 100% 50%; }
	100% { background-position: 0% 50%; }
}

/* CTA Button */
.cta-button {
    display: inline-block;
    margin-top: 30px;
    padding: 15px 35px;
    border: none;
    border-radius: 50px;
    color: #000000;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    background: #ffffff;
    background-size: 200% 200%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: gradient-flow 4s ease infinite;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

footer {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    font-size: 0.75rem;
    color: #555;
    text-align: center;
}

footer a {
    color: #777;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Video Section */
#video-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
}

#video-section.visible {
    opacity: 1;
    visibility: visible;
}

#demo-video {
    width: 100%;
    max-width: 1100px;
    height: auto;
    border-radius: 15px;
}

/* Scroll Down Indicator */
.scroll-down-indicator {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 50px;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.scroll-down-indicator.visible {
    opacity: 1;
}

.scroll-down-indicator::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background-color: #fff;
    border-radius: 2px;
    animation: scroll-mouse-wheel 2s infinite;
}

@keyframes scroll-mouse-wheel {
    0% { transform: translate(-50%, 0); opacity: 0; }
    40% { opacity: 1; }
    80% { transform: translate(-50%, 10px); opacity: 0; }
    100% { opacity: 0; }
}

/* Close Button */
.close-button {
    display: none; /* Hidden by default */
    position: absolute;
    top: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s ease;
    /* Flexbox for perfect centering */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    line-height: 1; /* Reset line-height */
}

.close-button:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
        gap: 0;
        height: 100%; /* Adjust height for mobile */
        padding-bottom: 0;
    }

    .content-container {
        flex: 0 1 auto;
        text-align: center;
        padding: 40px 20px 20px;
    }

    .content {
        text-align: center;
    }

    header h1 {
        font-size: 2.5rem;
    }

    header p {
        font-size: 1rem;
    }
    
    .scroll-indicator {
        display: none; /* Hide on mobile to save space */
    }

    #canvas-container {
        flex: 0 0 40vh; /* Adjust size for mobile */
        width: 40vh;
        height: 40vh;
    }

    .scroll-down-indicator {
        bottom: 10px;
    }

    #video-section.visible .close-button {
        display: block; /* Show only when video is visible on mobile */
    }
}

/* Loader Styles */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #050505;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 100;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid #ffffff;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

#loader p {
    color: #a0a0a0;
    font-size: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#video-section.visible .close-button {
    display: block; /* Show button whenever video is visible */
} 