@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700&display=swap');

:root {
    --bg-color: #000000;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --accent-red: #ff3e3e;
    --glow-color: #ff0000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: #000000; /* Fallback black */
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* Nav Bar */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 3rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -2px;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-right button {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-primary);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.3s;
}

.nav-right button:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 10vw;
    position: relative;
    z-index: 10;
    pointer-events: none; /* Let mouse events pass to the robot */
}

.headline, .cta-container, .terminal-container, nav, .bottom-nav {
    pointer-events: auto; /* Re-enable for the actual content */
}

.headline {
    font-size: 5rem;
    font-weight: 700;
    line-height: 1.1;
    max-width: 800px;
    margin-bottom: 3rem;
    letter-spacing: -3px;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5); /* Added for visibility */
    transition: opacity 0.1s linear;
}

.cta-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cta-btn {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: var(--accent-red);
    color: #ffffff;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 10px 20px rgba(255, 62, 62, 0.3);
    transition: transform 0.3s ease;
}

.cta-btn:hover {
    transform: scale(1.05);
}

.dot {
    width: 10px;
    height: 10px;
    background: #ffffff;
    border-radius: 50%;
}

.cta-btn-green {
    background: #10b981;
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
    cursor: not-allowed;
    opacity: 0.9;
}

.cta-btn-green:hover {
    transform: none; /* No scale since it's disabled */
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.5);
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 2rem;
    width: 100%;
    padding: 0 3rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    z-index: 100;
}

.doc-link {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-primary);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.down-arrow {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

/* 3D Spline Background */
#spline-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: calc(100vh + 70px); /* Oversize to push logo down */
    margin-bottom: -70px;
    z-index: 0;
    pointer-events: auto;
    opacity: 0;
    transition: opacity 1s ease-in;
}

/* Dark Overlay to make text readable */
.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.8));
    z-index: 1; 
    pointer-events: none;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 9999; /* Cover absolutely everything */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    text-align: center;
    color: var(--accent-red);
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 62, 62, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent-red);
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto 15px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#spline-bg.loaded {

    opacity: 1;
}



#send-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0.6;
}

#send-btn:hover {
    color: var(--text-primary);
    opacity: 1;
    transform: scale(1.1);
}

#send-btn svg {
    display: block;
}

/* Terminal/Chat Section */
.terminal-container {
    width: 90%;
    max-width: 900px;
    background: rgba(13, 13, 13, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 2rem;
    box-shadow: 0 40px 100px rgba(0,0,0,0.8);
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.terminal-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.red { background: #ff5f56; box-shadow: 0 0 10px rgba(255, 95, 86, 0.3); }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }

.terminal-body {
    padding: 1.5rem 2.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    color: var(--text-primary);
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

#chat-box {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 1.5rem;
    padding-right: 1rem;
}

/* Custom Scrollbar */
#chat-box::-webkit-scrollbar {
    width: 4px;
}
#chat-box::-webkit-scrollbar-track {
    background: transparent;
}
#chat-box::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.message {
    margin-bottom: 1.2rem;
    line-height: 1.5;
    word-wrap: break-word;
    opacity: 0;
    animation: fadeInMsg 0.4s ease forwards;
}

@keyframes fadeInMsg {
    to { opacity: 1; }
}

.message span {
    margin-right: 12px;
    font-weight: bold;
}

.user span { color: #888; }
.bot span { color: var(--accent-orange); }

.input-area {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: border-color 0.3s;
}

.input-area:focus-within {
    border-color: rgba(255, 255, 255, 0.2);
}

.input-area span {
    color: var(--accent-orange);
    margin-right: 15px;
    font-weight: bold;
}

#user-input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    width: 100%;
    outline: none;
}

.thinking-indicator {
    font-style: italic;
    color: var(--text-secondary) !important;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    nav {
        padding: 1.5rem;
    }
    
    .nav-links {
        display: none; /* Hide secondary links on mobile */
    }

    .hero {
        padding-left: 5vw;
        padding-right: 5vw;
        align-items: center;
        text-align: center;
    }

    .headline {
        font-size: 2.8rem;
        letter-spacing: -1.5px;
        margin-bottom: 2rem;
    }

    .cta-container {
        justify-content: center;
    }

    .terminal-container {
        width: 95%;
        margin-top: 1rem;
    }

    .terminal-body {
        padding: 1rem;
        font-size: 0.85rem;
    }

    #chat-box {
        height: 350px;
    }

    .bottom-nav {
        padding: 0 1.5rem;
        bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .headline {
        font-size: 2.2rem;
    }
    
    .terminal-header span {
        display: none;
    }
}

