/* Setting 按钮样式 */
.setting-switcher {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 100;
}

.setting-btn {
    display: flex;
    align-items: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 6px 18px;
    font-size: 1.4rem;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
    justify-content: center;
}

.setting-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Current Mode 显示样式 */
.current-mode-display {
    text-align: center;
    margin-bottom: 10px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
}

.mode-label {
    font-size: 12px;
    color: #666;
    margin-right: 8px;
}

.mode-value {
    font-size: 14px;
    font-weight: bold;
    color: #007bff;
}

/* Setting 弹窗样式 */
.setting-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    margin-left: calc(-50vw + 50%);
}

.setting-content {
    background: #fff;
    border: 2px solid #333;
    border-radius: 8px;
    padding: 30px;
    max-width: 550px;
    width: 90%;
    margin: 20px;
}

.setting-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
    text-align: center;
}

/* 两列网格布局 */
.setting-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 20px;
}

.setting-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 表单组样式 */
.form-group {
    margin-bottom: 0;
}

.form-group > label:first-child {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* 下拉框样式 */
.form-select {
    width: 100%;
    padding: 10px 35px 10px 12px;
    border: 2px solid #9b51f5;
    border-radius: 4px;
    font-size: 14px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239b51f5' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 12px center;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.form-select:focus {
    outline: none;
    border-color: #7b31d5;
    box-shadow: 0 0 0 3px rgba(155, 81, 245, 0.2);
}

.form-select option {
    padding: 10px;
    background: #fff;
    color: #333;
}

.form-select option:checked,
.form-select option:hover {
    background: #9b51f5;
    color: #fff;
}

/* 数字输入框样式 */
.form-group input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group input[type="number"]:focus {
    outline: none;
    border-color: #9b51f5;
    box-shadow: 0 0 0 3px rgba(155, 81, 245, 0.2);
}

.form-group input[type="number"]:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
    border-color: #ccc;
}

/* Toggle 开关样式 */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    margin: 0;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #9b51f5;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* 按钮区域样式 */
.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
}

.form-actions button {
    flex: 1;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-cancel {
    background: #e0e0e0;
    color: #333;
    border: 2px solid #333;
}

.btn-cancel:hover {
    background: #d0d0d0;
}

.btn-save {
    background: #9b51f5;
    color: #fff;
}

.btn-save:hover {
    background: #8040d0;
}

/* 响应式适配 */
@media (max-width: 480px) {
    .setting-content {
        padding: 16px;
        max-width: 95%;
    }

    .setting-content h3 {
        font-size: 18px;
    }

    .form-group label {
        font-size: 13px;
    }

    .radio-group {
        gap: 8px;
    }

    .radio-group label {
        padding: 8px;
        font-size: 13px;
    }

    .form-actions button {
        padding: 8px 16px;
        font-size: 13px;
    }
}
