/* 渲染质量设置按钮容器样式 - 现代扁平化风格 */
#quality-button-container {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 100;
    display: flex;
    align-items: center;
}

/* 渲染质量设置按钮样式 - 现代扁平化风格 */
#render-quality-button {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    backgroundColor: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    background-image: none;
    backgroundAttachment: scroll;
}

#render-quality-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#render-quality-button:active {
    transform: translateY(1px);
}

/* 渲染质量设置面板样式 - 现代扁平化风格 */
.quality-settings-panel {
    position: absolute;
    top: 70px;
    right: 16px;
    width: 340px;
    backgroundColor: #ffffff;
    borderRadius: 16px;
    boxShadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    color: #333333;
    padding: 24px;
    z-index: 101;
    display: none;
    fontFamily: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transform: translateY(10px);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
    background-image: none;
    backgroundAttachment: scroll;
}

/* 面板标题样式 - 现代扁平化风格 */
.quality-panel-title {
    fontSize: 18px;
    fontWeight: 600;
    marginBottom: 20px;
    paddingBottom: 12px;
    borderBottom: 1px solid #f0f0f0;
    color: #1a1a1a;
    backgroundColor: #ffffff;
    background-image: none;
    backgroundAttachment: scroll;
}

/* 面板内容样式 - 现代扁平化风格 */
.quality-panel-content {
    display: flex;
    flexDirection: column;
    gap: 18px;
}

/* 控制组样式 - 现代扁平化风格 */
.quality-control-group {
    margin-bottom: 16px;
    padding: 16px;
    backgroundColor: #f9fafb;
    borderRadius: 12px;
    transition: backgroundColor 0.2s ease;
}

.quality-control-group:hover {
    backgroundColor: #f1f3f5;
}

/* 控制组标题样式 - 现代扁平化风格 */
.quality-control-group-title {
    fontWeight: 600;
    marginBottom: 14px;
    color: #0056d2;
    fontSize: 15px;
    display: flex;
    align-items: center;
}

.quality-control-group-title svg {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

/* 控制行样式 - 现代扁平化风格 */
.quality-control-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    transition: opacity 0.2s ease;
}

/* 选择框样式 - 现代扁平化风格 */
.quality-control {
    width: 100%;
    padding: 12px 14px;
    borderRadius: 10px;
    border: 1px solid #e0e0e0;
    backgroundColor: white;
    color: #333;
    fontSize: 15px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.quality-control:hover {
    border-color: #0078d7;
}

.quality-control:focus {
    border-color: #0078d7;
    box-shadow: 0 0 0 3px rgba(0, 120, 215, 0.1);
}

.quality-control:blur {
    border-color: #e0e0e0;
    box-shadow: none;
}

/* SSAA级别选择器样式 - 现代扁平化风格 */
.ssaa-level {
    flex: 1;
    padding: 10px 12px;
    borderRadius: 8px;
    border: 1px solid #e0e0e0;
    backgroundColor: white;
    color: #333;
    fontSize: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

/* 复选框样式 - 现代扁平化风格 */
.quality-control-row input[type="checkbox"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accentColor: #0078d7;
    borderRadius: 4px;
    transition: transform 0.1s ease;
}

.quality-control-row input[type="checkbox"]:active {
    transform: scale(0.9);
}

.quality-checkbox-label {
    cursor: pointer;
    userSelect: none;
    fontSize: 15px;
    color: #333;
    transition: color 0.2s ease;
}

.quality-checkbox-label:hover {
    color: #0078d7;
}

/* 滑块样式 - 现代扁平化风格 */
.quality-slider-label {
    width: 120px;
    userSelect: none;
    fontSize: 14px;
    color: #555;
    whiteSpace: nowrap;
}

.quality-slider {
    flex: 1;
    height: 6px;
    borderRadius: 3px;
    outline: none;
    appearance: none;
    backgroundColor: #e0e0e0;
    transition: background 0.1s ease;
    background: linear-gradient(to right, #0078d7 0%, #0078d7 var(--slider-progress), #e0e0e0 var(--slider-progress), #e0e0e0 100%);
}

.quality-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0078d7;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: all 0.15s ease;
}

.quality-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0078d7;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: all 0.15s ease;
}

.quality-slider::-webkit-slider-thumb:hover,
.quality-slider::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 5px rgba(0, 120, 215, 0.3);
}

.quality-slider::-webkit-slider-thumb:active,
.quality-slider::-moz-range-thumb:active {
    transform: scale(0.95);
}

/* 重置按钮样式 - 现代扁平化风格 */
.quality-reset-button {
    padding: 12px 20px;
    backgroundColor: #f5f5f5;
    color: #666;
    border: 1px solid #e0e0e0;
    borderRadius: 8px;
    cursor: pointer;
    fontSize: 14px;
    fontWeight: 500;
    transition: all 0.2s ease;
    outline: none;
    flex: 1;
}

.quality-reset-button:hover {
    backgroundColor: #e9ecef;
    color: #333;
    borderColor: #d0d7dc;
}

.quality-reset-button:active {
    backgroundColor: #dde1e5;
    transform: translateY(1px);
}

/* 保存按钮样式 - 现代扁平化风格 */
.ardata-btn.small.quality-save-button {
    padding: 12px 20px;
    backgroundColor: #0078d7;
    color: white;
    border: none;
    borderRadius: 8px;
    cursor: pointer;
    fontSize: 14px;
    fontWeight: 500;
    transition: all 0.2s ease;
    outline: none;
    flex: 1;
    margin-left: 10px;
}

.ardata-btn.small.quality-save-button:hover {
    backgroundColor: #005a9e;
    box-shadow: 0 2px 8px rgba(0, 120, 215, 0.3);
}

.ardata-btn.small.quality-save-button:active {
    backgroundColor: #004a88;
    transform: translateY(1px);
}

/* 不兼容提示样式 - 现代扁平化风格 */
#aa-incompatibility-notice {
    color: #ff4d4f;
    fontSize: 13px;
    margin: 8px 0;
    padding: 8px 12px;
    borderRadius: 8px;
    backgroundColor: rgba(255, 77, 79, 0.1);
    display: none;
    borderLeft: 3px solid #ff4d4f;
}

/* 按钮容器样式 */
.quality-settings-panel .quality-panel-content > div:last-child {
    display: flex;
    justifyContent: space-between;
    marginTop: 10px;
}

/* 响应式设计 - 适配小屏幕设备 */
@media (max-width: 768px) {
    .quality-settings-panel {
        width: calc(100vw - 32px);
        right: 16px;
        left: 16px;
        max-height: 70vh;
        overflow-y: auto;
    }
    
    .quality-slider-label {
        width: 100px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .quality-settings-panel {
        top: 60px;
        width: calc(100vw - 20px);
        right: 10px;
        left: 10px;
    }
    
    .quality-control-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .quality-slider-label {
        width: 100%;
    }
    
    .quality-settings-panel .quality-panel-content > div:last-child {
        flex-direction: column;
        gap: 10px;
    }
    
    .ardata-btn.small.quality-save-button {
        margin-left: 0;
    }
}