
/* 右侧滑出式API设置面板样式 */
.api-settings-panel {
    position: fixed;
    top: 0;
    right: -500px;
    width: 500px;
    height: 100%;
    z-index: 1050;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* PC端媒体查询 */
@media (max-width: 768px) {
    .api-settings-panel  {
        width: 90%;
    }
}


.api-settings-panel.show {
    right: 0;
}

.api-settings-inner {
    height: 100%;
    background-color: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.api-settings-header {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa, #f1f3f5);
}

.api-settings-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
    font-weight: 600;
    background: linear-gradient(135deg, #007bff, #00c6ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.api-settings-close {
    font-size: 20px;
    cursor: pointer;
    color: #999;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.api-settings-close:hover {
    color: #333;
    background-color: rgba(0, 0, 0, 0.05);
    transform: rotate(90deg);
}

.api-settings-body {
    padding: 16px;
    flex: 1;
    overflow-y: auto;
}

.api-settings-footer {
    padding: 12px 16px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    background: linear-gradient(135deg, #f8f9fa, #f1f3f5);
}

/* 遮罩层 */
.api-settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.api-settings-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 表单样式优化 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
    font-size: 13px;
}

.form-control {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 13px;
    transition: all 0.3s;
    background-color: #f9f9f9;
}

.form-control:focus {
    border-color: #2196f3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.15);
    outline: none;
    background-color: #fff;
}

.form-text {
    font-size: 12px;
    color: #666;
    margin-top: 6px;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.custom-checkbox input {
    margin-right: 10px;
    width: 18px;
    height: 18px;
}

.custom-checkbox label {
    margin-bottom: 0;
    font-size: 15px;
    cursor: pointer;
}

/* 按钮样式优化 */
.btn-primary {
    background: linear-gradient(135deg, #007bff, #00c6ff);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0069d9, #00b2ff);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.btn-secondary {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
}

.btn-secondary:hover {
    background-color: #e5e5e5;
    transform: translateY(-1px);
}

/* 适配黑暗模式 */
.io-black-mode .api-settings-inner {
    background-color: #2a2a2a;
    color: #e1e1e1;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.io-black-mode .api-settings-header {
    border-bottom-color: #444;
    background: linear-gradient(135deg, #222, #2a2a2a);
}

.io-black-mode .api-settings-header h3 {
    background: linear-gradient(135deg, #007bff, #00c6ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.io-black-mode .api-settings-footer {
    border-top-color: #444;
    background: linear-gradient(135deg, #222, #2a2a2a);
}

.io-black-mode .form-group label {
    color: #e1e1e1;
}

.io-black-mode .form-control {
    background-color: #333;
    border-color: #555;
    color: #e1e1e1;
}

.io-black-mode .form-control:focus {
    background-color: #3a3a3a;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
}

.io-black-mode .form-text {
    color: #aaa;
}

.io-black-mode .btn-secondary {
    background-color: #444;
    color: #e1e1e1;
    border-color: #555;
}

.io-black-mode .btn-secondary:hover {
    background-color: #555;
}

#apiSettingsBtn:hover {
    cursor: pointer;
}

/* 设置面板内部样式 */
.settings-section {
    margin-bottom: 18px;
}

.settings-section-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
    background: linear-gradient(135deg, #007bff, #00c6ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.settings-divider {
    height: 1px;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.05));
    margin: 15px 0;
}

/* 模型选择样式 */
.model-selection-container {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 6px;
    background-color: #f9f9f9;
}

.model-list-container {
    padding: 6px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.model-item {
    width: calc(50% - 4px);
    padding: 5px;
    border-radius: 4px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    box-sizing: border-box;
}

.model-item:last-child {
    margin-bottom: 0;
}

.model-item:hover {
    background-color: #f0f0f0;
    border-color: #ddd;
}

.model-item.active {
    background-color: rgba(0, 123, 255, 0.1);
    border-color: rgba(0, 123, 255, 0.3);
}

.model-item-content {
    display: flex;
    align-items: center;
}

.model-item-icon {
    margin-right: 6px;
    font-size: 14px;
    color: #1890ff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.model-item-info {
    flex: 1;
    overflow: hidden;
}

.model-item-name {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.model-item-desc {
    font-size: 10px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 黑暗模式适配 */
.io-black-mode .settings-section-title {
    color: #e1e1e1;
}

.io-black-mode .model-selection-container {
    background-color: #333;
    border-color: #444;
}

.io-black-mode .model-item:hover {
    background-color: #3a3a3a;
    border-color: #555;
}

.io-black-mode .model-item.active {
    background-color: rgba(0, 123, 255, 0.2);
    border-color: rgba(0, 123, 255, 0.4);
}

.io-black-mode .model-item-desc {
    color: #aaa;
}

.io-black-mode .settings-divider {
    background: linear-gradient(to right, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
}

/* 侧边栏切换按钮样式优化 */
.sidebar-toggle-btn {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

#sidebarToggleBtn {
    width: 20px;
    height: 40px;
    border-radius: 0 20px 20px 0;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-left: none;
    box-shadow: 1px 0 3px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    outline: none;
}

#sidebarToggleBtn i {
    font-size: 12px;
    color: #666;
    transition: all 0.2s ease;
}

#sidebarToggleBtn:hover {
    background: #f0f0f0;
}

#sidebarToggleBtn:hover i {
    color: #007bff;
}

#sidebarToggleBtn:active {
    background: #e8e8e8;
}

/* 侧边栏收起状态的按钮样式 */
.sidebar-collapsed #sidebarToggleBtn {
    background: #ffffff;
}

.sidebar-collapsed #sidebarToggleBtn i {
    color: #007bff;
    transform: rotate(180deg);
}

.sidebar-collapsed #sidebarToggleBtn:hover {
    background: #f8f9fa;
}

/* 侧边栏过渡动画 */
.chatgpt-sidebar {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chatgpt-main {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 黑暗模式适配 */
.io-black-mode #sidebarToggleBtn {
    background: #2a2a2a;
    border-color: #444;
}

.io-black-mode #sidebarToggleBtn i {
    color: #aaa;
}

.io-black-mode #sidebarToggleBtn:hover {
    background: #333;
}

