﻿/* 心爱魔力 · 门户首页 — 与赞助页统一的深色金卡风格 */
:root {
  --bg0: #0b1220;
  --bg1: #152238;
  --card: rgba(18, 28, 48, 0.92);
  --card2: rgba(22, 34, 56, 0.88);
  --line: rgba(212, 175, 88, 0.4);
  --gold: #e8c56a;
  --gold2: #f5e6b8;
  --text: #eef3ff;
  --muted: #9aa8c2;
  --ok: #7ddea0;
  --btn: linear-gradient(180deg, #d4a84b 0%, #b8862d 55%, #8f6818 100%);
  --btn-hover: linear-gradient(180deg, #e6bc5e 0%, #c99535 55%, #a07620 100%);
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  --radius: 14px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(8, 12, 22, 0.78), rgba(8, 12, 22, 0.9)),
    url("../img/page-bg.jpg") center top / cover no-repeat fixed;
  min-height: 100vh;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold2); }
img { max-width: 100%; border: 0; vertical-align: middle; }
ul { list-style: none; margin: 0; padding: 0; }

/* top bar */
.topbar {
  background: rgba(8, 12, 22, 0.85);
  border-bottom: 1px solid rgba(212, 175, 88, 0.25);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold2);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 1.05rem;
  white-space: nowrap;
}
.brand img { height: 40px; width: auto; }

.nav-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: center;
}
.nav-main {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.nav-main .nav-item {
  display: inline-block;
  list-style: none;
}
.nav-main .nav-item > a,
.nav-main a {
  display: inline-block;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  transition: .15s;
  text-decoration: none;
}
/* Discuz 把后台「副标题」拼进主导航 a 内（portal/BBS/提取码），官方 #nv li span 会隐藏 */
.nav-main .nav-item > a > span,
.nav-main a > span {
  display: none !important;
}
.nav-main .nav-item:hover > a,
.nav-main .nav-item.active > a,
.nav-main .nav-item.hover > a,
.nav-main a:hover,
.nav-main a.active {
  color: var(--gold2);
  background: rgba(232, 197, 106, 0.12);
}

/* 下拉菜单（已移到 #append_parent） */
#append_parent .p_pop.h_pop,
#append_parent .p_pop,
#append_parent [id$="_menu"].p_pop {
  min-width: 148px;
  padding: 6px 0 !important;
  background: #152238 !important;
  border: 1px solid rgba(212, 175, 88, 0.45) !important;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45) !important;
  border-radius: 10px;
  z-index: 400 !important;
}
#append_parent .p_pop li {
  display: block;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
  line-height: 1.4 !important;
  height: auto !important;
  font-weight: 400 !important;
}
#append_parent .p_pop a {
  display: block !important;
  float: none !important;
  padding: 8px 16px !important;
  height: auto !important;
  color: #eef3ff !important;
  border: 0 !important;
  background: transparent !important;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 400;
}
#append_parent .p_pop a:hover {
  color: #f5e6b8 !important;
  background: rgba(232, 197, 106, 0.14) !important;
  text-decoration: none !important;
}

/* Discuz 下拉子导航（.p_pop / .h_pop） */
.xinai-home-root .p_pop,
.xinai-home-root .h_pop,
body#nv_portal .p_pop.h_pop {
  min-width: 148px;
  padding: 6px 0 !important;
  background: #152238 !important;
  border: 1px solid rgba(212, 175, 88, 0.45) !important;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45) !important;
  border-radius: 10px;
  z-index: 300 !important;
}
.xinai-home-root .p_pop li,
body#nv_portal .p_pop.h_pop li {
  display: block;
  float: none !important;
}
.xinai-home-root .p_pop a,
body#nv_portal .p_pop.h_pop a {
  display: block !important;
  padding: 8px 16px !important;
  color: #eef3ff !important;
  border: 0 !important;
  background: transparent !important;
  white-space: nowrap;
}
.xinai-home-root .p_pop a:hover,
body#nv_portal .p_pop.h_pop a:hover {
  color: #f5e6b8 !important;
  background: rgba(232, 197, 106, 0.14) !important;
  text-decoration: none !important;
}

