@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;500;700&display=swap');

:root {
    /* --- VARIABLES (Preserved Theme) --- */
    --primary: #2563EB;
    --primary-light: #3B82F6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --card-bg: #0B1121;
    /* Deep dark blue */
    --card-glass: rgba(11, 17, 33, 0.7);
    --text-main: #FFFFFF;
    --text-sub: #94A3B8;
    /* Slate 400 */
    --border-dark: #1E293B;
    --glass-border: rgba(255, 255, 255, 0.08);
    --white: #FFFFFF;
}

/* --- RESET & GLOBAL --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'DM Sans', sans-serif;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background: linear-gradient(180deg, #020617 0%, #0F172A 50%, #1E1B4B 100%);
    background-attachment: fixed;
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* --- UTILITIES --- */
.text-center {
    text-align: center;
}

.text-gradient {
    background: linear-gradient(to right, #FFFFFF, #94A3B8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-primary-gradient {
    background: linear-gradient(to right, var(--primary-light), #fff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

.btn-loading {
    opacity: 0.7;
    cursor: not-allowed !important;
}

/* --- BACKGROUND BACKGROUND EFFECTS --- */
.right-glow {
    position: fixed;
    top: 40%;
    right: -200px;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    filter: blur(100px);
    z-index: 0;
    pointer-events: none;
    animation: pulseGlow 10s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
    0% {
        opacity: 0.4;
        transform: scale(1);
    }

    100% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

#neural-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.5;
    /* Slightly increased visibility */
    pointer-events: none;
}

/* --- AUTH / SIGNUP BACKGROUND (Centralized) --- */
body.auth-body {
    background: #001232;
    background: linear-gradient(180deg, #001232 0%, #002F60 100%);
    background-attachment: fixed;
}

body.auth-body .right-glow {
    top: 50%;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
    filter: blur(80px);
    animation: none;
}

.neural-canvas-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    display: block;
}

/* --- NAVIGATION --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    /* Safari */
    background: rgba(2, 6, 23, 0.6);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-icon {
    width: 32px;
    height: 32px;
    /* Slightly larger */
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-sub);
    margin-left: 2.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s, transform 0.2s;
}

.nav-links a:hover {
    color: var(--text-main);
    transform: translateY(-1px);
}

.nav-links a.btn-login,
.nav-links a.btn-signup {
    margin-left: 1.5rem;
    transform: none;
}

.btn-login {
    padding: 0.6rem 1.4rem;
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: var(--text-main) !important;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.03);
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-signup {
    background-color: var(--white);
    color: #020617 !important;
    padding: 0.6rem 1.6rem;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
}

.btn-signup:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
    transition: transform 0.3s ease;
}

.mobile-menu-toggle.active {
    transform: rotate(90deg);
}

/* --- HERO SECTION --- */
.hero {
    padding: 10rem 5% 4rem;
    text-align: center;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    z-index: 1;
}

.content-wrapper {
    z-index: 2;
    max-width: 960px;
}

h1 {
    font-size: clamp(3.5rem, 6vw, 5.5rem);
    line-height: 1.1;
    margin-bottom: 2rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    background: linear-gradient(180deg, #FFFFFF 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

p.sub-hero {
    font-size: 1.35rem;
    color: var(--text-sub);
    max-width: 680px;
    margin: 0 auto 3rem;
    line-height: 1.7;
    font-weight: 400;
}

.tagline {
    background: rgba(37, 99, 235, 0.1);
    color: #60A5FA;
    border: 1px solid rgba(37, 99, 235, 0.3);
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    display: inline-block;
    backdrop-filter: blur(4px);
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.2);
}

.btn-cta-hero {
    background: var(--white);
    color: #020617;
    padding: 1.1rem 3.5rem;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.btn-cta-hero:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.4);
}

/* --- HERO VISUALS & ANIMATIONS --- */
.hero-visual {
    margin-top: 5rem;
    width: 100%;
    max-width: 1100px;
    border-radius: 20px;
    /* Glass border effect */
    padding: 1px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.02));
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.7);
    position: relative;
    z-index: 2;
}

/* --- GRAPH DEMO SECTION --- */
.graph-demo-container {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
}

