.header-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.home-link {
    display: flex;
    align-items: center;
    color: var(--accent);
    text-decoration: none;
}

.home-link svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.chatlog-container {
    background: var(--bg-playground);
    width: 100%;
    height: 90vh;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(89, 35, 217, 0.2);
}

.chatlog-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(89, 35, 217, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-playground);
}

.chatlog-header h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-light);
}

.chatlog-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(89, 35, 217, 0.2);
    border-radius: 8px;
    background: var(--bg-light);
    color: var(--text-light);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.action-btn:hover {
    background: var(--bg-darker);
    border-color: var(--accent);
}

.export-btn {
    background: var(--accent);
    color: var(--text-light);
    border: none;
}

.export-btn:hover {
    background: var(--accent-dark);
}

.filter-panel {
    padding: 1rem;
    background: var(--bg-playground);
    border-bottom: 1px solid rgba(89, 35, 217, 0.2);
    display: flex;
    gap: 1rem;
    transition: all 0.3s;
}

.filter-panel.hidden {
    display: none;
}

.filter-input {
    padding: 0.5rem;
    border: 1px solid rgba(89, 35, 217, 0.2);
    border-radius: 4px;
    font-size: 0.9rem;
    background: var(--bg-light);
    color: var(--text-light);
}

.chatlog-list {
    flex: 1;
    padding: 1.2rem 0.7rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    background: var(--bg-playground, #18181d);
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--bg-light);
}

.chatlog-list::-webkit-scrollbar {
    width: 7px;
    background: transparent;
}
.chatlog-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-radius: 8px;
}

.chatlog-entry {
    display: flex;
    align-items: stretch;
    background: #343541;
    border: none;
    border-radius: 8px;
    box-shadow: none;
    padding: 0.85rem 1.1rem;
    font-size: 0.93rem;
    font-weight: 400;
    color: #ececf1;
    position: relative;
    cursor: pointer;
    transition: background 0.13s, color 0.13s;
    outline: none;
    user-select: none;
    min-height: 40px;
    height: 40px;
}

.chatlog-entry-title {
    font-weight: 400;
    font-size: 0.93rem;
    color: #ececf1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    letter-spacing: 0;
    text-align: left;
    display: block;
    line-height: 1.4;
    min-height: 40px;
    height: auto;
    padding-left: 0;
    margin: 0;
    -webkit-mask-image: linear-gradient(to right, #000 90%, transparent 100%);
    mask-image: linear-gradient(to right, #000 90%, transparent 100%);
}

.chatlog-entry:hover, .chatlog-entry.active {
    background: #2a2b32;
    color: #fff;
}

.chatlog-entry:hover .chatlog-entry-title,
.chatlog-entry.active .chatlog-entry-title {
    color: #ececf1;
}

.chatlog-entry-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(89,35,217,0.13);
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.13);
    margin-right: 0.2rem;
    opacity: 0.93;
}

.chatlog-entry-delete {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #ff6b7a;
    font-size: 1.25rem;
    opacity: 0;
    margin-left: 0.5rem;
    cursor: pointer;
    transition: opacity 0.18s, color 0.18s, transform 0.18s;
    padding: 0.2rem;
    border-radius: 50%;
}

.chatlog-entry:hover .chatlog-entry-delete {
    opacity: 1;
    transform: scale(1.13);
}

.chatlog-entry-delete:active {
    color: #fff;
    background: #ff6b7a;
}

@media (max-width: 900px) {
    .chatlog-list {
        flex-direction: row;
        gap: 0.5rem;
        padding: 0.5rem 0.2rem;
    }
    .chatlog-entry {
        font-size: 0.99rem;
        padding: 0.7rem 0.7rem 0.7rem 0.7rem;
        border-radius: 12px;
        min-width: 120px;
        min-height: 44px;
    }
    .chatlog-entry-avatar {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }
}

.chatlog-entry-header {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid rgba(89, 35, 217, 0.2);
    background: var(--bg-light);
}

