/* 7risi 资源中心 — XenForo RM 风格 · 左筛选/右列表 · 末日锈红(复用子比 CSS 变量) */
.rm-wrap{max-width:var(--mian-max-width,1200px);margin:22px auto;padding:0 10px;}
.rm-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:16px;padding-bottom:12px;border-bottom:1px solid rgba(255,248,235,.07);}
.rm-head-l{display:flex;align-items:baseline;gap:12px;}
.rm-title{font-size:24px;font-weight:800;margin:0;color:var(--main-color,#edece8);}
.rm-count{color:#94918a;font-size:13px;}

/* 两栏布局 */
.rm-layout{display:flex;gap:20px;align-items:flex-start;}
.rm-sidebar{flex:0 0 208px;position:sticky;top:70px;}
.rm-main{flex:1;min-width:0;}

/* 侧栏筛选组 */
.rm-fgroup{background:var(--main-bg-color,#302e2a);border:1px solid rgba(255,248,235,.06);border-radius:8px;padding:10px;margin-bottom:14px;}
.rm-ftitle{font-weight:700;font-size:12px;color:#94918a;letter-spacing:.5px;padding:4px 8px 8px;}
.rm-fitem{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:6px 9px;border-radius:5px;color:#cfccc5;font-size:13.5px;text-decoration:none;transition:.12s;}
.rm-fitem span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.rm-fitem i{opacity:.5;font-style:normal;font-size:11px;flex:0 0 auto;}
.rm-fitem:hover{background:rgba(255,248,235,.04);color:#fff;}
.rm-fitem.on{background:var(--theme-color,#b83226);color:#fff;}
.rm-fitem.on i{opacity:.85;}

/* 排序(标题行右侧) */
.rm-sorts{display:flex;flex-wrap:wrap;gap:4px;}
.rm-sort{padding:5px 12px;border-radius:5px;color:#b0aea6;font-size:13px;text-decoration:none;transition:.12s;}
.rm-sort:hover{color:#fff;}
.rm-sort.on{color:#fff;background:rgba(184,50,38,.20);}

/* 列表(XF 列表行) */
.rm-list{display:flex;flex-direction:column;gap:10px;}
.rm-item{display:flex;gap:14px;padding:13px;border-radius:8px;background:var(--main-bg-color,#302e2a);border:1px solid rgba(255,248,235,.06);text-decoration:none;transition:.15s;}
.rm-item:hover{border-color:var(--theme-color,#b83226);box-shadow:0 6px 20px rgba(0,0,0,.35);transform:translateY(-1px);}
.rm-cover{flex:0 0 148px;height:92px;border-radius:6px;background:#171614 center/cover no-repeat;display:flex;align-items:center;justify-content:center;overflow:hidden;}
.rm-noimg{color:#454a50;font-weight:800;font-size:15px;letter-spacing:1.5px;}
.rm-body{flex:1;min-width:0;}
.rm-item-title{font-size:16px;font-weight:700;color:#f0efec;margin-bottom:4px;line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.rm-item:hover .rm-item-title{color:var(--theme-color,#d8503f);}
.rm-item-meta{font-size:12px;color:#8a877f;margin-bottom:6px;}
.rm-item-excerpt{font-size:13px;color:#a5a29a;line-height:1.55;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-bottom:9px;}
.rm-badges{display:flex;flex-wrap:wrap;gap:5px;}
.rm-badge{font-size:11px;padding:2px 8px;border-radius:4px;background:rgba(255,248,235,.05);border:1px solid rgba(255,248,235,.09);color:#a4a199;line-height:1.5;}
.rm-badge-ver{background:rgba(184,50,38,.16);border-color:rgba(184,50,38,.42);color:#e79b90;font-weight:600;}
/* 价格 / 付费标签 */
.rm-price{font-size:11px;padding:2px 8px;border-radius:4px;font-weight:700;background:rgba(184,50,38,.16);border:1px solid rgba(184,50,38,.45);color:#eba397;line-height:1.5;}
.rm-price.is-points{background:rgba(224,160,30,.14);border:1px solid rgba(224,160,30,.42);color:#e3b45a;}
.rm-price-free{font-size:11px;padding:2px 8px;border-radius:4px;font-weight:600;background:rgba(60,170,95,.14);border:1px solid rgba(60,170,95,.42);color:#79c791;line-height:1.5;}
.rm-paid-tag{font-size:10px;padding:2px 7px;border-radius:4px;background:var(--theme-color,#b83226);color:#fff;font-weight:700;line-height:1.5;letter-spacing:.5px;}
/* 详情页获取按钮下的价格行 */
.rms-price-line{margin-top:8px;text-align:center;display:flex;gap:6px;align-items:center;justify-content:center;}
.rms-price-val{font-size:15px;font-weight:800;color:#eba397;}
.rms-price-val.is-points{color:#e3b45a;}
.rm-stats{flex:0 0 auto;display:flex;gap:18px;align-items:center;padding-left:6px;}
.rm-stat{text-align:center;min-width:46px;}
.rm-stat b{display:block;font-size:16px;color:#f0efec;font-weight:700;line-height:1.2;}
.rm-stat span{font-size:11px;color:#8a877f;}

.rm-empty{padding:64px;text-align:center;color:#8a877f;background:var(--main-bg-color,#302e2a);border-radius:8px;}

/* 分页 */
.rm-pager{margin:22px 0;text-align:center;}
.rm-pager a,.rm-pager span{display:inline-block;padding:6px 12px;margin:0 2px;border-radius:5px;background:rgba(255,248,235,.04);color:#cfccc5;text-decoration:none;font-size:14px;}
.rm-pager a:hover{color:#fff;background:rgba(184,50,38,.2);}
.rm-pager .current{background:var(--theme-color,#b83226);color:#fff;}

/* 移动端:侧栏移到顶部、横向滚动 */
@media(max-width:860px){
  .rm-layout{flex-direction:column;}
  .rm-sidebar{position:static;flex-basis:auto;width:100%;}
  .rm-fgroup{padding:8px;}
  .rm-fgroup .rm-fitem{display:inline-flex;}
  .rm-toolbar{justify-content:flex-start;}
}
@media(max-width:768px){
  .rm-item{flex-wrap:wrap;}
  .rm-cover{flex-basis:100%;height:150px;}
  .rm-stats{width:100%;justify-content:flex-start;padding-left:0;gap:24px;}
  .rm-item-title{white-space:normal;}
}

/* ===== 资源详情页 ===== */
.rm-single{max-width:var(--mian-max-width,1200px);}
.rms-crumb{font-size:13px;color:#94918a;margin-bottom:14px;}
.rms-crumb a{color:#b0aea6;text-decoration:none;}
.rms-crumb a:hover{color:var(--theme-color,#d8503f);}
.rms-sep{opacity:.5;margin:0 4px;}
.rms-head{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;padding-bottom:16px;border-bottom:1px solid rgba(255,248,235,.08);margin-bottom:18px;}
.rms-head-main{flex:1;min-width:0;}
.rms-head-action{flex:0 0 auto;}
.rms-title{font-size:25px;font-weight:800;margin:0 0 10px;color:#f0efec;line-height:1.35;}
.rms-badges{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px;}
.rms-badges .rm-badge{text-decoration:none;}
.rms-badges .rm-badge:hover{border-color:var(--theme-color,#b83226);color:#fff;}
.rms-meta{font-size:13px;color:#8a877f;}
.rms-layout{display:flex;gap:24px;align-items:flex-start;}
.rms-main{flex:1;min-width:0;}
.rms-content{font-size:15px;line-height:1.8;color:#c9d1d8;word-wrap:break-word;}
.rms-content img{max-width:100%;height:auto;border-radius:6px;}
.rms-content h1,.rms-content h2,.rms-content h3,.rms-content h4{color:#f0efec;}
.rms-content a{color:var(--theme-color,#d8503f);}
.rms-side{flex:0 0 262px;min-width:0;position:sticky;top:70px;}
.rms-card{background:var(--main-bg-color,#302e2a);border:1px solid rgba(255,248,235,.06);border-radius:8px;padding:14px;margin-bottom:12px;}
.rms-stats3{display:flex;justify-content:space-around;text-align:center;}
.rms-stats3 b{display:block;font-size:20px;color:#f0efec;font-weight:800;line-height:1.2;}
.rms-stats3 span{font-size:12px;color:#8a877f;}
.rms-dlbtn{display:block;text-align:center;padding:13px;border-radius:8px;background:var(--theme-color,#b83226);color:#fff;font-weight:700;font-size:16px;text-decoration:none;margin-bottom:12px;transition:.15s;}
.rms-dlbtn:hover{filter:brightness(1.12);box-shadow:0 4px 16px rgba(184,50,38,.4);}
.rms-info-row{display:flex;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px solid rgba(255,248,235,.05);font-size:13.5px;}
.rms-info-row:last-child{border-bottom:none;}
.rms-info-row span{color:#94918a;flex:0 0 auto;}
.rms-info-row b{color:#d5dce2;font-weight:600;text-align:right;}
/* 头部大下载按钮 */
.rms-dlbtn-lg{padding:12px 30px;font-size:16px;white-space:nowrap;box-shadow:0 4px 14px rgba(184,50,38,.35);margin:0;}
/* meta 行 */
.rms-meta .rms-author{color:#cfccc5;text-decoration:none;font-weight:600;}
.rms-meta .rms-author:hover{color:var(--theme-color,#d8503f);}
.rms-dot{opacity:.4;margin:0 3px;}
/* 正文卡片 */
.rms-content-card{background:var(--main-bg-color,#302e2a);border:1px solid rgba(255,248,235,.06);border-radius:10px;padding:22px 24px;}
/* 侧栏卡片标题 */
.rms-card-title{font-size:14px;font-weight:700;color:#d5dce2;padding-bottom:10px;margin-bottom:8px;border-bottom:1px solid rgba(255,248,235,.06);}
/* 该作者其他资源 */
.rms-other .rms-mini{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid rgba(255,248,235,.05);text-decoration:none;min-width:0;}
.rms-other .rms-mini:last-child{border-bottom:none;}
.rms-mini-title{font-size:13px;color:#cfccc5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;flex:1;}
.rms-mini:hover .rms-mini-title{color:var(--theme-color,#d8503f);}
.rms-mini-num{font-size:11px;color:#8a877f;flex:0 0 auto;}
/* 获取资源弹窗 */
.rms-modal[hidden]{display:none;}
.rms-modal{position:fixed;inset:0;z-index:1035;display:flex;align-items:center;justify-content:center;padding:20px;}
.rms-modal-mask{position:absolute;inset:0;background:rgba(0,0,0,.62);}
.rms-modal-box{position:relative;z-index:1;width:100%;max-width:560px;max-height:86vh;overflow:auto;background:var(--body-bg-color,#1d1c1a);border:1px solid rgba(255,248,235,.1);border-radius:12px;padding:20px 22px;box-shadow:0 24px 60px rgba(0,0,0,.55);}
.rms-modal-close{position:absolute;top:10px;right:14px;background:none;border:none;color:#9aa2ab;font-size:26px;cursor:pointer;line-height:1;}
.rms-modal-close:hover{color:#fff;}
.rms-modal-title{font-size:17px;font-weight:700;color:#f0efec;margin-bottom:16px;padding-right:30px;}
.rms-modal-body .pay-box,.rms-modal-body .zib-widget{margin:0!important;}

@media(max-width:860px){
  .rms-layout{flex-direction:column;}
  .rms-side{position:static;flex-basis:auto;width:100%;order:-1;}
  .rms-head{flex-direction:column;}
  .rms-head-action{width:100%;}
  .rms-dlbtn-lg{display:block;text-align:center;}
}

/* —— 卡片与底色分离:--main-bg-color 在深色下太贴近 body(#1d1c1a),补静止阴影 + 抬亮面 + 加边 —— */
.rm-item{box-shadow:0 1px 3px rgba(0,0,0,.24);}
body.dark-theme .rm-item{background:#34322e;border-color:rgba(255,248,235,.11);box-shadow:0 2px 10px rgba(0,0,0,.34);}
body.dark-theme .rm-item:hover{border-color:var(--theme-color,#b83226);box-shadow:0 8px 24px rgba(0,0,0,.42);}
body.dark-theme .rm-fgroup{background:#34322e;border-color:rgba(255,248,235,.09);}
body.dark-theme .rms-card{background:#34322e;border-color:rgba(255,248,235,.09);}
