/* ═══════════════════════════════════════════════════════════════════════════
   CHAT PAGE STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Chat Container ──────────────────────────────────────────────────────── */
.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

/* ─── Welcome Screen ──────────────────────────────────────────────────────── */
.welcome-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-align: center;
    animation: fadeInUp 0.6s ease;
}

.welcome-screen.hidden {
    display: none;
}

.welcome-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    filter: drop-shadow(0 0 24px rgba(108, 99, 255, 0.3));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.welcome-screen h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-screen p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 28px;
}

.suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 600px;
}

.chip {
    padding: 10px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.chip:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* ─── Messages ────────────────────────────────────────────────────────────── */
.messages {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

.message {
    display: flex;
    gap: 14px;
    animation: fadeInUp 0.35s ease;
}

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.message.assistant .message-avatar {
    background: rgba(108, 99, 255, 0.15);
    border: 1px solid rgba(108, 99, 255, 0.3);
}

.message.user .message-avatar {
    background: rgba(0, 210, 160, 0.15);
    border: 1px solid rgba(0, 210, 160, 0.3);
}

.message-bubble {
    max-width: 75%;
    padding: 14px 18px;
    border-radius: var(--radius-lg);
    font-size: 0.92rem;
    line-height: 1.65;
    word-wrap: break-word;
}

.message.assistant .message-bubble {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-top-left-radius: 4px;
}

.message.user .message-bubble {
    background: var(--accent-primary);
    color: #fff;
    border-top-right-radius: 4px;
}

/* Markdown içerik stilleri */
.message-bubble p {
    margin-bottom: 8px;
}

.message-bubble p:last-child {
    margin-bottom: 0;
}

.message-bubble ul, .message-bubble ol {
    padding-left: 20px;
    margin-bottom: 8px;
}

.message-bubble li {
    margin-bottom: 4px;
}

.message-bubble strong {
    font-weight: 600;
}

.message-bubble code {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
}

.message-bubble pre {
    background: var(--bg-primary);
    padding: 12px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: 8px 0;
}

/* ─── Typing Indicator ───────────────────────────────────────────────────── */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 18px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    30% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ─── Input Area ──────────────────────────────────────────────────────────── */
.input-area {
    padding: 16px 24px 20px;
    border-top: 1px solid var(--border-color);
    background: rgba(15, 15, 20, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-shrink: 0;
}

.input-form {
    max-width: 800px;
    margin: 0 auto;
}

.input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 10px 14px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input-wrapper:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

.input-wrapper textarea {
    flex: 1;
    color: var(--text-primary);
    font-size: 0.92rem;
    line-height: 1.5;
    resize: none;
    max-height: 120px;
    min-height: 24px;
}

.input-wrapper textarea::placeholder {
    color: var(--text-muted);
}

.btn-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.btn-send:hover {
    background: var(--accent-primary-hover);
    box-shadow: var(--shadow-glow);
    transform: scale(1.05);
}

.btn-send:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.input-hint {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .chat-container {
        padding: 16px;
    }

    .message-bubble {
        max-width: 88%;
    }

    .suggestion-chips {
        flex-direction: column;
        align-items: stretch;
    }

    .input-area {
        padding: 12px 16px 16px;
    }
}