.graph-demo-split {
    display: flex;
    align-items: center;
    gap: 5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.graph-demo-split .hero-visual {
    flex: 1.3;
    margin-top: 0;
    box-shadow: none;
    /* Reset specifically for this container if needed */
}

.browser-window {
    background: #020617;
    border-radius: 19px;
    height: 550px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

#mini-network {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #1e293b 0%, #020617 100%);
}

.graph-demo-text {
    flex: 1;
    text-align: left;
}

.graph-demo-text h3 {
    font-size: 2.5rem;
    letter-spacing: -0.02em;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.graph-demo-text p {
    color: var(--text-sub);
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #CBD5E1;
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.feature-list li i {
    color: var(--primary-light);
    font-size: 1.2rem;
    width: 24px;
    display: flex;
    justify-content: center;
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.6));
}

/* --- ANIMATIONS (Reveal.js logic support) --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.15s ease-out, transform 0.15s ease-out;
}

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

/* Hero entrance */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-animate {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.25s;
}

.delay-3 {
    animation-delay: 0.4s;
}

.delay-4 {
    animation-delay: 0.55s;
}

.delay-5 {
    animation-delay: 0.7s;
}


/* --- SECTIONS (Shared) --- */
section {
    padding: 8rem 5% 8rem;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 6rem;
}

.section-header h2 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
    color: #fff;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.section-header p {
    color: var(--text-sub);
    font-size: 1.25rem;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.7;
}

/* --- EVOLUTION / COMPARISON --- */
.evolution-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
}

.evo-text h3 {
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 2rem;
    font-weight: 700;
}

.comparison-card {
    background: var(--card-glass);
    border: 1px solid var(--border-dark);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.4s ease;
    position: relative;
    backdrop-filter: blur(10px);
}

.comparison-card.old-way {
    border-left: 4px solid #64748B;
    opacity: 0.7;
    transform: scale(0.98);
}

.comparison-card.new-way {
    border-left: 4px solid var(--primary-light);
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.08) 0%, rgba(11, 17, 33, 0.4) 100%);
    box-shadow: 0 20px 40px -10px rgba(37, 99, 235, 0.15);
    transform: scale(1.02) translateX(20px);
    z-index: 2;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* --- BENTO GRID --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 260px);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.bento-large {
    grid-column: span 2;
}

.bento-card {
    background-color: var(--card-glass);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.bento-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
    border-color: rgba(59, 130, 246, 0.4);
}

.bento-icon {
    font-size: 3.5rem;
    margin-bottom: auto;
    /* Push content down */
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
}

.bento-card h3 {
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
    color: var(--text-main);
    font-weight: 700;
    z-index: 10;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.bento-card p {
    color: var(--text-sub);
    font-size: 1rem;
    line-height: 1.6;
    z-index: 10;
    position: relative;
}

.bento-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    z-index: 0;
    transition: opacity 0.6s ease;
    mix-blend-mode: soft-light;
    filter: brightness(0.8);
}

.bento-card:hover .bento-bg-video {
    opacity: 1;
}

.bento-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* --- USE CASES --- */
.use-case-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
    max-width: 1280px;
    margin: 0 auto;
}

.use-case-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.use-case-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--primary-light);
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.5);
}

.role-badge {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 2rem;
    display: inline-block;
    letter-spacing: 0.5px;
}

/* --- REVIEWS --- */
/* --- REVIEWS (Infinity Marquee) --- */
.reviews-scroll {
    /* Wrapper for the marquee */
    position: relative;
    width: 100%;
    max-width: 100%;
    /* Full width to allow edge-to-edge flow */
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    padding: 1rem 0;
    /* Vertical breathing room */
}

.reviews-track {
    display: flex;
    gap: 2rem;
    width: max-content;
    animation: scroll 40s linear infinite;
}

.reviews-track:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes scroll-reverse {
    0% {
        transform: translateX(-50%);
    }

    100% {
        transform: translateX(0);
    }
}

.reviews-track.reverse {
    animation: scroll-reverse 45s linear infinite;
}

.reviews-scroll::-webkit-scrollbar {
    display: none;
}

