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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #0f0f1a;
    color: #e0e0e0;
    line-height: 1.6;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 0;
    background: rgba(15, 15, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #a78bfa;
    text-decoration: none;
}

.nav-link {
    color: #a0a0a0;
    text-decoration: none;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #a78bfa;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    padding: 120px 24px 80px;
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #16213e 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(167, 139, 250, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #ffffff 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 20px;
    color: #a0a0a0;
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #c0c0c0;
}

.feature-icon {
    color: #a78bfa;
    font-size: 18px;
}

/* Auth Card in Hero */
.hero-form .auth-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
}

.auth-card {
    background: rgba(30, 30, 50, 0.9);
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    max-width: 420px;
}

.auth-card h2 {
    text-align: center;
    color: #ffffff;
    margin-bottom: 8px;
    font-size: 24px;
}

.form-subtitle {
    text-align: center;
    color: #888;
    margin-bottom: 24px;
    font-size: 14px;
}

.tabs {
    display: flex;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 15px;
    color: #888;
    transition: all 0.2s;
}

.tab.active {
    color: #a78bfa;
    border-bottom: 2px solid #a78bfa;
    margin-bottom: -1px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #c0c0c0;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    font-size: 15px;
    background: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    transition: border-color 0.2s, background 0.2s;
}

.form-group input::placeholder {
    color: #666;
}

.form-group input:focus {
    outline: none;
    border-color: #a78bfa;
    background: rgba(0, 0, 0, 0.4);
}

.btn {
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background: #4a4a6a;
    cursor: not-allowed;
    transform: none;
}

.error {
    color: #f87171;
    margin-top: 12px;
    text-align: center;
    font-size: 14px;
}

.hidden {
    display: none !important;
}

/* Section Styles */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-title {
    font-size: 40px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
    color: #ffffff;
}

.section-subtitle {
    font-size: 18px;
    text-align: center;
    color: #888;
    margin-bottom: 60px;
}

/* Features Section */
.features {
    padding: 100px 24px;
    background: #0a0a14;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 32px;
    transition: all 0.3s;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(167, 139, 250, 0.3);
    transform: translateY(-4px);
}

.feature-card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(167, 139, 250, 0.1) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #a78bfa;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 12px;
}

.feature-card p {
    color: #888;
    font-size: 15px;
    line-height: 1.6;
}

/* How It Works */
.how-it-works {
    padding: 100px 24px;
    background: linear-gradient(180deg, #0a0a14 0%, #0f0f1a 100%);
}

.steps {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 24px;
}

.step {
    flex: 1;
    max-width: 300px;
    text-align: center;
}

.step-number {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin: 0 auto 20px;
}

.step h3 {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 12px;
}

.step p {
    color: #888;
    font-size: 15px;
}

.step-arrow {
    color: #4a4a6a;
    font-size: 24px;
    padding-top: 16px;
}

/* CTA Section */
.cta {
    padding: 100px 24px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    text-align: center;
}

.cta h2 {
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
}

.cta p {
    font-size: 18px;
    color: #888;
    margin-bottom: 32px;
}

.btn-cta {
    display: inline-block;
    padding: 16px 40px;
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-cta:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
    transform: translateY(-2px);
}

/* Footer */
.footer {
    padding: 60px 24px 30px;
    background: #0a0a14;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 20px;
    color: #a78bfa;
    margin-bottom: 8px;
}

.footer-brand p {
    color: #666;
    font-size: 14px;
}

.footer-links p {
    color: #666;
    font-size: 14px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom p {
    color: #555;
    font-size: 13px;
}

/* Chat Page */
.chat-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 800px;
    margin: 0 auto;
    background: #1a1a2e;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

.chat-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h1 {
    font-size: 20px;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 6px;
}

.btn-small:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #0f0f1a;
}

.welcome-message {
    text-align: center;
    color: #888;
    padding: 40px 20px;
}

.welcome-message p {
    margin-bottom: 8px;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 12px;
    word-wrap: break-word;
}

.message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.assistant {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.08);
    color: #e0e0e0;
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 4px;
}

.chat-input-container {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: #1a1a2e;
}

#chat-form {
    display: flex;
    gap: 12px;
}

#message-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    font-size: 16px;
    outline: none;
    background: rgba(0, 0, 0, 0.3);
    color: #ffffff;
}

#message-input::placeholder {
    color: #666;
}

#message-input:focus {
    border-color: #a78bfa;
}

#chat-form .btn-primary {
    width: auto;
    border-radius: 24px;
    padding: 12px 24px;
}

/* Thinking Bubble */
.message.thinking {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.08);
    color: #888;
    border-bottom-left-radius: 4px;
}

.thinking-dots {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.thinking-dots span {
    width: 8px;
    height: 8px;
    background: #a78bfa;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.thinking-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.thinking-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 900px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-content {
        text-align: center;
    }

    .hero-content h1 {
        font-size: 40px;
    }

    .hero-subtitle {
        margin: 0 auto 32px;
    }

    .hero-features {
        align-items: center;
    }

    .hero-form {
        display: flex;
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps {
        flex-direction: column;
        align-items: center;
    }

    .step-arrow {
        transform: rotate(90deg);
        padding: 0;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 100px 16px 60px;
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .auth-card {
        padding: 24px;
    }

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

    .section-title {
        font-size: 28px;
    }

    .message {
        max-width: 90%;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }
}