/* 横条二级导航 */
.xinai-mu {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}
.xinai-mu ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 6px 0 10px;
  margin: 0;
  list-style: none;
  border-top: 1px solid rgba(212, 175, 88, 0.12);
}
.xinai-mu li { list-style: none; }
.xinai-mu a {
  display: inline-block;
  padding: 4px 10px;
  color: var(--muted);
  font-size: 13px;
  border-radius: 6px;
}
.xinai-mu a:hover {
  color: var(--gold2);
  background: rgba(232, 197, 106, 0.1);
}
.drawer-sub {
  padding: 0 0 6px 12px;
}
.drawer-sub li {
  list-style: none;
}
.drawer-sub a {
  display: block;
  padding: 8px 10px !important;
  font-size: 13px !important;
  color: var(--muted) !important;
  border-bottom: none !important;
}

.nav-user { display: flex; align-items: center; gap: 8px; }

/* DIY 入口（仅有装修权限的管理员可见） */
.btn.diy-btn {
  background: linear-gradient(180deg, #6ea8ff 0%, #3d7dd6 100%) !important;
  border-color: #2a5a9e !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(61, 125, 214, 0.35);
  letter-spacing: 0.12em;
}
.btn.diy-btn:hover {
  background: linear-gradient(180deg, #8bb8ff 0%, #4a8ae0 100%) !important;
  color: #fff !important;
}

/* DIY 空模块提示 */
.xinai-diy-tip {
  padding: 18px 14px;
  text-align: center;
  font-size: 12px;
  line-height: 1.7;
  color: #6f7d96;
  border: 1px dashed rgba(212, 175, 88, 0.35);
  border-radius: 10px;
  background: rgba(18, 28, 48, 0.5);
}
/* DIY 模式下空 area 可点区域更明显 */
body.pg_index .area {
  min-height: 48px;
}
body.pg_index .area .frame,
body.pg_index .area .block {
  margin-bottom: 8px;
}
body.pg_index .notice-list .module li,
body.pg_index .hot-list .module li {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
}
body.pg_index .notice-list .module a,
body.pg_index .hot-list .module a {
  color: var(--text);
}
body.pg_index .notice-list .module a:hover,
body.pg_index .hot-list .module a:hover {
  color: var(--gold2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid #6e5218;
  background: var(--btn);
  color: #2a1c05 !important;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  box-shadow: 0 6px 14px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.3);
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--btn-hover); color: #2a1c05 !important; }
.btn-ghost {
  background: transparent;
  border: 1px solid rgba(232, 197, 106, 0.45);
  color: var(--gold2) !important;
  box-shadow: none;
}
.btn-ghost:hover { background: rgba(232, 197, 106, 0.12); }

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(18,28,48,.9);
  color: var(--gold2);
  font-size: 20px;
  cursor: pointer;
}

/* layout */
.page { max-width: var(--max); margin: 0 auto; padding: 20px 16px 60px; }

.hero {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  min-height: 220px;
  background:
    linear-gradient(105deg, rgba(10,14,28,.88) 0%, rgba(10,14,28,.45) 55%, rgba(10,14,28,.2) 100%),
    url("../img/banner.jpg") center / cover no-repeat;
}
.hero-body { padding: 36px 28px; max-width: 560px; }
.hero h1 {
  margin: 0 0 10px;
  font-size: 1.85rem;
  letter-spacing: 0.12em;
  color: var(--gold2);
  text-shadow: 0 2px 0 #5a4314, 0 0 20px rgba(232,197,106,.3);
}
.hero p { margin: 0 0 18px; color: #c5d0e4; line-height: 1.7; font-size: 14px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* quick links — 大图整卡按钮，文字叠在图上 */
.quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.quick a {
  position: relative;
  display: block;
  min-height: 168px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: var(--shadow);
  color: #fff;
  transition: transform .18s, border-color .18s, box-shadow .18s;
  background-color: #121c30;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.quick a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(8, 12, 22, 0.15) 0%,
    rgba(8, 12, 22, 0.35) 40%,
    rgba(8, 12, 22, 0.88) 100%
  );
  z-index: 1;
  transition: background .18s;
}
.quick a:hover {
  transform: translateY(-3px) scale(1.01);
  border-color: rgba(232, 197, 106, 0.85);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(232, 197, 106, 0.25);
}
.quick a:hover::before {
  background: linear-gradient(
    180deg,
    rgba(8, 12, 22, 0.05) 0%,
    rgba(8, 12, 22, 0.25) 35%,
    rgba(20, 16, 8, 0.9) 100%
  );
}
.quick .q-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 16px 12px 14px;
  text-align: center;
}
.quick .q-label span {
  display: block;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gold2);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8), 0 0 12px rgba(232, 197, 106, 0.25);
}
.quick .q-label small {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: #d5deef;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
  line-height: 1.4;
}
/* 四入口：背景统一 02.jpg，无人物立绘，仅底部遮罩保文字可读 */
.quick a.q-reg,
.quick a.q-down,
.quick a.q-pay,
.quick a.q-bbs {
  background-image: url("../img/quick_bg.jpg");
  background-size: cover;
  background-repeat: no-repeat;
}
/* 裁切位置略作区分 */
.quick a.q-reg  { background-position: 15% 35%; }
.quick a.q-down { background-position: 45% 40%; }
.quick a.q-pay  { background-position: 70% 30%; }
.quick a.q-bbs  { background-position: 35% 55%; }
.quick a.q-reg::before,
.quick a.q-down::before,
.quick a.q-pay::before,
.quick a.q-bbs::before {
  background: linear-gradient(
    180deg,
    rgba(8, 12, 22, 0.08) 0%,
    rgba(8, 12, 22, 0.25) 40%,
    rgba(8, 12, 22, 0.88) 100%
  );
}