.review-card {
    min-width: 380px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.review-text {
    font-size: 1.15rem;
    color: #E2E8F0;
    margin-bottom: 2rem;
    line-height: 1.7;
    font-style: italic;
    opacity: 0.9;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* --- FINAL CTA --- */
.final-cta {
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    padding: 8rem 2rem;
    text-align: center;
    max-width: 1000px;
    margin: 0 auto 5rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.final-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-light), transparent);
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .evolution-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .comparison-card.new-way {
        transform: scale(1);
    }

    .graph-demo-split {
        flex-direction: column;
        gap: 3rem;
    }

    .graph-demo-text {
        text-align: center;
    }

    .feature-list li {
        justify-content: center;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .bento-large {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 3rem;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .logo {
        position: relative;
        z-index: 1001;
    }

    .nav-links {
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100dvh;
        max-height: 100dvh;
        min-height: 100svh;
        background: #020617;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 1rem;
        padding: calc(5.75rem + env(safe-area-inset-top)) 1rem calc(7rem + env(safe-area-inset-bottom));
        overflow-y: scroll;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
        overscroll-behavior-x: none;
        touch-action: pan-y;
        transform: translateX(100%);
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s step-end;
        z-index: 1000;
    }

    /* Lock background scroll when mobile menu is open */
    html.menu-open,
    body.menu-open {
        height: 100%;
        overflow: hidden;
        overscroll-behavior: none;
    }

    body.menu-open {
        position: fixed;
        inset: 0;
        width: 100%;
    }

    body.menu-open .grecaptcha-badge {
        opacity: 0;
        pointer-events: none;
    }

    nav.alert-hidden .nav-links {
        height: 100dvh;
        max-height: 100dvh;
        min-height: 100svh;
        padding-top: calc(4.75rem + env(safe-area-inset-top));
        padding-bottom: calc(7rem + env(safe-area-inset-bottom));
    }

    .nav-links.active {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s;
    }

    .nav-links a {
        margin: 0;
        padding: 0.75rem 0;
        font-size: 1.1rem;
        width: min(90%, 400px);
        text-align: center;
        display: block;
        white-space: nowrap;
    }

    .nav-links a.btn-login,
    .nav-links a.btn-signup {
        margin: 0;
        padding: 0.7rem 1.4rem;
        width: min(90%, 400px);
        text-align: center;
        display: block;
        flex-shrink: 0;
    }

    .nav-links a.btn-login {
        order: -2;
        margin-top: 2rem;
    }

    .nav-links a.btn-signup {
        order: -1;
        margin-bottom: 1rem;
    }

    section {
        padding: 5rem 5%;
    }
}

@media (max-width: 768px) and (max-height: 760px) {
    .nav-links {
        gap: 0.5rem;
        padding-top: calc(4.9rem + env(safe-area-inset-top));
        padding-bottom: calc(4.25rem + env(safe-area-inset-bottom));
    }

    .nav-links a {
        padding: 0.5rem 0;
        margin: 0;
        font-size: 1rem;
    }

    .nav-links a.btn-login,
    .nav-links a.btn-signup {
        font-size: 0.95rem;
        padding: 0.6rem 1.2rem;
    }

    .nav-links a.btn-login {
        order: -2;
        margin-top: 1rem;
    }

    .nav-links a.btn-signup {
        order: -1;
        margin-bottom: 0.5rem;
    }
}

/* --- FOOTER & AUTH --- */
footer {
    text-align: center;
    padding: 1.5rem 2rem;
    /* Reduced from 3rem */
    color: var(--text-sub);
    font-size: 0.85rem;
    /* Slightly smaller */
    background: rgba(2, 6, 23, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--glass-border);
}

/* Match nav background to footer on auth pages */
.auth-body nav {
    background: rgba(2, 6, 23, 0.5);
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    /* Reduced from 1.5rem */
}

.footer-links {
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
    opacity: 0.7;
}

.footer-links a {
    color: var(--text-sub);
    transition: 0.2s;
}

.footer-links a:hover {
    color: var(--primary-light);
    text-decoration: underline;
    opacity: 1;
}

/* Auth page tweaks if this css is shared */
/* --- AUTH PAGES (Restored & Enhanced) --- */

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

.auth-body .main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    padding-top: 80px;
    /* Account for fixed nav height so content centers in remaining space */
    position: relative;
    z-index: 10;
}

.login-container {
    width: 100%;
    max-width: 440px;
    background: rgba(11, 17, 33, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.login-container h2 {
    font-size: 1.8rem;
    /* Slightly smaller */
    margin-bottom: 0.25rem;
    /* Reduced */
    color: var(--text-main);
    font-weight: 700;
}

.subtitle {
    font-size: 0.9rem;
    /* Slightly smaller */
    color: var(--text-sub);
    margin-bottom: 1.5rem;
    /* Reduced from 2rem */
}

/* Social Login */
.social-login {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
    /* Reduced from 2rem */
}

.social-btn {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-main);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: var(--primary-light);
    color: var(--white);
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 1.25rem 0;
    /* Reduced from 2rem */
    color: var(--text-sub);
    font-size: 0.85rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-dark);
}

.divider span {
    padding: 0 1rem;
}

/* Form Inputs */
.input-group {
    text-align: left;
    margin-bottom: 1rem;
    /* Reduced from 1.25rem */
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-sub);
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-dark);
    padding: 0.85rem 1rem;
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-light);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.btn-submit:hover {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Checkbox */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
    /* Reduced from 1.5rem */
    text-align: left;
    color: var(--text-sub);
}

