/* ============================================
   MANDATAIRE AUTO - Modern Dark Theme
   ============================================ */

:root {
    /* Colors - Inspired by automotive luxury */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --bg-card: #15151f;
    
    --accent-primary: #00d4aa;
    --accent-secondary: #00b894;
    --accent-glow: rgba(0, 212, 170, 0.3);
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6b6b7b;
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(0, 212, 170, 0.2);
    
    /* Gradients */
    --gradient-accent: linear-gradient(135deg, #00d4aa 0%, #00b894 50%, #009b7d 100%);
    --gradient-dark: linear-gradient(180deg, #0a0a0f 0%, #12121a 100%);
    --gradient-card: linear-gradient(145deg, #1a1a25 0%, #15151f 100%);
    
    /* Typography */
    --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Spacing */
    --nav-height: 70px;
    --section-padding: 100px;
    
    /* Effects */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px var(--accent-glow);
}

/* ============================================
   Reset & Base
   ============================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ============================================
   Navigation
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 600;
}

.logo-icon {
    font-size: 1.6rem;
}

.logo-text .accent {
    color: var(--accent-primary);
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after,
.nav-link:hover::after {
    width: 100%;
}

.nav-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 120px 40px 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
}

.glow-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-primary);
    top: -200px;
    right: -100px;
    opacity: 0.15;
}

.glow-2 {
    width: 400px;
    height: 400px;
    background: #6366f1;
    bottom: -100px;
    left: -100px;
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    animation: fadeInUp 0.6s ease;
}

.badge-icon {
    font-size: 1.1rem;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.gradient-text {
    display: block;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto 40px;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 60px;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-accent);
    color: #000;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 50px var(--accent-glow);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--accent-primary);
    background: rgba(0, 212, 170, 0.1);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    animation: fadeInUp 0.6s ease 0.4s both;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    font-family: var(--font-mono);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Section Common Styles
   ============================================ */

section {
    padding: var(--section-padding) 40px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* ============================================
   Agents Section
   ============================================ */

.agents-section {
    background: var(--bg-secondary);
}

.agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.agent-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.agent-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
}

.agent-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.agent-icon {
    width: 50px;
    height: 50px;
    background: rgba(0, 212, 170, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.agent-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.agent-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--accent-primary);
}

.agent-status .status-dot {
    width: 6px;
    height: 6px;
}

.agent-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.agent-capabilities {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.capability-tag {
    padding: 4px 10px;
    background: var(--bg-primary);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================
   Chat Section
   ============================================ */

.chat-section {
    background: var(--bg-primary);
}

.chat-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 600px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: visible;
    background: var(--bg-secondary);
}

.chat-sidebar {
    background: var(--bg-tertiary);
    padding: 24px;
    border-right: 1px solid var(--border-color);
}

.chat-sidebar h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.agent-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.agent-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.agent-btn:hover {
    background: var(--bg-secondary);
}

.agent-btn.active {
    background: rgba(0, 212, 170, 0.1);
    border-color: var(--accent-primary);
}

.agent-btn-icon {
    font-size: 1.3rem;
}

.agent-btn-name {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.chat-main {
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

.chat-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.chat-agent-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-agent-icon {
    font-size: 1.8rem;
}

.chat-agent-name {
    display: block;
    font-weight: 600;
}

.chat-agent-status {
    font-size: 0.8rem;
    color: var(--accent-primary);
}

.chat-messages {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 300px;
    max-height: 400px;
}

.message {
    max-width: 80%;
    animation: fadeInUp 0.3s ease;
}

.message-user {
    align-self: flex-end;
}

.message-system,
.message-agent {
    align-self: flex-start;
}

.message-content {
    padding: 14px 18px;
    border-radius: 16px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.message-user .message-content {
    background: var(--accent-primary);
    color: #000;
    border-bottom-right-radius: 4px;
}

.message-system .message-content,
.message-agent .message-content {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 4px;
}

.chat-input-container {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.chat-input {
    flex: 1;
    padding: 14px 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font-primary);
    outline: none;
    transition: border-color 0.2s ease;
}

.chat-input:focus {
    border-color: var(--accent-primary);
}

.chat-input::placeholder {
    color: var(--text-muted);
}

.chat-send {
    width: 50px;
    height: 50px;
    background: var(--accent-primary);
    border: none;
    border-radius: 12px;
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chat-send:hover {
    background: var(--accent-secondary);
    transform: scale(1.05);
}

/* ============================================
   API Section
   ============================================ */

.api-section {
    background: var(--bg-secondary);
}

.api-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.api-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    transition: all 0.3s ease;
}

.api-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
}

.api-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.api-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.api-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.api-link {
    color: var(--accent-primary);
    font-weight: 500;
    font-size: 0.9rem;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 40px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--accent-primary);
}

.footer-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 900px) {
    .nav-links {
        display: none;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        gap: 30px;
    }
    
    .chat-container {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .chat-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .agent-selector {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .chat-messages {
        min-height: 400px;
    }
}

@media (max-width: 600px) {
    .hero-buttons {
        flex-direction: column;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   Scrollbar
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

