:root {
    --primary: #6366F1;
    --primary-light: #818CF8;
    --primary-dark: #4F46E5;
    --surface: #FFFFFF;
    --surface-dark: #F8FAFC;
    --text: #0F172A;
    --text-light: #64748B;
    --border: #E2E8F0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
}

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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--surface-dark);
    color: var(--text);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-container {
    width: 100%;
    max-width: 1200px;
    height: 90vh;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.nav-link {
    color: var(--text-light);
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.nav-link:hover {
    background: var(--surface-dark);
    color: var(--text);
}

.nav-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10B981;
    border-radius: 50%;
    position: relative;
}

.status-dot::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    70% { transform: scale(2); opacity: 0; }
    100% { transform: scale(1); opacity: 0; }
}

.nav-button {
    color: var(--text-light);
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.nav-button:hover {
    background: var(--surface-dark);
    color: var(--text);
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    scroll-behavior: smooth;
}

.welcome-message {
    text-align: center;
    margin: 2rem auto;
    max-width: 400px;
}

.welcome-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-md);
    color: white;
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.welcome-message h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.welcome-message p {
    color: var(--text-light);
}

.message-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    animation: messageIn 0.3s ease-out;
}

.message-group.user {
    align-self: flex-end;
}

.message {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    line-height: 1.5;
    width: fit-content; 
    max-width: 80%;  
}

.message.ai {
    background: var(--surface-dark);
    margin-right: auto; 
    margin-left: 0;
    box-shadow: var(--shadow-sm);
}

.message.user {
    background: var(--primary);
    color: white;
    margin-left: auto; 
    margin-right: 0;
    box-shadow: var(--shadow-sm);
}

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

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

.input-wrapper {
    display: flex;
    gap: 1rem;
    background: var(--surface-dark);
    padding: 0.75rem;
    border-radius: var(--radius-md);
}

textarea {
    flex: 1;
    border: none;
    background: none;
    resize: none;
    padding: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text);
    outline: none;
    max-height: 150px;
}

.send-button {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--primary);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.send-button:hover {
    background: var(--primary-dark);
}

.input-footer {
    margin-top: 0.75rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .app-container {
        height: 100vh;
        border-radius: 0;
    }

    .messages {
        padding: 1rem;
    }

    .message-group {
        max-width: 90%;
    }
}