.checkbox-group input[type="checkbox"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
}

/* Footer Link */
.footer-link {
    margin-top: 1.25rem;
    /* Reduced from 2rem */
    font-size: 0.9rem;
    color: var(--text-sub);
}

.footer-link a {
    color: var(--primary-light);
    font-weight: 600;
    text-decoration: none;
}

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

/* --- FILE CONTEXT MENU --- */
.file-action-btn {
    opacity: 0;
    transition: opacity 0.2s;
    padding: 4px;
    border-radius: 4px;
    color: var(--text-sub);
    cursor: pointer;
    /* margin-left: auto; Removed for left-align */
    display: flex;
    align-items: center;
    justify-content: center;
}

.folder-item:hover .file-action-btn,
.file-item:hover .file-action-btn,
.file-action-btn.active {
    opacity: 1;
}

.file-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.file-context-menu {
    position: fixed;
    display: none !important;
    /* CRITICAL: Force hidden until JS overrides */
    flex-direction: column;
    /* CRITICAL: Force vertical layout */
    background-color: #0f172a;
    /* Solid dark blue (matches Deep Blue theme) */
    border: 1px solid rgba(59, 130, 246, 0.2);
    /* Subtle blue border */
    border-radius: 8px;
    padding: 6px 0;
    min-width: 180px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 2147483647;
    /* Max Z-Index */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.context-menu-item {
    padding: 12px 16px;
    /* Taller items, more side padding */
    display: flex;
    align-items: center;
    gap: 12px;
    color: #e2e8f0;
    /* Soft white/gray */
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    font-weight: 500;
    border-radius: 6px;
    /* Rounded items */
}

.context-menu-item:hover {
    background-color: var(--primary);
    /* Bright Blue Hover */
    color: #ffffff !important;
    transform: translateX(4px);
    /* Subtle shift */
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    /* Glow effect */
}

.context-menu-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.context-menu-item i {
    width: 16px;
    text-align: center;
}

.context-menu-item.delete:hover {
    background: rgba(239, 68, 68, 0.2);
    /* Red tint */
    color: #fca5a5;
}

/* --- LOGOUT PAGE STYLES --- */
.main-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 100px);
    padding: 2rem;
    position: relative;
    z-index: 10;
}




@keyframes heroReveal {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- CHAT BUBBLE STYLES (Global Fallback) --- */
#llm-response-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 15px !important;
}

.chat-message {
    max-width: 85% !important;
    width: fit-content !important;
    border-radius: 12px !important;
    padding: 10px 14px !important;
    margin-bottom: 5px !important;
    line-height: 1.4 !important;
}

