跳到正文

科技·工程

stylus修改-洛谷

ylj_yylc约 50 分钟
原文

这是 2026年9月11日 存档的第 2 版,不是当前版本。查看当前版本

文章信息与版本

文章信息

发布
2026年9月8日
收录
2026年9月11日
更新
2026年11月19日
篇幅
约 50 分钟

版本

  1. v5当前
  2. v4
  3. v3
  4. v2
更早的 1 个版本
  1. v1
C++
/* ==UserStyle==
@name         乐正绫&洛天依-白石溪(最终修复版)
@version     2026.9.10.22.00
@namespace    userstyles.world/user/acerkaio
@description  洛谷美化。恢复所有背景图与广告,字体加粗防模糊,鼠标悬停卡片时该卡片单独显示。
@author       ylj_yylc(御绫军_阴雨鎏尘)
@license      CC BY-NC-SA
==/UserStyle== */

/* ============================================================
   主站(首页/讨论区等)
   ============================================================ */
@-moz-document regexp("https://www.luogu(.org|.com.cn)/(?!blog).*") {
/* --- 背景图(保持你原设定) --- */
html > body {
    background-image: url(https://cdn.luogu.com.cn/upload/image_hosting/dnr6trms.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: .8; /* 保持你原来的透明度设定 */
    color: #fff !important;
    text-shadow: 0 1px 1px rgba(238, 0, 0, 0.6);
    opacity:0.7;
}

/* --- 字体防模糊:加粗 + 无发光阴影 --- */
html > body, p, div, span, li, td, th, h1, h2, h3, h4, h5, h6 {
    font-weight: 600 !important;
    text-shadow: none !important;
}
    /* --- 修复 benben 讨论区字体隐身问题(针对浅色背景强制深色字) --- */
.lg-content-table-left,
.lg-content-table-left *,
.am-comment-main,
.am-comment-main *,
.center > .am-comment-avatar + div,
.benben-container,
.benben-container * {
    color: #3E2723 !important; /* 深褐色,与浅色背景对比清晰 */
    text-shadow: none !important;
}
 .lcolor-bg-background.main{
        background-image:
        url(https://cdn.luogu.com.cn/upload/image_hosting/dnr6trms.png);
    background-repeat: no-repeat, no-repeat;
    background-size: cover, cover;
    background-position: center, center;
    background-attachment: fixed, fixed;

    }
/* 确保里面超链接的颜色和悬停效果不受影响 */
.lg-content-table-left a,
.am-comment-main a {
    color: #005C97 !important;
}
.lg-content-table-left a:hover,
.am-comment-main a:hover {
    color: #fa4b4b !important;
}

/* 补全评论区域原本的白字边缘设定(若原意是想在深色底显示) */
/* 如果实际背景是白色,则上面那行已经生效;若是深色,请忽略此条 */
/* 卡片内白字加粗无阴影 */
.lg-article, .card, .popup[data-v-1d675dd8], .user-nav[data-v-2dfcfd35],
.am-panel.lg-index-contest, .lg-content-table-left, .am-comment-main {
    color: #FFFFFF !important;
    text-shadow: none !important;
    font-weight: 600 !important;
}

/* --- 卡片背景(完全复原你的设定) --- */
.wrapper.wrapped.lfe-body.header-layout.tiny {
   height: 60px;
   z-index: 999;
   background-color: #ffffff4a !important;
   -webkit-backdrop-filter: blur(20px) !important;
   backdrop-filter: blur(20px) !important;
   font-weight:bolder;
}
.background[data-v-43a0de31] {
    background: #33ccff !important;
}
   
.am-slides> * {
    display: none !important;
}
.am-direction-nav> * {
    display: none !important;
}
 .am-control-nav.am-control-paging>* {
    display: none !important;
}
  

/* 设置卡片样式 */
.am-u-md-12 {
    width: 100% !important;  
}
.am-u-md-12 >*.lg-article {
   transition: box-shadow .5s ease, border-radius .5s ease; /* 只允许阴影和圆角过渡 */
    background-position: center !important;  /* 固定背景位置 */
}/* 隐藏子元素内部原有内容 */
.am-u-md-12 >*.lg-article{
  background-image: url(https://cdn.luogu.com.cn/upload/image_hosting/mi2706j0.png) !important;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    border-radius: 20px !important;
    overflow: hidden;
    min-height: 150px;
    margin: 5px;
    opacity:1 !important;
}
    /* 修复主页卡片:取消图片覆盖,恢复红蓝渐变 */
.lg-article {
   transition: box-shadow .5s ease, border-radius .5s ease;
    background-position: center !important;
}
.lg-article{
    background-image: linear-gradient(135deg, rgba(255, 0, 0, 0.8), rgba(51, 204, 255, .8)) !important; /* 恢复红蓝渐变 */
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    border-radius: 20px !important;
    overflow: hidden;
    min-height: 150px;
    margin: 5px;
    opacity:1 !important;
}
   .lg-article.lg-index-stat{
          border-radius: 12px;        /* 圆角大小,可自定义 */
    overflow: hidden;           /* 防止内部内容超出圆角 */
    background-image: linear-gradient(135deg, rgba(51, 204, 255, .8), rgba(255, 0, 0, 0.8)); /* 蓝 -> 红 */ /* 红 -> 蓝 -> 红 -> 蓝 */
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    }

    .lg-article.lg-index-stat{
   transition: box-shadow .5s ease, border-radius .5s ease; /* 只允许阴影和圆角过渡 */
    background-position: center !important;  /* 固定背景位置 */
}
.lg-article.lg-index-stat {
    border-radius: 12px !important;
    overflow: hidden;
    background-image: linear-gradient(135deg, rgba(51, 204, 255, .8), rgba(255, 0, 0, 0.8)) !important;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}
.am-panel.lg-index-contest.am-panel-primary {
    background-image: linear-gradient(135deg, rgba(255, 0, 0, 0.8), rgba(51, 204, 255, .8)) !important;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}
.am-panel.lg-index-contest.am-panel-primary:hover {
    background-image: linear-gradient(135deg, rgba(51, 204, 255, .8), rgba(255, 0, 0, 0.8)) !important;
}

/* --- 侧栏图片与下拉菜单 --- */
#app > .lfe-body > div:first-of-type {
    opacity: 1 !important;
    background-image: url(https://cdn.luogu.com.cn/upload/image_hosting/qexud63o.png) !important;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    border-radius: 30px !important;
    background-attachment: revert;
}
.dropdown.hown {
    opacity: 1 !important;
    background-image: url(https://cdn.luogu.com.cn/upload/image_hosting/qexud63o.png) !important;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    border-radius: 30px !important;
}

/* --- 移除主体白底遮挡(关键修复) --- */
.main-container > main.lfe-body { background: transparent !important; }
.background[data-v-7958fe72] { background: transparent !important; }
.main-container > .header-layout .background { display: none !important; }

/* --- 统计图颜色(原封不动保留) --- */
path.highcharts-area { color: white; background: white; fill: #33ccff; }
path.highcharts-point.highcharts-color-0 { fill: #ee0000; stroke: #ffffff; opacity: .45; }
rect.highcharts-point.highcharts-color-1 { fill: #ee0000; stroke: #ffffff; opacity: .65; }

/* --- 其他基础样式 --- */
.selected:not([data-v-66021821]) {
    color: #fff !important;
    background-image: linear-gradient(135deg, #ee0000 10%, #33ccff 100%);
    border-radius: 5px !important;
}
.selected > span { color: #fff !important; }
.am-comment-main { border-radius: 10px !important; border: #fff 10px solid !important; }
.am-modal-dialog > .am-modal-footer > .am-modal-btn:hover { background: #2bb0e5; color: #fff; }

/* --- 按钮颜色 --- */
.am-btn.am-btn-danger.am-btn-sm { background: linear-gradient(to right, rgb(255, 65, 108), rgb(255, 75, 43)); color: #FFF !important; }
.am-btn.am-btn-primary.am-btn-sm { background: #7f7fd5; color: #FFF !important; }
.am-btn.am-btn-success.am-btn-sm { background: #b993d6; color: #FFF !important; }

/* --- 侧栏 --- */
#app > .lfe-body {
    animation: clan 1s;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-radius: 0px 30px 30px 0px;
    margin-left: 0px;
    margin-top: 10.5%;
    padding-bottom: 14px;
    height: 27em;
    background: #ffffff3b !important;
}
#app > .lfe-body > a { color: #61eee9f5 !important; }
img.avatar:hover { transform: translateY(-1px); box-shadow: 3px 4px 10px #6e757a; }

/* --- 超链接 --- */
a { transition: all .15s ease; color: #005C97; text-shadow: none !important; }
a:hover { color: #fa4b4b; }
a { position: relative; }
a:not(.exlg-dash-options)::after { content: ""; width: 0; height: 4px; background: rgba(255, 0, 0, .575); position: absolute; top: 100%; left: 50%; transition: all .3s; }
a:not(.exlg-dash-options):hover::after { left: 0%; width: 100%; }

/* --- 圆角化(完整保留原有尺寸) --- */
.am-btn.am-btn-sm { border-radius: 20px !important; }
.lfe-caption.tag.status-name[data-v-43a42535] { border-radius: 20px !important; }
.card.padding-default { border-radius: 20px !important; box-shadow: 0px 0px 0px #8f8f8f; }
.lg-article { animation: slowshow .5s 1; transition: all 0.5s ease; border-radius: 20px !important; box-shadow: 0px 0px 0px #8f8f8f; }
.dropdown > .center { border-radius: 10px !important; box-shadow: 5px 5px 17px #525252cc; }
.popup[data-v-1d675dd8] { animation: showAPP .5s 1; box-shadow: 5px 5px 17px #8f8f8f7a; margin-left: 3px; width: 11.4em; height: 13.7em; background: #fff; background-clip: border-box; border-radius: 10px !important; border: 0px solid rgba(0, 0, 0, .2); transition: all 1s; }
.apps a[data-v-1d675dd8] { padding: .3em; color: #333; border-radius: 99px !important; }
.padding-none[data-v-f9624136] { border-radius: 30px !important; }
.user-nav[data-v-2dfcfd35] { animation: showUI 1s 1; transition: all .5s ease; margin-top: 20px; border-radius: 20px !important; opacity: .9; }
.card.problem-card.padding-default { animation: slowshow .5s 1; border-radius: 20px !important; box-shadow: 0px 0px 0px #8f8f8f; }
.card.padding-default { transition: all .5s ease; border-radius: 20px !important; box-shadow: 0px 0px 0px #8f8f8f; }
.inner-card { border-radius: 10px; box-shadow: 1px 1px 10px #00000036; }
.card.user-header-container.padding-0 { width: 100%; border-radius: 20px !important; box-shadow: 0px 0px 0px #8f8f8f; height: 400px; }
.card.float-card.padding-0[data-v-f9624136] { border-radius: 30px !important; transition: 1s ease; }
.card.float-card.padding-0[data-v-f9624136]:hover { border-radius: 30px !important; }
.card.user-header-container.padding-0 > .user-header-top { height: 320px; }
.select-button.lfe-form-sz-small { border-radius: 10px !important; }
.progress-frame > div[data-v-47712372] { width: 100%; height: 100%; border-radius: 10px 0 0 10px; background: linear-gradient(to right, rgb(142, 45, 226), rgb(74, 0, 224)) !important; }
.color-default > .lfe-caption { border-radius: 20px !important; }
.tag.color-none > .lfe-caption { border-radius: 20px !important; transition: all .4s; }
.tag.color-none > .lfe-caption:hover { transform: translateY(-2px) !important; }
.selected[data-v-66021821] { border-radius: 10px !important; }
.bottom.float-bottom { animation: slowshow 1s 1; margin-bottom: 4px; border-radius: 20px !important; z-index: 999; }
.card.float-card.padding-0 { border-radius: 5px !important; box-shadow: 1px 1px 20px #5c5c5c !important; }
}

/* ============================================================
   私信页
   ============================================================ */
@-moz-document url-prefix("https://www.luogu.com.cn/chat") {
.l-card.wrapper{
    background-image: url(https://cdn.luogu.com.cn/upload/image_hosting/7nqwae4e.png) !important;
    border-radius: 10px !important;
    -webkit-backdrop-filter: blur(20px) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0px 0px 30px #000;
}
    /*
.message-block.right > .message[data-v-5c0627c6] {
    background-color: #33ccff !important;
    color: #fff !important;
    text-align: center;
}*/
html > body {
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
.item[data-v-4d6dca7a]:hover {
    border-radius: 10px;
    transition: all .3s ease;
    background-color: #7a0ad9a6 !important;
    color: #fff;
}
}


@-moz-document url-prefix("https://www.luogu.com.cn/user/notification") {
.l-card.wrapper{
    background-image: url(https://cdn.luogu.com.cn/upload/image_hosting/7nqwae4e.png) !important;
    border-radius: 10px !important;
    -webkit-backdrop-filter: blur(20px) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0px 0px 30px #000;
    
}
    /*
.message-block.right > .message[data-v-5c0627c6] {
    background-color: #33ccff !important;
    color: #fff !important;
    text-align: center;
}*/
html > body {
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity:0.7;
}
.item[data-v-4d6dca7a]:hover {
    border-radius: 10px;
    transition: all .3s ease;
    background-color: #7a0ad9a6 !important;
    color: #fff;
}
}
@-moz-document regexp("https://www.luogu(.org|.com.cn)/problem/.*") {
/*luogu题目*/
/*--------------------------用户自设部分--------------------------*/
/*图片背景*/
html > body {
    background-image:
        url(https://cdn.luogu.com.cn/upload/image_hosting/dnr6trms.png);
    background-repeat: no-repeat, no-repeat;
    background-size: cover, cover;
    background-position: center, center;
    background-attachment: fixed, fixed;
    opacity:0.7;
    /* 如果 GIF 是黑色背景,可加上 mix-blend-mode: screen; 但需谨慎 */
}
   
 .theme-page.theme-mid-full{
        opacity:1;
        background-image:
        url(https://cdn.luogu.com.cn/upload/image_hosting/dnr6trms.png);
       opacity:.0.7;
    }
 .main>* .l-card.main{
        background-image: linear-gradient(135deg, rgba(255, 0, 0, 0.8), rgba(51, 204, 255, .8)); /* 红 -> 蓝 */
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    }
    .main>*.l-card{
        background-image: linear-gradient(135deg, rgba(255, 0, 0, 0.8), rgba(51, 204, 255, .8)); /* 红 -> 蓝 */
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
           border-radius: 16px !important;
    }
    .l-card.header-card{
        background-image: url(https://cdn.luogu.com.cn/upload/image_hosting/7nqwae4e.png) !important;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    border-radius: 20px !important;
    overflow: hidden;
    min-height: 150px;
    margin: 5px;
    opacity:1 !important;
    }
    .side>*.l-card{
        background-image: url(https://cdn.luogu.com.cn/upload/image_hosting/qexud63o.png) !important;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    border-radius: 20px !important;
    overflow: hidden;
    min-height: 150px;
    margin: 5px;
    opacity:1 !important;
    }
    .panel.panel-a{
        background-image: url(https://cdn.luogu.com.cn/upload/image_hosting/qexud63o.png) !important;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    border-radius: 20px !important;
    overflow: hidden;
    min-height: 150px;
    margin: 5px;
    opacity:1 !important;
    }
}
    /* ============================================================
       题目页专属:取消卡片级防窥屏,鼠标触碰即全部显示
       ============================================================ */
    /* 强制题目页所有卡片和容器完全显示 */
    .lg-article, .card, .popup[data-v-1d675dd8], .user-nav[data-v-2dfcfd35],
    .am-panel.lg-index-contest, .lg-content-table-left, .am-comment-main,
    .dropdown.hown, #app > .lfe-body, .l-card, .side>*.l-card,
    .panel.panel-a, .user-header-bottom, .wrapper > .test-case {
        opacity: 1 !important;
        transition: none !important; /* 取消过渡,避免闪烁 */
    }

    /* 保证鼠标悬停或移入页面时,页面整体保持完全可见 */
    html > body {
        transition: opacity .35s ease !important;
        opacity: 1 !important;
    }
    html:hover > body {
        opacity: 1 !important;
    }
@-moz-document regexp("https://www.luogu(.org|.com.cn)/problem/list") {
/*luogu题目列表*/
/*--------------------------用户自设部分--------------------------*/
/*图片背景*/
html > body {
    background-image:
        url(https://cdn.luogu.com.cn/upload/image_hosting/dnr6trms.png);
    background-repeat: no-repeat, no-repeat;
    background-size: cover, cover;
    background-position: center, center;
    background-attachment: fixed, fixed;
    opacity:.0.5;
    /* 如果 GIF 是黑色背景,可加上 mix-blend-mode: screen; 但需谨慎 */
}
   
 
 .main>* .l-card.main{
    background-image:
        url(https://cdn.luogu.com.cn/upload/image_hosting/qf69dlj3.png);/* 红 -> 蓝 */
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    }
    .main>*.l-card{
        background-image:
        url(https://cdn.luogu.com.cn/upload/image_hosting/qexud63o.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
           border-radius: 16px !important;
    }
}
@-moz-document regexp("https://www.luogu.com.cn/article*") {
html > body {
    background-image: url(https://cdn.luogu.com.cn/upload/image_hosting/dnr6trms.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: .6;
    font-weight: 600 !important;
    text-shadow: none !important;
}
.l-card {
    background-image: linear-gradient(135deg, rgba(255, 0, 0, 0.8), rgba(51, 204, 255, .8)) !important;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    border-radius: 16px !important;
    color: #FFFFFF !important;
    text-shadow: none !important;
}
}

   @-moz-document regexp("https://www.luogu.com.cn/article/.*") {
/*luogu文章*/
/*--------------------------用户自设部分--------------------------*/
/*图片背景*/
html > body {
    background-image:
        url(https://cdn.luogu.com.cn/upload/image_hosting/dnr6trms.png);
    background-repeat: no-repeat, no-repeat;
    background-size: cover, cover;
    background-position: center, center;
    background-attachment: fixed, fixed;
    opacity:.6;
    /* 如果 GIF 是黑色背景,可加上 mix-blend-mode: screen; 但需谨慎 */
     .l-card{
       background-image: linear-gradient(135deg, rgba(255, 0, 0, 0.8), rgba(51, 204, 255, .8)); /* 红 -> 蓝 */
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
          border-radius: 16px !important;
    }
    
}
}
@-moz-document regexp("https://www.luogu.com.cn/user/.*") {
/*luogu用户主页*/
/*--------------------------用户自设部分--------------------------*/
/*图片背景*/
html > body {
  
    /* 如果 GIF 是黑色背景,可加上 mix-blend-mode: screen; 但需谨慎 */
    .side>*.l-card{
        background-image: url(https://cdn.luogu.com.cn/upload/image_hosting/mi2706j0.png) !important;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    border-radius: 20px !important;
    overflow: hidden;
    min-height: 150px;
    margin: 5px;
    opacity:1 !important;
    }
   .user-header-bottom{
    background-image: linear-gradient(135deg, rgba(255, 0, 0, 0.8), rgba(51, 204, 255, .8)); /* 红 -> 蓝 */
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}
   .sidebar-container>*.main>*.l-card{
        background-image: url(https://cdn.luogu.com.cn/upload/image_hosting/qexud63o.png) !important;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    border-radius: 20px !important;
    overflow: hidden;
    min-height: 150px;
    margin: 5px;
    opacity:1 !important;
    }
   .l-card.burger
    {
        background-image: url(https://cdn.luogu.com.cn/upload/image_hosting/wjt2jcwz.png) !important;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    border-radius: 20px !important;
    overflow: hidden;
    min-height: 150px;
    margin: 5px;
    opacity:1 !important;
    }
}
}

@-moz-document regexp("https://www.luogu.com.cn/discuss/.*") {
html > body {
    background-image: url(https://cdn.luogu.com.cn/upload/image_hosting/dnr6trms.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: .6;
    font-weight: 600 !important;
    text-shadow: none !important;
}
.l-card {
    background-image: linear-gradient(135deg, rgba(255, 0, 0, 0.8), rgba(51, 204, 255, .8)) !important;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    border-radius: 16px !important;
    color: #FFFFFF !important;
    text-shadow: none !important;
}
}

@-moz-document regexp("https://www.luogu.com.cn/discuss*") {
html > body {
    background-image: url(https://cdn.luogu.com.cn/upload/image_hosting/dnr6trms.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: .6;
    font-weight: 600 !important;
    text-shadow: none !important;
}
.l-card {
    background-image: linear-gradient(135deg, rgba(255, 0, 0, 0.8), rgba(51, 204, 255, .8)) !important;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    border-radius: 16px !important;
    color: #FFFFFF !important;
    text-shadow: none !important;
}
}

/* ============================================================
   鼠标悬停以【卡片为单位】显示(防窥屏)
   ============================================================ */
@-moz-document regexp("https://www.luogu(.org|.com.cn)/.*") {
    .lg-article, .card, .popup[data-v-1d675dd8], .user-nav[data-v-2dfcfd35],
    .am-panel.lg-index-contest, .lg-content-table-left, .am-comment-main,
    .dropdown.hown, #app > .lfe-body, .l-card, .side>*.l-card,
    .panel.panel-a, .user-header-bottom, .wrapper > .test-case,
    .card.wrapper.padding-none, .message-block, .item[data-v-4d6dca7a] {
        opacity: 0.2 !important;
        transition: opacity 0.35s ease !important;
    }
    .lg-article:hover, .card:hover, .popup[data-v-1d675dd8]:hover, .user-nav[data-v-2dfcfd35]:hover,
    .am-panel.lg-index-contest:hover, .lg-content-table-left:hover, .am-comment-main:hover,
    .dropdown.hown:hover, #app > .lfe-body:hover, .l-card:hover, .side>*.l-card:hover,
    .panel.panel-a:hover, .user-header-bottom:hover, .wrapper > .test-case:hover,
    .card.wrapper.padding-none:hover, .message-block:hover, .item[data-v-4d6dca7a]:hover {
        opacity: 1 !important;
    }
    
}
/* ============================================================
   3. 加大 "近期比赛" 面板圆角
   作用:美化主站比赛面板,增加圆角半径。
   ============================================================ */
@-moz-document regexp("https://www.luogu(.org|.com.cn)/(?!blog).*") {
    /* 对比赛相关面板应用更大的圆角 */
    .am-panel.lg-index-contest.am-panel-primary,
    .am-panel.lg-index-contest.am-panel-danger,
    .am-panel.lg-index-contest.am-panel-success {
        border-radius: 24px !important; /* 原为10px,加大到24px */
        overflow: hidden !important;
    }
}

/* ============================================================
   4. 为全站字体添加阿绫红 (#ee0000) 光渲染
   作用:在原有字体颜色基础上,增加微弱的红色外发光。
   注意:使用较小的模糊半径和低透明度,避免过度渲染导致文字模糊[reference:2]。
   ============================================================ */
@-moz-document regexp("https://www.luogu(.org|.com.cn)/.*") {
    /* 对全局字体应用红色光晕 */
    body, p, div, span, li, td, th, h1, h2, h3, h4, h5, h6, a, .lfe-h1 {
        text-shadow: 0 0 1px #ee0000, 0 0 2px rgba(238, 0, 0, 0.3) !important;
    }

    /* 如果某些元素的背景色与红色光晕冲突,可以单独关闭它们的光晕 */
    /* .selector { text-shadow: none !important; } */
}

/* ============================================================
   5. 调整讨论区悬停显示逻辑
   作用:在讨论区及相关子页面,鼠标悬停时让整个讨论帖预览区域或列表项显示。
   注意:原设定“鼠标离开页面整体透明”可能影响浏览体验。
   ============================================================ */

    /* 如果希望鼠标在讨论区任何地方悬停都显示,可以使用父容器控制 */
    /* 例如:.discuss-container:hover .lg-content-table-left { opacity: 1 !important; } */

/* 注意:如果希望在所有页面都取消 "鼠标离开页面整体透明" 效果,可删除原代码末尾的以下部分:
   html:not(:hover) > body { opacity: 0 !important; }
   或者将其改为 opacity: 0.2 !important; 以保留防窥功能但维持可读性。
*/
@-moz-document regexp("https://www.luogu(.org|.com.cn)/.*") {
    html > body {
        transition: opacity .35s ease !important;
    }

    html:not(:hover) > body {
        opacity: 0 !important; /* 透明度:0 全透明,1 不透明,可自己调 */
    }
}
/* ============================================================
   题目页专属:鼠标在页面任意处悬停时,整个界面完全显示
   必须放在样式表最末尾,以覆盖前面的全局卡片防窥屏规则
   ============================================================ */
@-moz-document regexp("https://www.luogu(.org|.com.cn)/problem/.*") {
    /* 1. 强制题目页所有卡片和容器完全显示,取消卡片级防窥屏 */
    .lg-article, .card, .popup[data-v-1d675dd8], .user-nav[data-v-2dfcfd35],
    .am-panel.lg-index-contest, .lg-content-table-left, .am-comment-main,
    .dropdown.hown, #app > .lfe-body, .l-card, .side>*.l-card,
    .panel.panel-a, .user-header-bottom, .wrapper > .test-case,
    .card.wrapper.padding-none, .message-block, .item[data-v-4d6dca7a],
    /* 题目页可能出现的 IDE / 代码编辑器 / 题目内容容器 */
    .ide-editor, .ide-container, .problem-content, .problem-body,
    .code-editor, .editor-container, [class*="ide"], [class*="problem"] {
        opacity: 1 !important;
        transition: none !important;
    }

    /* 2. 鼠标在页面内时,整个 body 完全显示(不透明) */
    html > body {
        opacity: 1 !important;
        transition: opacity .35s ease !important;
    }

    /* 3. 鼠标移出整个浏览器窗口时,可保留防窥效果 */
    /* 如果不想防窥,把下面的 opacity 改成 1 即可 */
    html:not(:hover) > body {
        opacity: 0 !important;
    }
}
/* ============================================================
   文章编辑页专属:修复Markdown预览区文字与图表颜色
   路径:https://www.luogu.com.cn/article/
   ============================================================ */