:root {
    --primary-color: #ea8c30;
    --primary-hover: #d67a20;
    --bg-color: #fefbf3;
    --chat-bg: #ffffff;
    --text-color: #1a1a1a;
    --text-secondary: #64748b;
    --message-user-bg: #ea8c30;
    --message-user-text: #ffffff;
    --message-bot-bg: #f8fafc;
    --message-bot-text: #1a1a1a;
    --border-color: #e6dcc6;
    --grid-color: #f0ead6;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    /* Grid Pattern */
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px;
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 16px;
    gap: 24px;
}

/* Chat Container */
.chat-container {
    width: 100%;
    max-width: 800px;
    height: calc(100vh - 120px);
    background: var(--chat-bg);
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid var(--border-color);
    /* Daha keskin köşeler */
    border-radius: 4px;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

@media (min-width: 768px) {
    .chat-container {
        height: 80vh;
        max-height: 750px;
    }
}

/* Header */
.chat-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    z-index: 10;
}

.avatar img {
    width: 52px;
    height: 52px;
    /* Hafif kare form (Squircle) */
    border-radius: 8px;
    object-fit: cover;
    background: #f1f5f9;
    border: 1px solid var(--border-color);
}

.header-info h1 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    letter-spacing: -0.02em;
}

.header-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Messages Area */
.chat-messages {
    flex: 1;
    padding: 32px 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.message {
    max-width: 85%;
    padding: 16px 20px;
    /* Daha az yuvarlak köşeler */
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.6;
    animation: fadeIn 0.2s ease-out;
    position: relative;
}

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

.bot-message {
    background: var(--message-bot-bg);
    color: var(--message-bot-text);
    align-self: flex-start;
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 2px;
}

/* Bot mesajlarına sol kenar çizgisi (opsiyonel, şık durabilir) */
.bot-message::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    background: var(--primary-color);
    border-top-right-radius: 2px;
    border-bottom-right-radius: 2px;
    opacity: 0; /* Şimdilik kapalı, istenirse açılabilir */
}

.user-message {
    background: var(--message-user-bg);
    color: var(--message-user-text);
    align-self: flex-end;
    border-bottom-right-radius: 2px;
    box-shadow: 0 2px 4px rgba(234, 140, 48, 0.2);
}

/* Quick Actions */
.quick-actions {
    padding: 16px 24px 0;
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}

.action-btn {
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.action-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #fff;
    transform: translateY(-1px);
}

/* Input Area */
.chat-input-area {
    padding: 24px;
    background: var(--chat-bg);
    display: flex;
    gap: 12px;
    border-top: 1px solid var(--border-color);
}

#user-input {
    flex: 1;
    background: #fcfcfc;
    border: 1px solid var(--border-color);
    padding: 14px 20px;
    border-radius: 4px;
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s;
}

#user-input:focus {
    border-color: var(--primary-color);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(234, 140, 48, 0.1);
}

#send-btn {
    background: var(--primary-color);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 4px; /* Kareye yakın */
    color: white;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
}

#send-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

#send-btn svg {
    width: 20px;
    height: 20px;
}

/* Classic Website Button */
.classic-site-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.classic-site-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(234, 140, 48, 0.1);
}

/* Markdown Styles for Bot Messages */
.bot-message p { margin: 0 0 0.75em 0; }
.bot-message p:last-child { margin-bottom: 0; }
.bot-message h1, .bot-message h2, .bot-message h3 { 
    margin: 1em 0 0.5em 0; 
    font-weight: 600; 
    color: var(--text-color); 
}
.bot-message h1 { font-size: 1.25rem; }
.bot-message h2 { font-size: 1.1rem; }
.bot-message ul, .bot-message ol { margin: 0.5em 0; padding-left: 1.5em; }
.bot-message li { margin: 0.25em 0; }
.bot-message code {
    background: rgba(0, 0, 0, 0.04);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-family: monospace;
    color: #d67a20; /* Code rengini turuncu yaptık */
}
.bot-message pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 12px 16px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 0.75em 0;
}
.bot-message blockquote {
    border-left: 3px solid var(--primary-color);
    margin: 0.75em 0;
    padding-left: 1em;
    color: var(--text-secondary);
    background: rgba(234, 140, 48, 0.05); /* Hafif turuncu bg */
    padding: 8px 16px;
    border-radius: 0 4px 4px 0;
}
.bot-message strong { color: var(--primary-color); } /* Vurguları turuncu yap */
.bot-message a { color: var(--primary-color); text-decoration: underline; }
.bot-message table {
    border-collapse: collapse;
    margin: 0.75em 0;
    width: 100%;
}
.bot-message th, .bot-message td {
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    text-align: left;
}
.bot-message th { background: #f8fafc; font-weight: 600; }

/* Loading Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 16px 20px;
    background: var(--message-bot-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    border-bottom-left-radius: 2px;
    width: fit-content;
}
.dot {
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}
.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}
