/* watermark.css */

/* --- 水印样式 --- */
body::after {
    content: ""; /* 伪元素必须有content属性 */
    
    /* 
      内联SVG背景图片实现文字水印:
      - "天添美悦" 是水印文字。
      - width/height: 控制单个水印单元的大小，影响重复密度。
      - style 内的 font: 控制字体、大小、粗细。
      - style 内的 fill: 控制文字颜色和透明度 (rgba的alpha值)。
      - text 内的 transform: 控制文字旋转角度和中心。
    */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg width='280' height='120' xmlns='http://www.w3.org/2000/svg'%3E%3Cstyle%3E.watermark-text %7B font: bold 22px 'Microsoft YaHei', 'PingFang SC', sans-serif; fill: rgba(100,100,100,0.09); %7D%3C/style%3E%3Ctext x='50%25' y='50%25' dominant-baseline='middle' text-anchor='middle' class='watermark-text' transform='rotate(-35, 140, 60)'%3E天添美悦%3C/text%3E%3C/svg%3E");
    
    background-repeat: repeat; /* 平铺背景图片 */
    
    position: fixed; /* 固定定位，使其不随页面滚动而滚动 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    opacity: 1; /* SVG内部已经控制了透明度，这里通常设为1。如果SVG水印不够明显，可以适当调高SVG内fill的alpha值或这里的opacity */
    z-index: 9999;  /* 将水印置于顶层，确保其可见性 */
    pointer-events: none; /* 确保水印不会捕获鼠标事件，允许用户与水印下的内容交互 */
}

/* --- 禁用页面文本选择 --- */
body {
    -webkit-user-select: none; /* Safari and Chrome (older versions) */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* Internet Explorer/Edge */
    user-select: none;         /* Standard syntax */

    /* 
       可选: 如果水印因为body的背景色而不可见，可以尝试取消下面这行注释。
       但这可能会影响您页面的原有背景设计，请谨慎使用。
       或者确保您的body背景色本身比较浅。
    */
    /* background-color: transparent !important; */
}

/* 
   确保输入框和文本区域等表单元素中的文本仍然可以选择和编辑。
   通常浏览器默认会这样做，但为了明确，可以添加以下规则。
   如果您的页面中还有其他需要允许文本选择的特定元素，也可以用类似的方式添加。
*/
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
textarea {
    -webkit-user-select: auto !important;
    -moz-user-select: text !important; /* Firefox 使用 text */
    -ms-user-select: auto !important;
    user-select: auto !important;
}