:root {
    --primary: #6e48aa;
    --secondary: #9d50bb;
    --surface: #ffffff;
    --surface-alt: #f8f9fa;
    --text: #2d3436;
    --border-radius: 12px;
    --transition: all 0.2s ease;
}

[data-theme="dark"] {
    --primary: #8a63d2;
    --secondary: #b579d6;
    --surface: #121212;
    --surface-alt: #1e1e1e;
    --text: #f5f5f5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: var(--surface-alt);
    color: var(--text);
    transition: var(--transition);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.chat-container {
    max-width: 800px;
    width: 100%;
    background: var(--surface);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 90vh;
    max-height: 800px;
}

.chat-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 0.8rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

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

button {
    background: rgba(255,255,255,0.1);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: var(--transition);
}

button:hover {
    background: rgba(255,255,255,0.2);
}

.theme-toggle i:last-child,
[data-theme="dark"] .theme-toggle i:first-child {
    display: none;
}

[data-theme="dark"] .theme-toggle i:last-child {
    display: block;
}

.chat-box {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    scroll-behavior: smooth;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.message {
    display: flex;
    gap: 0.8rem;
    max-width: 90%;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

.message.bot {
    align-self: flex-start;
}

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

.avatar {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--surface-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.message .content {
    padding: 0.8rem 1rem;
    border-radius: var(--border-radius);
    background: var(--primary);
    color: white;
    line-height: 1.4;
    word-break: break-word;
}

.message.user .content {
    background: var(--secondary);
}

.input-area {
    display: flex;
    gap: 0.8rem;
    padding: 0.8rem;
    background: var(--surface-alt);
    align-items: flex-end;
}

#userInput {
    flex: 1;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    background: var(--surface);
    color: var(--text);
    outline: none;
    resize: none;
    max-height: 150px;
    line-height: 1.4;
    white-space: pre-wrap;
}

.send-btn {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

/* Animasyonlar */
@keyframes fadeIn {
    to { opacity: 1; }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    body {
        padding: 0;
    }
    
    .chat-container {
        height: 100vh;
        max-height: none;
        border-radius: 0;
    }
    
    .message {
        max-width: 85%;
    }
}