/* ============ 网络创世纪 官网主题 (UO 中世纪暗黑+羊皮纸) ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", SimSun, serif;
  overflow-x: hidden; /* 配合 100vw 全出血横幅, 防滚动条溢出 */
  /* 有 bg.png/bg.jpg 用图(png优先), 没有则用渐变石纹兜底 */
  background-color: #17120c;
  background-image: url("../img/bg.png"), url("../img/bg.jpg"), url("../img/bg.jpeg"), repeating-linear-gradient(45deg, #1b150e 0 24px, #17120c 24px 48px);
  background-attachment: fixed;
  color: #e8dcc0;
  line-height: 1.7;
}
a { color: #d8b45a; text-decoration: none; }
a:hover { color: #f0d080; text-decoration: underline; }
img { max-width: 100%; }
.wrap { width: 1100px; max-width: 96%; margin: 0 auto; }
.empty { color: #8a7a5c; padding: 12px; }
.big-empty { padding: 40px; text-align: center; }

/* 顶栏 */
.topbar { background: #0d0a06; border-bottom: 1px solid #3a2d18; font-size: 13px; }
.topbar .wrap { display: flex; justify-content: space-between; padding: 6px 0; }
.tb-right .online-num { color: #7dd87d; }

/* 头部+导航: 透明, 让 hero 图上升到导航背后 */
.site-head { background: transparent; border-bottom: none; position: relative; z-index: 7; }
.head-in { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo img { height: 46px; }
.logo-txt { font-size: 26px; font-weight: bold; color: #e9c877; letter-spacing: 3px; text-shadow: 0 2px 4px #000; }
.main-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a {
  padding: 8px 16px; color: #d8c9a0; font-size: 15px;
  border: 1px solid transparent; border-radius: 3px;
}
.main-nav a:hover { background: #33261442; text-decoration: none; }
.main-nav a.on { background: #6b4f22; color: #fff3d0; border-color: #8a6a30; }

/* 英雄区: 有 hero.png/hero.jpg 用图(png优先), 没有则用多层渐变兜底 */
.hero {
  margin-top: -76px; /* 上拉到导航背后, 图顶到导航处 */
  background-color: #0b0803;
  background-image:
    url("../img/hero.png"),
    url("../img/hero.jpg"),
    url("../img/hero.jpeg"),
    radial-gradient(ellipse at 50% 20%, rgba(233,200,119,.22), rgba(0,0,0,0) 60%),
    linear-gradient(180deg, #2a1d0e 0%, #170f06 55%, #0b0803 100%);
  background-position: center, center, center, center, center;
  background-size: cover, cover, cover, auto, auto;
  background-repeat: no-repeat;
  border-bottom: 3px double #6b4f22;
  position: relative;
}
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(10,7,3,.25), rgba(10,7,3,.75)); }
.hero-in { position: relative; z-index: 1; padding: 146px 0 60px; text-align: center; }
.hero h1 { font-size: 44px; color: #f2d78a; letter-spacing: 8px; text-shadow: 0 3px 10px #000, 0 0 30px #000; }
.hero-sub { margin: 12px 0 24px; color: #e0d0a8; font-size: 16px; letter-spacing: 2px; text-shadow: 0 2px 6px #000; }
.hero-btns { display: flex; gap: 14px; justify-content: center; }

/* 按钮 */
.btn {
  display: inline-block; padding: 9px 22px; font-size: 15px;
  background: #3a2c16; color: #e8d8ac; border: 1px solid #6b4f22; border-radius: 3px;
}
.btn:hover { background: #4d3a1d; text-decoration: none; color: #fff; }
.btn-gold { background: linear-gradient(#c9a24a, #a07c2c); color: #241a08; font-weight: bold; border-color: #e0c070; }
.btn-gold:hover { background: linear-gradient(#dcb45c, #b08a34); color: #170f04; }

/* 主布局: 整块区域用一张大羊皮纸兜底(左三栏+右侧栏都在纸内) */
.main-grid {
  display: flex; gap: 18px; margin: 26px auto; align-items: flex-start;
  padding: 48px 42px;
  background-color: transparent; /* 透明PNG的撕边外直接露出石墙背景 */
  background-image: url("../img/parchment.png"), url("../img/parchment.jpg"), url("../img/parchment.jpeg");
  background-size: 100% 100%, 100% 100%, 100% 100%; /* 图已用 trim_parchment.php 裁掉白边, 精确贴合不裁切 */
  background-position: center, center, center;
  background-repeat: no-repeat;
}
/* 大纸内的小面板去掉自己的羊皮纸皮肤, 透明叠在大纸上 */
.main-grid .panel { background: none; box-shadow: none; padding: 10px 12px; }
.col-main { flex: 1; min-width: 0; }
.col-side { width: 300px; flex-shrink: 0; }

/* 面板(羊皮纸): 图片放大超扫描(116%)居中, 把图自带的透明/白边裁到面板外;
   米黄底色只从羊皮纸半透明处透出来(即"底色在纸内") */
.panel {
  background-color: transparent; /* 同上: 撕边外露石墙 */
  background-image: url("../img/parchment.png"), url("../img/parchment.jpg"), url("../img/parchment.jpeg");
  background-size: 100% 100%, 100% 100%, 100% 100%;
  background-position: center, center, center;
  background-repeat: no-repeat;
  color: #3a2c16; border: none; border-radius: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,.5); margin-bottom: 22px; padding: 34px 40px;
  overflow-x: auto;
}
.panel-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid #b09050; padding-bottom: 8px; margin-bottom: 10px; }
.panel-head h2 { font-size: 19px; color: #6b4a12; letter-spacing: 2px; }
.panel-head .more { font-size: 13px; }

/* 文章列表 */
.art-list { list-style: none; }
.art-list li { padding: 8px 2px; border-bottom: 1px dashed #c0a878; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.art-list li:last-child { border-bottom: none; }
.art-list a { color: #4a3410; font-size: 15px; flex: 1; min-width: 200px; }
.art-list a:hover { color: #8a5a10; }
.art-list .date { color: #8a7448; font-size: 12px; }
.art-list .sum { width: 100%; color: #7a6438; font-size: 13px; margin: 2px 0 0; }
.art-list.big a { font-size: 17px; }
.tag.top { background: #a03020; color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 2px; }

/* 工会卡片 */
.guild-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.guild-card { display: flex; flex-direction: column; background: #e8dcb8; border: 1px solid #b09050; border-radius: 3px; padding: 12px; }
.guild-card:hover { background: #f0e4c0; text-decoration: none; }
.g-name { color: #5a3c0c; font-weight: bold; font-size: 15px; }
.g-date { color: #8a7448; font-size: 12px; }

/* 侧栏 */
.side-panel { padding: 14px; }
.online-box { text-align: center; padding: 10px 0; }
.online-big { font-size: 40px; color: #2c6e2c; font-weight: bold; }
.online-label { color: #7a6438; font-size: 13px; }
.side-names { list-style: none; margin-top: 8px; }
.side-names li { padding: 4px 2px; border-bottom: 1px dotted #c0a878; color: #4a3410; font-size: 14px; }
.side-names i { color: #8a5a10; font-style: normal; font-size: 12px; }
.thumb-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.thumb-grid img { width: 100%; height: 80px; object-fit: cover; border: 1px solid #b09050; border-radius: 2px; }

/* 页头横幅(分类页): 全出血 hero 图背景, 并上升到导航背后 */
.page-band { padding: 30px 0 10px; position: relative; }
.page-band::before {
  content: ""; position: absolute; z-index: -1;
  top: -78px; bottom: -10px; left: calc(50% - 50vw); width: 100vw;
  background-image:
    linear-gradient(rgba(10,7,3,.35), rgba(10,7,3,.72)),
    url("../img/hero.png"),
    url("../img/hero.jpg"),
    url("../img/hero.jpeg");
  background-size: auto, cover, cover, cover;
  background-position: center, center, center, center;
  background-repeat: no-repeat;
  border-bottom: 3px double #6b4f22;
}
.page-title { color: #e9c877; font-size: 28px; letter-spacing: 4px; text-shadow: 0 2px 6px #000; }
.page-desc { color: #b0a078; font-size: 14px; margin-top: 4px; }
.page-band + .wrap .panel, .wrap .panel { margin-top: 16px; }

/* 分页 */
.pager { margin-top: 14px; text-align: center; }
.pager a, .pager .cur { display: inline-block; margin: 0 3px; padding: 4px 10px; border: 1px solid #b09050; border-radius: 2px; color: #5a3c0c; font-size: 13px; }
.pager .cur { background: #6b4f22; color: #fff3d0; }

/* 详情 */
.detail { padding: 24px 28px; }
.d-title { font-size: 24px; color: #5a3c0c; letter-spacing: 1px; }
.d-meta { margin: 10px 0 16px; color: #8a7448; font-size: 13px; display: flex; gap: 16px; flex-wrap: wrap; border-bottom: 1px dashed #c0a878; padding-bottom: 10px; }
.d-cat { background: #6b4f22; color: #fff3d0; padding: 1px 8px; border-radius: 2px; }
.d-img { margin: 14px 0; text-align: center; }
.d-img img { max-width: 100%; border: 1px solid #b09050; border-radius: 3px; }
.d-body { color: #3a2c16; font-size: 15px; white-space: normal; }
.d-back { margin-top: 22px; }

/* 画廊 */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin: 18px auto; }
.g-item { background: #f4ead2; border: 1px solid #6b4f22; border-radius: 4px; overflow: hidden; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.5); }
.g-item img { width: 100%; height: 170px; object-fit: cover; display: block; }
.g-noimg { height: 170px; display: flex; align-items: center; justify-content: center; color: #8a7a5c; background: #e0d4b0; }
.g-item figcaption { padding: 8px 10px; color: #4a3410; }
.g-item figcaption b { display: block; font-size: 14px; }
.g-item figcaption span { font-size: 12px; color: #8a7448; }

/* 灯箱 */
.lightbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.88); z-index: 99; align-items: center; justify-content: center; flex-direction: column; }
.lightbox img { max-width: 92%; max-height: 82%; border: 2px solid #6b4f22; }
.lb-cap { color: #e8d8ac; margin-top: 10px; }

/* 在线表格 */
.online-table { width: 100%; min-width: 560px; border-collapse: collapse; }
.online-table th, .online-table td { padding: 8px 10px; border-bottom: 1px dashed #c0a878; text-align: left; font-size: 14px; }
.online-table th { color: #6b4a12; border-bottom: 2px solid #b09050; }
.online-table .pname { color: #4a3410; font-weight: bold; }

/* 页脚 */
.site-foot { background: #0d0a06; border-top: 2px solid #6b4f22; margin-top: 30px; padding: 22px 0; text-align: center; }
.foot-line { color: #c9b888; }
.foot-line.sub { color: #7a6c4c; font-size: 12px; margin-top: 4px; }
.backtop { position: fixed; right: 18px; bottom: 24px; background: #3a2c16; color: #e8d8ac; border: 1px solid #6b4f22; padding: 6px 10px; border-radius: 3px; }

@media (max-width: 860px) {
  .main-grid { flex-direction: column; }
  .col-side { width: 100%; }
  .hero h1 { font-size: 30px; letter-spacing: 4px; }
}

/* 注册页表单：标签在左一列，输入框在右一列 */
.reg-panel { max-width: 660px; }
.reg-form .reg-row { display: flex; align-items: flex-start; margin-bottom: 14px; }
.reg-form .reg-row > label {
  flex: 0 0 92px; padding: 8px 12px 0 0; text-align: right;
  font-size: 14px; font-weight: bold; color: #6b4a12;
}
.reg-form .reg-field { flex: 1 1 auto; min-width: 0; }
.reg-form input {
  display: block; width: 100%; max-width: 320px; padding: 7px 9px; font-size: 15px;
  background: #fffdf4; color: #2a2010; border: 1px solid #a98c50; border-radius: 2px;
}
.reg-form input:focus { outline: none; border-color: #7a5c1e; box-shadow: 0 0 0 2px rgba(176,144,80,.3); }
.reg-form .reg-cap {
  display: inline-block; vertical-align: middle; min-width: 112px; margin-right: 10px;
  color: #a32020; font-size: 17px;
}
.reg-form #rg-cap { display: inline-block; vertical-align: middle; width: 88px; }
.reg-form .btn { font-family: inherit; cursor: pointer; }
.reg-hint { display: block; margin-top: 4px; font-size: 12px; color: #7a6438; line-height: 1.6; }
.reg-form .reg-actions { margin: 18px 0 0; padding-left: 92px; }
.reg-ok, .reg-err { margin: 12px 0; padding: 9px 12px; font-size: 14px; border-left: 4px solid; }
.reg-ok { border-color: #2f7d32; background: rgba(47,125,50,.12); color: #1d5c20; }
.reg-err { border-color: #a32020; background: rgba(163,32,32,.1); color: #8a1616; }
.reg-tip { font-size: 13px; color: #7a6438; }
.reg-rules { margin-top: 18px; padding-top: 10px; border-top: 1px dashed #c0a878; font-size: 13px; color: #5a4620; }
.reg-rules ul { padding-left: 22px; }
.reg-rules li { margin: 3px 0; }

@media (max-width: 560px) {
  .reg-form .reg-row { display: block; }
  .reg-form .reg-row > label { display: block; flex: none; padding: 0 0 4px; text-align: left; }
  .reg-form .reg-actions { padding-left: 0; }
}
