@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f0e3;
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
}

.main-container {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: stretch;
}

/* SOL ANA MENÜ */
.sidebar.main-sidebar {
    width: 320px;
    background-color: #fce4ec;
    border-right: 1px solid #e0c8d1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.05);
    flex-shrink: 0;
}

.sidebar-header {
    text-align: center;
    margin-bottom: 30px;
    color: #555;
}

.sidebar-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 10px;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #26b050;
    border-radius: 50%;
    margin-right: 5px;
}

.sidebar-content {
    flex-grow: 1;
    overflow-y: auto;
}

.feature-section {
    margin-bottom: 25px;
}

    .feature-section h4 {
        color: #d13a81;
        border-bottom: 1px solid #e0c8d1;
        padding-bottom: 5px;
        margin-bottom: 10px;
    }

.theme-options {
    display: flex;
    gap: 10px;
}

.theme-btn {
    flex: 1;
    padding: 8px;
    border: 1px solid #e44d94;
    background-color: transparent;
    color: #e44d94;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

    .theme-btn:hover {
        background-color: #e44d94;
        color: #fff;
    }

.stats-list {
    list-style: none;
    padding: 0;
    margin: 0;
    color: #555;
}

    .stats-list li {
        margin-bottom: 8px;
    }

.sidebar-footer {
    display: flex;
    justify-content: space-around;
    padding-top: 20px;
    border-top: 1px solid #e0c8d1;
    flex-shrink: 0;
}

    .sidebar-footer a {
        text-decoration: none;
        color: #e44d94;
    }

/* SAĞ HAZIR SORULAR MENÜSÜ */
.sidebar.right-sidebar {
    width: 280px;
    background-color: #f8f0e3;
    border-left: 1px solid #e0c8d1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    flex-shrink: 0;
}

.right-sidebar h4 {
    color: #d13a81;
    text-align: center;
}

.prompt-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
}

    .prompt-list li {
        margin-bottom: 10px;
    }

    .prompt-list button {
        width: 100%;
        padding: 10px;
        border: 1px solid #e44d94;
        background-color: transparent;
        color: #e44d94;
        border-radius: 5px;
        cursor: pointer;
        transition: all 0.2s;
        text-align: left;
        font-size: 14px;
    }

        .prompt-list button:hover {
            background-color: #e44d94;
            color: #fff;
        }

.avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 10px;
    border: 2px solid #fff;
    align-self: flex-end;
}

.response-container {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
    justify-content: flex-start;
    max-width: 100%;
    align-self: flex-start;
}

.question-container {
    display: flex;
    margin-bottom: 10px;
    justify-content: flex-end;
    max-width: 100%;
    align-self: flex-end;
}

.response {
    max-width: 100%;
    background-color: #ffb6c1;
    color: #333;
    padding: 15px;
    border-radius: 20px 20px 20px 5px;
    font-size: 14px;
    word-break: break-word;
}

.question {
    max-width: 100%;
    background-color: #e44d94;
    color: #fff;
    padding: 15px;
    border-radius: 20px 20px 5px 20px;
    font-size: 14px;
    word-break: break-word;
}

.textMessage {
    display: flex;
    flex-shrink: 0;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 10px 0 10px 0; /* Alttaki boşluk artırıldı */
}