/* grid */
.grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.grid-3 {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.9fr;
  gap: 16px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(212,175,88,.22);
  background: linear-gradient(90deg, rgba(232,197,106,.12), transparent);
}
.panel-hd h2 {
  margin: 0;
  font-size: 15px;
  color: var(--gold2);
  letter-spacing: 0.08em;
}
.panel-hd a { font-size: 12px; color: var(--muted); }
.panel-hd a:hover { color: var(--gold); }
.panel-bd { padding: 12px 16px 16px; }

/* notice / hot：兼容 Discuz DIY 模块默认 ul/li/a 结构 */
.notice-list,
.hot-list {
  min-height: 80px;
}
.notice-list .area,
.hot-list .area,
.notice-list .frame,
.hot-list .frame,
.notice-list .block,
.hot-list .block,
.notice-list .dxb_bc,
.hot-list .dxb_bc,
.notice-list .module,
.hot-list .module {
  background: transparent !important;
  border: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  width: 100% !important;
  max-width: none !important;
  overflow: visible !important;
}
/* 非 DIY 时隐藏「1框架」这类框架标题 */
body:not(.pg_index) .xinai-home-root .frame > .title,
.xinai-home-root .frame > .title,
.xinai-home-root .frame .title {
  display: none !important;
}
/* DIY 模式下仍显示框架标题便于拖拽 */
body.pg_index[class*="diy"] .xinai-home-root .frame > .title,
html body.diy .xinai-home-root .frame > .title {
  display: block !important;
  color: #f5e6b8 !important;
  font-size: 12px;
  margin-bottom: 6px;
}

.notice-list ul,
.hot-list ul,
.notice-list .module ul,
.hot-list .module ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}
.notice-list li,
.hot-list li,
.notice-list .module li,
.hot-list .module li {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  padding: 10px 0 !important;
  margin: 0 !important;
  border-bottom: 1px dashed rgba(154,168,194,.18) !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
  overflow: visible !important;
  white-space: normal !important;
}
.notice-list li:last-child,
.hot-list li:last-child { border-bottom: 0 !important; }