.io-black-mode #sidebarToggleBtn:hover i {
    color: #00c6ff;
}

.io-black-mode.sidebar-collapsed #sidebarToggleBtn {
    background: #2a2a2a;
}

/* 设置面板内部样式 */
.settings-section {
    margin-bottom: 18px;
}

.settings-section-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
    background: linear-gradient(135deg, #007bff, #00c6ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.settings-divider {
    height: 1px;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.05));
    margin: 15px 0;
}

/* 模型选择样式 */
.model-selection-container {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 6px;
    background-color: #f9f9f9;
}

.model-list-container {
    padding: 6px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.model-item {
    width: calc(50% - 4px);
    padding: 5px;
    border-radius: 4px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    box-sizing: border-box;
}

.model-item:last-child {
    margin-bottom: 0;
}

.model-item:hover {
    background-color: #f0f0f0;
    border-color: #ddd;
}

.model-item.active {
    background-color: rgba(0, 123, 255, 0.1);
    border-color: rgba(0, 123, 255, 0.3);
}

.model-item-content {
    display: flex;
    align-items: center;
}

.model-item-icon {
    margin-right: 6px;
    font-size: 14px;
    color: #1890ff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.model-item-info {
    flex: 1;
    overflow: hidden;
}

.model-item-name {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.model-item-desc {
    font-size: 10px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 黑暗模式适配 */
.io-black-mode .settings-section-title {
    color: #e1e1e1;
}

.io-black-mode .model-selection-container {
    background-color: #333;
    border-color: #444;
}

.io-black-mode .model-item:hover {
    background-color: #3a3a3a;
    border-color: #555;
}

.io-black-mode .model-item.active {
    background-color: rgba(0, 123, 255, 0.2);
    border-color: rgba(0, 123, 255, 0.4);
}

.io-black-mode .model-item-desc {
    color: #aaa;
}

.io-black-mode .settings-divider {
    background: linear-gradient(to right, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
}

.io-black-mode .btn-secondary {
    background-color: #444;
    color: #e1e1e1;
    border-color: #555;
}
.io-black-mode .btn-secondary:hover {
    background-color: #555;
}