.chat-message.user-message {
    align-self: flex-end !important;
    margin-left: auto !important;
    background: linear-gradient(135deg, #60A5FA 0%, #3B82F6 100%) !important;
    color: white !important;
    border-bottom-right-radius: 4px !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
}

.chat-message.ai-message {
    align-self: flex-start !important;
    background: rgba(30, 41, 59, 0.7) !important;
    color: #e2e8f0 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-bottom-left-radius: 4px !important;
}

.chat-message .message-header {
    display: flex !important;
    font-size: 0.75rem !important;
    font-weight: bold !important;
    margin-bottom: 4px !important;
    opacity: 0.8 !important;
}

/* --- OLLE INTRO SECTION --- */
#olle-intro {
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
}

.olle-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.olle-avatar-large-animate {
    width: 150px;
    height: 150px;
    background: url('/Assets/icons/olle_avatar.svg') no-repeat center center / contain;
    border-radius: 50%;
    margin-bottom: 3rem;
    filter: drop-shadow(0 0 30px rgba(139, 92, 246, 0.4));
    animation: olleBounceRoll 4s infinite ease-in-out;
}

@keyframes olleBounceRoll {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-15px) rotate(-5deg);
    }

    50% {
        transform: translateY(0) rotate(0deg);
    }

    75% {
        transform: translateY(-15px) rotate(5deg);
    }

    100% {
        transform: translateY(0) rotate(0deg);
    }
}

.olle-future-badge {
    background: rgba(139, 92, 246, 0.1);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-top: 2rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* --- VERIFY EMAIL PAGE --- */
.code-inputs {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin: 1rem 0 1.5rem;
}

.code-inputs input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 1.25rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-main);
}

.code-inputs input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.resend-btn {
    background: none;
    border: none;
    color: var(--text-sub);
    font-size: 0.9rem;
    margin-top: 1rem;
    cursor: pointer;
}

.resend-btn:hover:not(:disabled) {
    color: white;
    text-decoration: underline;
}

.resend-btn:disabled {
    opacity: 0.5;
    cursor: default;
    text-decoration: none;
}

.role-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.role-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-dark);
    border-radius: 16px;
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.role-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.role-card.selected {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.role-icon {
    font-size: 2rem;
    color: var(--text-sub);
    transition: color 0.3s;
}

.role-card.selected .role-icon {
    color: var(--primary);
}

.role-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
}

.hidden {
    display: none !important;
}

.fade-in {
    animation: floatUp 0.5s ease forwards;
}

@keyframes floatUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.small-error {
    font-size: 0.85rem;
    color: #ff6b6b;
    margin-top: 10px;
    display: none;
}

/* --- LEGAL PAGES (Privacy & TOS) --- */
.legal-container {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(11, 17, 33, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: left;
    /* Override centering */
}

.legal-container h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.legal-container .last-updated {
    display: block;
    text-align: center;
    color: var(--text-sub);
    font-size: 0.9rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
}

.legal-container h2 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-top: 2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.legal-container h2 i {
    color: var(--primary-light);
    font-size: 1.2rem;
}

.legal-container p {
    color: #CBD5E1;
    /* Lighter than standard sub-text for readability */
    line-height: 1.8;
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
}

.legal-container ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.legal-container ul li {
    position: relative;
    padding-left: 24px;
    color: var(--text-sub);
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.legal-container ul li::before {
    content: "•";
    color: var(--primary-light);
    position: absolute;
    left: 8px;
    font-weight: bold;
}

.highlight-box {
    background: rgba(37, 99, 235, 0.1);
    border-left: 4px solid var(--primary-light);
    padding: 1.5rem;
    border-radius: 0 12px 12px 0;
    margin: 1.5rem 0;
}

.highlight-box p {
    margin-bottom: 0;
    color: #E2E8F0;
}

.legal-container a {
    color: var(--primary-light);
    text-decoration: none;
    transition: all 0.2s;
}

.legal-container a:hover {
    text-decoration: underline;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

/* --- CONTEXT MENU & TOOLTIP LAYERING --- */
#context-menu {
    position: fixed;
    z-index: 100000 !important;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 8px 0;
    min-width: 180px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

#context-menu.visible {
    display: block;
}

#context-menu .menu-item {
    padding: 8px 16px;
    cursor: pointer;
    color: var(--text-sub);
    transition: all 0.2s;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

#context-menu .menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

#node-reference-tooltip,
.node-tooltip {
    z-index: 5000 !important;
}