/* 标题完整显示：不要截成「心…」 */
.notice-list a,
.hot-list a,
.notice-list .module a,
.hot-list .module a,
.notice-list .module a span,
.hot-list .module a span,
.notice-list .module li a,
.hot-list .module li a {
  display: block !important;
  color: #eef3ff !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
  white-space: normal !important;
  word-break: break-all !important;
  overflow: visible !important;
  text-overflow: clip !important;
  max-width: none !important;
  width: auto !important;
  height: auto !important;
  float: none !important;
}
.notice-list a:hover,
.hot-list a:hover,
.notice-list .module a:hover,
.hot-list .module a:hover {
  color: #f5e6b8 !important;
}
/* 日期/次要文字保持次要色；勿把整段标题 span 都压成灰且截断 */
.notice-list .module .xg1,
.hot-list .module .xg1,
.notice-list .module em,
.hot-list .module em,
.notice-list .module cite,
.hot-list .module cite {
  color: #9aa8c2 !important;
  font-size: 12px !important;
  white-space: nowrap;
}
.notice-list time,
.hot-list time {
  color: #9aa8c2;
  font-size: 12px;
  white-space: nowrap;
}

.tag {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  color: #2a1c05;
  background: var(--gold);
  font-weight: 700;
  height: fit-content;
}
.tag.blue { background: #6ea8ff; color: #0b1a33; }
.tag.green { background: #7ddea0; color: #0d2a18; }
.rank {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: rgba(154,168,194,.15);
  color: var(--muted);
}
.rank.top { background: var(--btn); color: #2a1c05; }
/* 注意：勿再写 ellipsis/nowrap，否则标题又会变成「心…」 */
.hot-meta { color: var(--muted); font-size: 12px; }

/* server card */
.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.pill {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(125,222,160,.35);
  color: var(--ok);
  background: rgba(125,222,160,.1);
}
.pill.warn {
  border-color: rgba(240,198,116,.4);
  color: var(--gold2);
  background: rgba(240,198,116,.1);
}
.intro-text { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 0 0 12px; }
.job-row { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
.job-row img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.4));
}

/* feature cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
}
.feature {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--card2);
  box-shadow: var(--shadow);
}
.feature .pic {
  height: 110px;
  background-size: cover;
  background-position: center;
}
.feature .txt { padding: 12px 14px 16px; }
.feature h3 { margin: 0 0 6px; font-size: 14px; color: var(--gold2); }
.feature p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.6; }

/* footer */
.site-foot {
  margin-top: 28px;
  padding: 20px 16px;
  text-align: center;
  color: #6f7d96;
  font-size: 12px;
  border-top: 1px solid rgba(212,175,88,.2);
  line-height: 1.8;
}
.site-foot a { margin: 0 6px; }

/* mobile bottom nav */
.m-tabbar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 120;
  background: rgba(10, 14, 26, 0.95);
  border-top: 1px solid rgba(212,175,88,.3);
  backdrop-filter: blur(10px);
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
}
.m-tabbar a {
  flex: 1;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  padding: 6px 2px;
}
.m-tabbar a span { display: block; font-size: 18px; margin-bottom: 2px; }
.m-tabbar a.active { color: var(--gold2); }

/* mobile drawer */
.drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,.55);
}
.drawer.open { display: block; }
.drawer-panel {
  width: min(78vw, 300px);
  height: 100%;
  background: #121c30;
  border-right: 1px solid var(--line);
  padding: 20px 16px;
  box-shadow: var(--shadow);
}
.drawer-panel a {
  display: block;
  padding: 12px 10px;
  color: var(--text);
  border-bottom: 1px dashed rgba(154,168,194,.15);
  font-size: 15px;
}

/* responsive */
@media (max-width: 980px) {
  .grid, .grid-3 { grid-template-columns: 1fr; }
  .quick { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .quick a { min-height: 150px; }
  .feature-grid { grid-template-columns: 1fr; }
  .nav-wrap, .nav-main, .nav-user .btn-ghost, .xinai-mu { display: none; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .m-tabbar { display: flex; }
  .page { padding-bottom: 88px; }
  .hero h1 { font-size: 1.4rem; }
  .hero-body { padding: 26px 18px; }
}

@media (max-width: 480px) {
  .topbar-inner { height: 56px; }
  .quick { gap: 10px; }
  .quick a { min-height: 140px; }
  .quick .q-label span { font-size: 15px; }
  .quick .q-label small { font-size: 11px; }
}

