/* 左侧边栏 */
.chatgpt-sidebar {
    height: 100%;
    overflow-y: auto;
    box-shadow: 2px 0 8px -5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.io-grey-mode .chatgpt-sidebar {
    background-color: #ffffff;
    color: #202123;
}

.io-black-mode .chatgpt-sidebar {
    background-color: #2c2e2f;
    color: #fff;
}

/* 侧边栏收起状态 */
.sidebar-collapsed .chatgpt-sidebar {
    display: none !important;
}

.sidebar-header {
    padding: 15px 12px;
    margin-top: 10px;
}

.btn-new-chat {
    background-color: rgba(45, 45, 45, 0.1);
    color: #555;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    text-align: left;
    margin-bottom: 15px;
    font-weight: 600;
    transition: all 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-new-chat:hover {
    background-color: rgba(45, 45, 45, 0.15);
    color: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.btn-new-chat:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.io-black-mode .btn-new-chat {
    background-color: rgba(255, 255, 255, 0.1);
    color: #e1e1e1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.io-black-mode .btn-new-chat:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

.sidebar-history {
    padding: 0 12px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 0 2px;
}

.btn-clear-all {
    background: none;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.8rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.io-grey-mode .btn-clear-all {
    color: #999;
}

.io-grey-mode .btn-clear-all:hover {
    background-color: rgba(0, 0, 0, 0.06);
    color: #666;
}

.io-black-mode .btn-clear-all {
    color: #8e8ea0;
}

.io-black-mode .btn-clear-all:hover {
    background-color: rgba(255, 255, 255, 0.12);
    color: #ccc;
}

.history-title {
    font-size: 0.8rem;
    padding: 8px 2px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 500;
}

.io-grey-mode .history-title {
    color: #8a8a8a;
}

.io-black-mode .history-title {
    color: #9e9e9e;
}

.history-item {
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 6px;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    position: relative;
    font-weight: 600;
}

.history-item:before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 8px;
    opacity: 0.7;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.history-item .delete-item {
    position: absolute;
    right: 8px;
    opacity: 0;
    color: #999;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    padding: 4px 6px;
    border-radius: 4px;
}

.history-item:hover .delete-item {
    opacity: 1;
}

.io-grey-mode .history-item .delete-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #ff4d4f;
}

.io-black-mode .history-item .delete-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ff7875;
}

.io-grey-mode .history-item {
    color: #333;
}

.io-grey-mode .history-item:before {
    background-color: #a1a1a1;
}

.io-grey-mode .history-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.io-grey-mode .history-item.active {
    background-color: rgba(0, 0, 0, 0.07);
    color: #202123;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.io-grey-mode .history-item.active:before {
    background-color: #606060;
    opacity: 1;
    transform: scale(1.2);
}

.io-black-mode .history-item {
    color: #d4d4d4;
}

.io-black-mode .history-item:before {
    background-color: #8e8ea0;
}

.io-black-mode .history-item:hover {
    background-color: rgba(255, 255, 255, 0.06);
}

.io-black-mode .history-item.active {
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.io-black-mode .history-item.active:before {
    background-color: #a0a0a0;
    opacity: 1;
    transform: scale(1.2);
}

.mobile-header {
    padding: 10px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.io-grey-mode .mobile-header {
    background-color: #ffffff;
}

.io-black-mode .mobile-header {
    background-color: #343541;
    border-bottom-color: #3e3f4b;
}

.drawer-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
}

.io-grey-mode .drawer-toggle {
    color: #202123;
}

.io-black-mode .drawer-toggle {
    color: #ececf1;
}

.btn-clear-chat {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 20px;
}

.io-grey-mode .btn-clear-chat {
    color: #888;
}

.io-grey-mode .btn-clear-chat:hover {
    background-color: rgba(0, 0, 0, 0.06);
    color: #555;
    transform: translateY(-1px);
}

.io-black-mode .btn-clear-chat {
    color: #8e8ea0;
}

.io-black-mode .btn-clear-chat:hover {
    background-color: rgba(255, 255, 255, 0.12);
    color: #ccc;
    transform: translateY(-1px);
}

.btn-clear-chat:active {
    transform: translateY(0);
}

.btn-clear-chat i {
    font-size: 1rem;
}
