.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

body.theme-light .modal {
    background-color: rgba(0, 0, 0, 0.3);
}

.modal-content {
    background-color: #252526;
    max-width: 600px;
    width: 90%;
    margin: 10vh auto;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.theme-light .modal-content {
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-header {
    padding: 16px 20px;
    background-color: #2d2d2d;
    border-bottom: 1px solid #444;
    border-radius: 6px 6px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.theme-light .modal-header {
    background-color: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h2 {
    margin: 0;
    color: #fff;
    font-size: 18px;
}

body.theme-light .modal-header h2 {
    color: #333333;
}

.close-button {
    background: none;
    border: none;
    color: #999;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

body.theme-light .close-button {
    color: #666666;
}

.close-button:hover {
    color: #fff;
}

body.theme-light .close-button:hover {
    color: #333333;
}

.modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.form-group {
    margin-bottom: 16px;
}

.form-group:last-child {
    margin-bottom: 0;
}

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

body.theme-light .form-group label {
    color: #333333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    background-color: #3c3c3c;
    border: 1px solid #555;
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
    box-sizing: border-box;
}

body.theme-light .form-group input,
body.theme-light .form-group select,
body.theme-light .form-group textarea {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    color: #333333;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0078d4;
}

body.theme-light .form-group input:focus,
body.theme-light .form-group select:focus,
body.theme-light .form-group textarea:focus {
    border-color: #0066b8;
}

.form-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

.save-button {
    background-color: #0078d4;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

body.theme-light .save-button {
    background-color: #0066b8;
}

.save-button:hover {
    background-color: #106ebe;
}

body.theme-light .save-button:hover {
    background-color: #005ba1;
}

/* NuGet Configuration Dialog */
.nuget-config-section {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #2d2d2d;
    border-radius: 4px;
}

body.theme-light .nuget-config-section {
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
}

.nuget-config-section h3 {
    margin: 0 0 15px 0;
    color: #fff;
    font-size: 16px;
}

body.theme-light .nuget-config-section h3 {
    color: #333333;
}

.package-references {
    margin-bottom: 15px;
}

.no-packages-message {
    color: #888;
    font-style: italic;
    padding: 10px;
    text-align: center;
    background-color: #363636;
    border-radius: 4px;
}

body.theme-light .no-packages-message {
    color: #666666;
    background-color: #f0f0f0;
}

.package-reference {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #363636;
    border-radius: 4px;
    margin-bottom: 8px;
}

body.theme-light .package-reference {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
}

.package-reference-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.package-reference-name {
    color: #fff;
    font-weight: 500;
}

body.theme-light .package-reference-name {
    color: #333333;
}

.package-reference-version {
    color: #0078d4;
    font-size: 13px;
}

body.theme-light .package-reference-version {
    color: #0066b8;
}

.add-package-button {
    background-color: #13a10e;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

body.theme-light .add-package-button {
    background-color: #28a745;
}

.add-package-button:hover {
    background-color: #16c60c;
}

body.theme-light .add-package-button:hover {
    background-color: #218838;
}

/* Model Settings Dialog */
.model-settings {
    padding: 0;
}

.model-list-header {
    margin-bottom: 16px;
}

.model-list-header h3 {
    margin: 0;
    color: #fff;
    font-size: 16px;
}

body.theme-light .model-list-header h3 {
    color: #333333;
}

.add-model-button {
    padding: 8px 16px;
    background-color: #0078d4;
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.add-model-button:hover {
    background-color: #106ebe;
}

#modelList {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.model-item {
    padding: 12px;
    background-color: #2d2d2d;
    border: 1px solid #444;
    border-radius: 4px;
}

body.theme-light .model-item {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
}

.model-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.model-name {
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
}

body.theme-light .model-name {
    color: #333333;
}

.model-endpoint {
    font-size: 12px;
    color: #888;
}

body.theme-light .model-endpoint {
    color: #666666;
}

.model-api-key {
    font-size: 12px;
    color: #888;
}

body.theme-light .model-api-key {
    color: #666666;
}

.model-backend-status {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    background-color: #363636;
}

body.theme-light .model-backend-status {
    color: #666666;
    background-color: #f0f0f0;
}

.model-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

.edit-model,
.delete-model {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 3px;
    border: none;
    cursor: pointer;
}

.edit-model {
    background-color: #0078d4;
    color: #fff;
}

.edit-model:hover {
    background-color: #106ebe;
}

.delete-model {
    background-color: #d83b01;
    color: #fff;
}

.delete-model:hover {
    background-color: #f03f03;
}

/* API Key Input */
.api-key-input {
    position: relative;
    display: flex;
    align-items: center;
}

.api-key-input input {
    flex: 1;
    padding-right: 40px;
}

.toggle-password {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 16px;
    transition: color 0.2s;
}

body.theme-light .toggle-password {
    color: #666666;
}

.toggle-password:hover {
    color: #fff;
}

body.theme-light .toggle-password:hover {
    color: #333333;
}

/* 添加模型按钮样式 */
body.theme-light .add-model-button {
    background-color: #0066b8;
}

body.theme-light .add-model-button:hover {
    background-color: #005ba1;
}

/* 编辑和删除按钮样式 */
body.theme-light .edit-model {
    background-color: #0066b8;
}

body.theme-light .delete-model {
    background-color: #dc3545;
}

body.theme-light .delete-model:hover {
    background-color: #c82333;
}

/* 修改滚动条样式 */
body.theme-light .modal-body::-webkit-scrollbar {
    width: 10px;
}

body.theme-light .modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

body.theme-light .modal-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 5px;
}

body.theme-light .modal-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 复选框标签样式 */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #fff;
    font-size: 13px;
}

body.theme-light .checkbox-label {
    color: #333333;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.setting-description {
    margin-top: 5px;
    color: #999;
    font-size: 12px;
    padding-left: 22px;
}

body.theme-light .setting-description {
    color: #666;
} 