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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Landing Page Styles */
.landing {
    min-height: 100vh;
}

.landing-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #2a2a2a;
    padding: 16px 0;
    z-index: 100;
}

.landing-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: white;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.nav {
    display: flex;
    gap: 32px;
}

.nav a {
    color: #a0a0a0;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.nav a:hover {
    color: white;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 24px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: transform 0.2s, opacity 0.2s;
}

.btn-primary:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

/* Hero Section */
.hero {
    padding: 140px 0 80px;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

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

.hero p {
    font-size: 18px;
    color: #a0a0a0;
    margin-bottom: 32px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 48px;
}

.btn-large {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 14px 32px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: transform 0.2s;
}

.btn-outline {
    background: transparent;
    color: white;
    padding: 14px 32px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    border: 1px solid #2a2a2a;
    transition: background 0.2s;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
}

.stats {
    display: flex;
    justify-content: center;
    gap: 48px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #667eea;
}

.stat-label {
    font-size: 14px;
    color: #a0a0a0;
}

/* Features Section */
.features {
    padding: 80px 0;
    background: #0f0f0f;
}

.features h2, .documents h2, .how-it-works h2 {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
}

.section-subtitle {
    text-align: center;
    color: #a0a0a0;
    margin-bottom: 48px;
}

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

.feature-card {
    background: #1a1a1a;
    padding: 32px;
    border-radius: 20px;
    border: 1px solid #2a2a2a;
    transition: transform 0.2s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.feature-card p {
    color: #a0a0a0;
    line-height: 1.5;
}

/* Documents Section */
.documents {
    padding: 80px 0;
    background: #0a0a0a;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.document-card {
    background: #1a1a1a;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid #2a2a2a;
    position: relative;
}

.doc-number {
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 16px;
}

.document-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.document-card p {
    color: #a0a0a0;
    font-size: 14px;
    line-height: 1.5;
}

/* How It Works */
.how-it-works {
    padding: 80px 0;
    background: #0f0f0f;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    text-align: center;
}

.step-number {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    margin: 0 auto 16px;
}

.step h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.step p {
    color: #a0a0a0;
    font-size: 14px;
}

/* CTA Section */
.cta {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.cta h2 {
    font-size: 36px;
    margin-bottom: 16px;
}

.cta p {
    font-size: 18px;
    margin-bottom: 32px;
    opacity: 0.9;
}

.cta .btn-large {
    background: white;
    color: #667eea;
}

/* Footer */
.footer {
    padding: 48px 0 24px;
    background: #0a0a0a;
    border-top: 1px solid #2a2a2a;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 32px;
}

.footer-logo .logo-icon {
    margin-bottom: 12px;
}

.footer-logo span {
    font-size: 18px;
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

.footer-logo p {
    color: #a0a0a0;
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: #a0a0a0;
    text-decoration: none;
    font-size: 14px;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #2a2a2a;
    color: #a0a0a0;
    font-size: 12px;
}

/* Chat Page Styles */
.chat-app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #0a0a0a;
}

.chat-header {
    background: #1a1a1a;
    border-bottom: 1px solid #2a2a2a;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #a0a0a0;
    text-decoration: none;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 20px;
    background: #2a2a2a;
}

.back-link:hover {
    background: #3a3a3a;
    color: white;
}

.badge {
    font-size: 12px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: white;
    font-weight: 500;
}

.chat-main {
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.messages-container {
    height: 100%;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.message {
    display: flex;
    gap: 12px;
    animation: fadeIn 0.2s ease;
    max-width: 100%;
}

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

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.message.user .message-avatar {
    background: #2a2a2a;
}

.message-content {
    max-width: 75%;
    min-width: 0;
}

.message-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 6px;
}

.message-role {
    font-size: 13px;
    font-weight: 600;
    color: #e0e0e0;
}

.message-time {
    font-size: 11px;
    color: #666;
}

.message-text {
    font-size: 14px;
    line-height: 1.5;
    color: #e0e0e0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.message.assistant .message-text {
    background: #1a1a1a;
    padding: 12px 16px;
    border-radius: 16px;
    border-top-left-radius: 4px;
    border: 1px solid #2a2a2a;
}

.message.user .message-text {
    background: #0a84ff;
    color: white;
    padding: 12px 16px;
    border-radius: 16px;
    border-top-right-radius: 4px;
}

.message-text ul, .message-text ol {
    margin: 8px 0;
    padding-left: 20px;
}

.message-text li {
    margin: 4px 0;
}

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

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #666;
    border-radius: 50%;
    animation: typingBlink 1.4s infinite;
}

@keyframes typingBlink {
    0%, 60%, 100% { opacity: 0.3; }
    30% { opacity: 1; }
}

.chat-footer {
    background: #1a1a1a;
    border-top: 1px solid #2a2a2a;
    padding: 16px 20px 20px;
    flex-shrink: 0;
}

.input-wrapper {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.input-wrapper textarea {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #2a2a2a;
    border-radius: 24px;
    font-family: inherit;
    font-size: 14px;
    resize: none;
    outline: none;
    background: #0a0a0a;
    color: #e0e0e0;
    max-height: 100px;
}

.input-wrapper textarea:focus {
    border-color: #667eea;
    background: #1a1a1a;
}

.send-btn {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.status-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    margin-left: 8px;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00ff88;
}

.status-dot.thinking {
    background: #ffaa00;
    animation: pulse 1s infinite;
}

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

.status-bar span {
    font-size: 12px;
    color: #666;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #2a2a2a;
    border-radius: 3px;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 32px;
    }
    
    .nav {
        display: none;
    }
    
    .features-grid, .documents-grid, .steps {
        grid-template-columns: 1fr;
    }
    
    .stats {
        flex-direction: column;
        gap: 16px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    .message-content {
        max-width: 85%;
    }
}