.chatlog-entry-info {
    flex: 1;
}

.message-preview {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.message-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.chatlog-messages {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--bg-playground);
}

.chat-message {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.message-avatar {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 50%;
    font-size: 1.2rem;
    color: var(--text-light);
    border: 1px solid rgba(89, 35, 217, 0.2);
}

.message-content {
    flex: 1;
    background: var(--bg-light);
    font-size: 0.95rem;
    color: var(--text-light);
}

.chat-message.user .message-content {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
    color: var(--text-light);
    border: none;
}

.chat-message.bot .message-content {
    background: var(--bg-light);
    color: var(--text-light);
}

.chatlog-sidebar {
    background: #202123 !important;
    border: none !important;
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    min-width: 260px;
    max-width: 260px;
    height: 100vh;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0 0.5rem 0 0.5rem;
    overflow: hidden;
    transition: width 0.25s cubic-bezier(0.4,0,0.2,1);
}

.chatlog-sidebar.minimized {
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    padding: 0 !important;
}

.sidebar-topbar {
    background: transparent;
    padding: 0.7rem 0 0.5rem 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.toggle-sidebar-btn {
    background: #fff;
    color: #111;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    transition: background 0.18s, color 0.18s;
}
.toggle-sidebar-btn:hover {
    background: #111;
    color: #fff;
    border: 1.5px solid #fff;
}

.chatlog-list {
    flex: 1;
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    background: transparent;
    scrollbar-width: thin;
    scrollbar-color: #343541 #202123;
}

.chatlog-sidebar.minimized .chatlog-list {
    opacity: 0;
    pointer-events: none;
    height: 0;
}

.chatlog-entry {
    display: flex;
    align-items: center;
    background: #343541;
    border: none;
    border-radius: 8px;
    box-shadow: none;
    padding: 0.85rem 1.1rem;
    font-size: 1rem;
    font-weight: 400;
    color: #ececf1;
    position: relative;
    cursor: pointer;
    transition: background 0.13s, color 0.13s;
    outline: none;
    user-select: none;
    min-height: 40px;
    height: 40px;
}
.chatlog-entry:hover, .chatlog-entry.active {
    background: #2a2b32;
    color: #fff;
}

.chatlog-entry-title {
    font-weight: 400;
    font-size: 1rem;
    color: #ececf1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    letter-spacing: 0;
    text-align: left;
    display: block;
    line-height: 1.4;
    min-height: 40px;
    height: auto;
    padding-left: 0.1rem;
    margin: 0;
}

.chatlog-entry:hover .chatlog-entry-title,
.chatlog-entry.active .chatlog-entry-title {
    color: #ececf1;
}

@media (max-width: 900px) {
    .chatlog-sidebar {
        min-width: 0;
        width: 100vw;
        max-width: 100vw;
        border-radius: 0;
        border-right: none;
        border-bottom: 1.5px solid #23232a;
        flex-direction: row;
        height: 60px;
        align-items: center;
        overflow-x: auto;
        box-shadow: none;
        padding: 0;
    }
    .chatlog-list {
        display: flex;
        flex-direction: row;
        flex: 1;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0.2rem 0.1rem;
        gap: 0.1rem;
    }
    .chatlog-entry {
        font-size: 0.95rem;
        padding: 0.7rem 0.7rem;
        border-radius: 7px;
        min-width: 90px;
        min-height: 32px;
        height: 32px;
    }
}

.new-chat-btn {
    margin: 0rem auto 0.7rem auto; 
    background: #343541 !important;
    color: #ececf1 !important;
    border: none !important;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0.1rem;
    width: 95%;
    box-shadow: none;
    transition: background 0.13s, color 0.13s;
    justify-content: center;
}
.new-chat-btn:hover {
    background: #2a2b32 !important;
    color: #fff !important;
}

.chatlog-sidebar.minimized .sidebar-title {
    display: none;
} 