.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

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

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="password"],
input[type="number"],
select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

input[type="range"] {
    width: 100%;
    margin: 10px 0;
}

button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background-color: #45a049;
}

.status {
    margin-top: 20px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

.status.success {
    display: block;
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}

.status.error {
    display: block;
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}

.help-text {
    display: block;
    color: #666;
    font-size: 12px;
    margin-top: 4px;
}

input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.switch-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: bold;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked+.slider {
    background-color: #4CAF50;
}

input:checked+.slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

#customApiSettings {
    border: 1px solid #ddd;
    padding: 15px;
    margin: 10px 0;
    border-radius: 4px;
}

.required-mark {
    color: #ff0000;
    margin-left: 4px;
}

.range-with-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.range-with-input input[type="range"] {
    flex: 1;
    margin: 0;
}

.range-with-input input[type="number"] {
    width: 80px;
    text-align: center;
}

input[type="number"].invalid {
    border-color: #ff0000;
    background-color: #fff0f0;
}

.secure-input {
    width: 100%;
    padding: 8px;
    padding-right: 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: #fff;
    font-family: monospace;
    box-sizing: border-box;
}

.secure-input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 5px rgba(74, 175, 80, 0.2);
}

.secure-input::-webkit-context-menu {
    display: block;
}

.toggle-visibility {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.toggle-visibility:hover {
    color: #333;
}

.eye-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 4px;
}

.eye-icon svg {
    width: 20px;
    height: 20px;
    color: #666;
    transition: color 0.2s ease;
}

.eye-icon:hover svg {
    color: #fff;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.button-group {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.secondary-button {
    background-color: #6c757d;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.secondary-button:hover {
    background-color: #5a6268;
}

#save {
    background-color: #4CAF50;
}

#save:hover {
    background-color: #45a049;
}

.status.warning {
    display: block;
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* 添加常规设置的样式 */
.settings-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.setting-item {
    margin: 15px 0;
}

.setting-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.setting-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* 子设置项样式 */
.sub-settings {
    margin-left: 24px;
    margin-top: 8px;
    padding: 8px;
    border-left: 2px solid #eee;
    display: none;
    /* 默认隐藏 */
}

.sub-settings .setting-item {
    margin-top: 8px;
}

.sub-settings input[type="number"] {
    width: 60px;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

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

/* 添加系统提示词文本框样式 */
#systemPrompt {
    width: 100%;
    min-height: 60px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    resize: vertical;
    font-family: inherit;
}

#systemPrompt:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 5px rgba(74, 175, 80, 0.2);
}