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

:root {
    --primary: #1216eb;
    --secondary: #0a5edd;
    --accent: #EC4899;
    --success: #10B981;
    --warning: #F59E0B;
    --bg-main: #FAFBFC;
    --bg-card: #FFFFFF;
    --text-primary: #111827;
    --text-secondary: #4a4b4e;
    --border: #E5E7EB;
}

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

body {
    font-family: 'Nunito', serif;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.8;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Nunito';
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.4;
}

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
    z-index: -1;
}

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

/* Header */
.header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1.25rem 0;
}

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

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
}

.logo-icon {
    width: 75px;
    height: 75px;
    background: rgb(255, 255, 255);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.logo-text {
    font-family: 'Lora', Georgia, serif;
    font-weight: 600;
    font-size: 1.5rem;
    letter-spacing: 0;
}

.logo-subtext {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.nav {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
    position: relative;
    cursor: pointer;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.2s;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link:hover::after {
    width: 100%;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.25rem;
}

.lang-btn {
    padding: 0.4rem 0.8rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.lang-btn:hover {
    color: var(--text-primary);
    background: var(--bg-main);
}

.lang-btn.active {
    background: var(--primary);
    color: white;
}

/* Hero */
.hero {
    padding: 5rem 0;
    text-align: center;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    text-decoration: none;
    display: inline-block;
    font-family: 'Lora', Georgia, serif;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(18, 22, 235, 0.2);
}

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

.btn-secondary:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.stat-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Agents Section */
.agents-section {
    padding: 5rem 0;
}

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

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

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

.agent-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: visible;
}

.agent-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--icon-bg-1, var(--primary)), var(--icon-bg-2, var(--accent)));
    opacity: 0;
    transition: opacity 0.4s;
}

.agent-card:hover::before {
    opacity: 1;
}

.agent-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(99, 102, 241, 0.1);
    border-color: transparent;
}

.agent-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}

.agent-icon-wrapper {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--icon-bg-1), var(--icon-bg-2));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.15),
        inset 0 -2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.agent-icon-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.agent-card:hover .agent-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.2),
        inset 0 -2px 8px rgba(0, 0, 0, 0.15);
}

.agent-card:hover .agent-icon-wrapper::after {
    opacity: 1;
}

.agent-info {
    width: 100%;
}

.agent-info h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.agent-title {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(236, 72, 153, 0.08));
    border-radius: 12px;
    display: inline-block;
    margin: 0 auto;
}

.agent-status-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.agent-status-badge.ready {
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
}

.agent-status-badge.dev {
    background: linear-gradient(135deg, #F59E0B, #EF4444);
    color: white;
}

.agent-status-badge.testing {
    background: linear-gradient(135deg, #3B82F6, #06B6D4);
    color: white;
}

.agent-description {
    display: none;
}

.agent-features {
    display: none;
}

.agent-features li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.agent-features li::before {
    content: '✓';
    color: var(--success);
    font-weight: bold;
}

/* Info Section */
.info-section {
    padding: 5rem 0;
    background: white;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.info-card {
    padding: 2rem;
    border-radius: 16px;
    background: var(--bg-main);
    border: 1px solid var(--border);
}

.info-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.info-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.info-text {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.footer-logo {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.footer-brand-text h3 {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.footer-brand-text p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Chat Page */
.chat-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.chat-container {
    width: 100%;
    max-width: 900px;
    background: var(--bg-card);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.chat-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: white;
}

.back-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

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

.chat-agent-info h2 {
    margin-bottom: 0.25rem;
}

.chat-agent-role {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.chat-box {
    height: 600px;
    display: flex;
    flex-direction: column;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

.message {
    margin-bottom: 1.5rem;
    display: flex;
}

.message-user {
    justify-content: flex-end;
}

.message-assistant {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 70%;
    padding: 1rem 1.5rem;
    border-radius: 16px;
    line-height: 1.5;
}

.message-user .message-bubble {
    background: var(--primary);
    color: white;
}

.message-assistant .message-bubble {
    background: var(--bg-main);
    color: var(--text-primary);
}

.loading {
    display: flex;
    gap: 0.5rem;
}

.loading-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-secondary);
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dot:nth-child(2) {
    animation-delay: -0.16s;
}

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

.input-area {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    background: white;
}

.input-wrapper {
    display: flex;
    gap: 1rem;
}

.message-input {
    flex: 1;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: 'Merriweather', Georgia, serif;
    font-size: 1rem;
    resize: vertical;
    min-height: 50px;
    max-height: 150px;
}

.message-input:focus {
    outline: none;
    border-color: var(--primary);
}

.send-btn {
    padding: 1rem 2rem;
}

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

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
}

.modal-content {
    background: white;
    border-radius: 24px;
    max-width: 700px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 2.5rem;
    border-radius: 24px 24px 0 0;
}

.modal-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.modal-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

.modal-body {
    padding: 2.5rem;
}

.modal-section {
    margin-bottom: 2rem;
}

.modal-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.modal-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.modal-section ul {
    list-style: none;
    margin-top: 1rem;
}

.modal-section li {
    padding: 0.75rem 0;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    line-height: 1.6;
}

.modal-section li::before {
    content: '•';
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: bold;
    flex-shrink: 0;
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .nav {
        gap: 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .agents-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}