.textMessage-inner {
    display: flex;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.textMessage input {
    flex-grow: 1;
    padding: 15px;
    border: none;
    background-color: #f5f5f5;
    font-size: 14px;
}

    .textMessage input:focus {
        outline: none;
        background-color: #eee;
    }

.textMessage button {
    padding: 15px 20px;
    color: white;
    background-color: #e44d94;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

    .textMessage button:hover {
        background-color: #d13a81;
    }

.main-container.dark {
    background-color: #1e1f22;
    color: #dcddde;
}

    .main-container.dark .sidebar {
        border-color: #2c2f33;
    }

    .main-container.dark .main-sidebar {
        background-color: #2b2d31;
        color: #f2f3f5;
    }

    .main-container.dark .right-sidebar {
        background-color: #1e1f22;
    }

    .main-container.dark .sidebar-header,
    .main-container.dark .stats-list {
        color: #ffffff;
    }

    .main-container.dark .sidebar-footer a,
    .main-container.dark .feature-section h4,
    .main-container.dark .right-sidebar h4 {
        color: #949cf7;
        border-bottom-color: #2c2f33;
    }

    .main-container.dark .theme-btn,
    .main-container.dark .prompt-list button {
        border-color: #5865f2;
        color: #dbdee1;
        background-color: #404552;
    }

        .main-container.dark .theme-btn:hover,
        .main-container.dark .prompt-list button:hover {
            background-color: #5865f2;
            color: #ffffff;
            border-color: #5865f2;
        }

    .main-container.dark .chat-area {
        background-color: #313338;
    }

    .main-container.dark .response {
        background-color: #424549;
        color: #dcddde;
    }

    .main-container.dark .question {
        background-color: #5865f2;
        color: #ffffff;
    }

    .main-container.dark .textMessage input {
        background-color: #404552;
        color: #dcddde;
        border-color: transparent;
    }

        .main-container.dark .textMessage input:focus {
            background-color: #4a4e53;
        }

    .main-container.dark .textMessage button {
        background-color: #5865f2;
        color: #ffffff;
    }

        .main-container.dark .textMessage button:hover {
            background-color: #4752c4;
        }

    .main-container.dark .messages,
    .main-container.dark .sidebar-content,
    .main-container.dark .prompt-list {
        scrollbar-color: #202225 #2b2d31;
    }

        .main-container.dark .messages::-webkit-scrollbar-track,
        .main-container.dark .sidebar-content::-webkit-scrollbar-track,
        .main-container.dark .prompt-list::-webkit-scrollbar-track {
            background: #313338;
        }

        .main-container.dark .messages::-webkit-scrollbar-thumb,
        .main-container.dark .sidebar-content::-webkit-scrollbar-thumb,
        .main-container.dark .prompt-list::-webkit-scrollbar-thumb {
            background-color: #202225;
            border-radius: 20px;
            border: 2px solid #313338;
        }

.messages, .sidebar-content, .prompt-list {
    scrollbar-width: thin;
    scrollbar-color: #d13a81 #fce4ec;
}

    .messages::-webkit-scrollbar, .sidebar-content::-webkit-scrollbar, .prompt-list::-webkit-scrollbar {
        width: 8px;
    }

    .messages::-webkit-scrollbar-track, .sidebar-content::-webkit-scrollbar-track, .prompt-list::-webkit-scrollbar-track {
        background: #fce4ec;
        border-radius: 20px;
    }

.main-container.dark .messages::-webkit-scrollbar-track,
.main-container.dark .sidebar-content::-webkit-scrollbar-track,
.main-container.dark .prompt-list::-webkit-scrollbar-track {
    background: #23272a;
}

.messages::-webkit-scrollbar-thumb, .sidebar-content::-webkit-scrollbar-thumb, .prompt-list::-webkit-scrollbar-thumb {
    background-color: #d13a81;
    border-radius: 20px;
    border: 2px solid #fce4ec;
}

.main-container.dark .messages::-webkit-scrollbar-thumb,
.main-container.dark .sidebar-content::-webkit-scrollbar-thumb,
.main-container.dark .prompt-list::-webkit-scrollbar-thumb {
    background-color: #7289da;
    border-color: #23272a;
}

.messages::-webkit-scrollbar-thumb:hover, .sidebar-content::-webkit-scrollbar-thumb:hover, .prompt-list::-webkit-scrollbar-thumb:hover {
    background-color: #e44d94;
}

.main-container.dark .messages::-webkit-scrollbar-thumb:hover,
.main-container.dark .sidebar-content::-webkit-scrollbar-thumb:hover,
.main-container.dark .prompt-list::-webkit-scrollbar-thumb:hover {
    background-color: #90a4fe;
}

.chat-area {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background-color: #fce4ec;
}

.messages {
    flex: 1 1 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 10px;
    /* YENİ: Sorunlu min-height kuralı kaldırıldı */
}

    .messages > div:first-child {
        margin-top: auto;
    }

/* =============================================== */
/* === MOBİL UYUMLULUK STİLLERİ (992px altı) === */
/* =============================================== */

.mobile-header {
    display: none;
}

@media (max-width: 992px) {
    .sidebar.main-sidebar,
    .sidebar.right-sidebar {
        display: none;
        position: fixed;
        top: 0;
        height: 100%;
        z-index: 1000;
        box-shadow: 0 0 20px rgba(0,0,0,0.3);
        transition: transform 0.3s ease-in-out;
    }

    .sidebar.main-sidebar {
        left: 0;
        transform: translateX(-100%);
        border-right: none;
    }

    .sidebar.right-sidebar {
        right: 0;
        transform: translateX(100%);
        border-left: none;
        width: 260px;
    }

    .sidebar.mobile-open {
        display: flex;
        transform: translateX(0);
    }

    .chat-area {
        width: 100%;
        flex: 1;
    }

    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 1rem;
        height: 60px;
        background-color: #2b2d31;
        color: #fff;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 900;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }

    .main-container.dark .mobile-header {
        background-color: #2b2d31;
    }

    .main-container:not(.dark) .mobile-header {
        background-color: #fce4ec;
        color: #555;
    }

    .main-container {
        padding-top: 60px;
    }

    .mobile-title {
        font-size: 1.2rem;
        font-weight: 600;
    }

    .mobile-menu-btn {
        background: none;
        border: none;
        color: inherit;
        padding: 0.5rem;
        cursor: pointer;
    }

        .mobile-menu-btn svg {
            width: 28px;
            height: 28px;
        }

    .mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        backdrop-filter: blur(2px);
    }

    /* YENİ: Mesaj kutusunun mobilde kenarlara yapışmasını engelle */
    .textMessage {
        padding: 10px;
        max-width: 100%;
        box-sizing: border-box; /* Padding'in genişliği etkilememesi için */
    }
}
