/* ============================================================================
   BrAIn - Landing Page Styles (Clean Version)
   ============================================================================ */

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

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

:root {
    --primary-blue: #1880c0;
    --dark-bg: #0a0e1a;
    --glass-bg: rgba(15, 23, 41, 0.7);
    --glass-border: rgba(24, 128, 192, 0.2);
    --card-bg: rgba(24, 128, 192, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --accent-glow: rgba(24, 128, 192, 0.3);
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ============================================================================
   Background & Neural Network
   ============================================================================ */

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: radial-gradient(ellipse at top, #0f1729 0%, #0a0e1a 100%);
}

.neural-network {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

/* ============================================================================
   Header & Navigation
   ============================================================================ */

header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

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

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

.auth-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* ============================================================================
   User Profile Button (when logged in)
   ============================================================================ */

.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.user-profile-btn:hover {
    background: rgba(24, 128, 192, 0.1);
    border-color: var(--primary-blue);
    transform: translateY(-2px);
}

.user-avatar-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), rgba(24, 128, 192, 0.6));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
}

.user-name-display {
    font-weight: 500;
    color: var(--text-primary);
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================================================
   Buttons
   ============================================================================ */

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    font-size: 0.95rem;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
}

.btn-outline:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
    border: 2px solid var(--primary-blue);
}

.btn-primary:hover {
    box-shadow: 0 6px 30px var(--accent-glow);
    transform: translateY(-2px);
}

/* ============================================================================
   Main Content
   ============================================================================ */

main {
    position: relative;
    z-index: 1;
    padding-top: 80px;
}

/* ============================================================================
   Hero Section
   ============================================================================ */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem;
}

.hero-content {
    max-width: 1400px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, var(--primary-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ============================================================================
   Logo Hero Container
   ============================================================================ */

.logo-hero-container {
    width: 100%;
    height: 500px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-display {
    position: relative;
    z-index: 2;
    width: 400px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.logo-display img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 40px rgba(24, 128, 192, 0.5));
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { 
        filter: drop-shadow(0 0 40px rgba(24, 128, 192, 0.5));
    }
    50% { 
        filter: drop-shadow(0 0 60px rgba(24, 128, 192, 0.8));
    }
}

.logo-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(24, 128, 192, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: glow-pulse 4s ease-in-out infinite;
    z-index: 1;
}

@keyframes glow-pulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.5;
    }
    50% { 
        transform: scale(1.2);
        opacity: 0.8;
    }
}

/* ============================================================================
   Features Section
   ============================================================================ */

.features {
    max-width: 1400px;
    margin: 0 auto;
    padding: 6rem 2rem;
}

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

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, var(--primary-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.section-header p {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, var(--accent-glow), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-blue);
    box-shadow: 0 10px 40px var(--accent-glow);
}

.feature-card:hover::before {
    transform: translateX(100%);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-blue), rgba(24, 128, 192, 0.6));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 15px rgba(24, 128, 192, 0.3);
}

.feature-icon svg {
    width: 32px;
    height: 32px;
    fill: white;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    font-weight: 600;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* ============================================================================
   Footer
   ============================================================================ */

footer {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    padding: 2rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================================================
   Mobile Responsive
   ============================================================================ */

@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
    }

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

    .logo-hero-container {
        height: 300px;
    }

    .logo-display {
        width: 250px;
        height: 250px;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .nav-container {
        padding: 1rem;
        flex-wrap: wrap;
    }

    .hero {
        padding: 1rem;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-text p {
        font-size: 1rem;
    }

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .auth-buttons {
        gap: 0.5rem;
    }

    .user-name-display {
        display: none;
    }

    .features {
        padding: 3rem 1rem;
    }

    .logo {
        font-size: 1.2rem;
    }
}