/* ==== GENEL ==== */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #0f172a;
    color: #e2e8f0;
    margin: 0;
    padding: 0;
}

/* ==== ÜST BAR ==== */
header {
    background-color: #111827;
    color: #f1f5f9;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #1e293b;
}

    header h1 {
        margin: 0;
        font-size: 1.5rem;
        font-weight: 600;
    }

nav a {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 500;
}

    nav a:hover {
        color: #93c5fd;
    }

/* ==== ANA DÜZEN ==== */
.chat-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    height: calc(100vh - 70px);
}

/* ==== SOL TARAF (GEÇMİŞ) ==== */
.chat-history {
    background-color: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    overflow-y: auto;
    border-right: 1px solid #334155;
}

    .chat-history h3 {
        margin-bottom: 1rem;
        border-bottom: 1px solid #334155;
        padding-bottom: 0.5rem;
        font-size: 1.1rem;
        font-weight: 600;
    }

    .chat-history a {
        color: #94a3b8;
        text-decoration: none;
        display: block;
        padding: 0.6rem 0.8rem;
        border-radius: 8px;
    }

        .chat-history a:hover {
            background-color: #334155;
        }

/* ==== SAĞ TARAF (SOHBET PENCERESİ) ==== */
.chat-window {
    background-color: #0f172a;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
}

/* ==== MESAJ ALANI ==== */
.messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

/* ==== MESAJ BALONCUKLARI ==== */
.message {
    max-width: 70%;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    line-height: 1.4;
    word-wrap: break-word;
}

    .message.user {
        background-color: #2563eb;
        color: white;
        align-self: flex-end;
        border-bottom-right-radius: 0;
    }

    .message.ai {
        background-color: #1e293b;
        color: #e2e8f0;
        align-self: flex-start;
        border-bottom-left-radius: 0;
    }

/* ==== FORM ==== */
form {
    display: flex;
    background-color: #1e293b;
    padding: 0.8rem;
    border-radius: 12px;
    margin-top: 1rem;
}

input[type="text"] {
    flex: 1;
    background-color: transparent;
    color: #f1f5f9;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 0.5rem;
}

button {
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

    button:hover {
        background-color: #1d4ed8;
    }

/* Scroll bar özelleştirme */
.messages::-webkit-scrollbar {
    width: 8px;
}

.messages::-webkit-scrollbar-thumb {
    background-color: #334155;
    border-radius: 8px;
}


/* ==== MESAJ ANİMASYONU ==== */
.message {
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
}

    .message.show {
        opacity: 1;
        transform: translateY(0);
    }

/* ==== MESAJ GÖNDER BUTONU ANİMASYONU ==== */
button {
    transition: background-color 0.3s, transform 0.2s;
}

    button:hover {
        transform: scale(1.05);
    }

/* ==== MESAJLARIN SCROLL İLE YUMUŞAK KAYMASI ==== */
.messages {
    scroll-behavior: smooth;
}

/* ==== KÜÇÜK DETAY: MESAJ BALONU GÖLGE ==== */
.message.user {
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
}

.message.ai {
    box-shadow: 0 2px 6px rgba(30, 41, 59, 0.4);
}
