/* ============================================================
   9433游戏社区 — 暗色游戏风主题
   ============================================================ */
:root {
  --bg: #0b0e17;
  --bg2: #10141f;
  --panel: #151a2b;
  --panel2: #1b2138;
  --line: #262d47;
  --text: #e7eaf6;
  --muted: #9aa3c0;
  --accent: #6c5ce7;
  --accent2: #00d2ff;
  --hot: #ff4d6a;
  --ok: #2ecc8f;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0, 0, 0, .35);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  background-image:
    radial-gradient(900px 400px at 85% -10%, rgba(108, 92, 231, .18), transparent 60%),
    radial-gradient(700px 350px at 0% 10%, rgba(0, 210, 255, .08), transparent 60%);
  background-repeat: no-repeat;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; border: 0; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.page { min-height: 60vh; padding: 22px 16px 40px; }

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 14, 23, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 22px; height: 62px; }
.logo { display: flex; align-items: baseline; gap: 8px; flex-shrink: 0; }
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 11px; align-self: center;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; font-weight: 800; font-size: 17px;
  box-shadow: 0 4px 14px rgba(108, 92, 231, .45);
}
.logo-text { font-size: 21px; font-weight: 800; letter-spacing: .5px; }
.logo-text em { font-style: normal; font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 5px; }
.nav { display: flex; gap: 20px; font-size: 15px; }
.nav a { color: var(--muted); padding: 6px 2px; transition: color .2s; }
.nav a:hover { color: var(--text); }
.nav-cta { color: var(--accent2) !important; font-weight: 600; }
.search { margin-left: auto; display: flex; }
.search input {
  width: 210px; height: 38px; padding: 0 14px;
  background: var(--panel); border: 1px solid var(--line); border-right: 0;
  border-radius: 10px 0 0 10px; color: var(--text); outline: none; font-size: 13px;
}
.search input:focus { border-color: var(--accent); }
.search button {
  height: 38px; padding: 0 14px; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), #5649c4);
  border: 0; border-radius: 0 10px 10px 0; color: #fff; font-size: 14px;
}
.menu-btn { display: none; background: none; border: 0; color: var(--text); font-size: 22px; cursor: pointer; }

.cat-bar { display: flex; gap: 6px; padding-bottom: 8px; overflow-x: auto; scrollbar-width: none; }
.cat-bar::-webkit-scrollbar { display: none; }
.cat-bar a {
  flex-shrink: 0; padding: 4px 14px; border-radius: 999px;
  font-size: 13px; color: var(--muted); background: var(--panel);
  border: 1px solid var(--line); transition: all .2s;
}
.cat-bar a:hover, .cat-bar a.on { color: #fff; background: var(--accent); border-color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  position: relative; border-radius: var(--radius); overflow: hidden; margin-bottom: 26px;
  min-height: 320px; display: flex; align-items: flex-end;
  background: linear-gradient(120deg, #232052, #101528 60%);
  background-size: cover; background-position: center;
  box-shadow: var(--shadow);
}
.hero-mask { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,14,23,.15) 30%, rgba(11,14,23,.92)); }
.hero-body { position: relative; padding: 34px; max-width: 640px; }
.hero-badge {
  display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 13px;
  background: rgba(255, 77, 106, .18); color: var(--hot); border: 1px solid rgba(255, 77, 106, .4);
  margin-bottom: 12px;
}
.hero-body h1 { font-size: 34px; margin-bottom: 8px; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.hero-body p { color: #cfd5ea; margin-bottom: 18px; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-empty { align-items: center; }
.hero-empty .hero-body { max-width: 100%; text-align: center; margin: 0 auto; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 22px; border-radius: 10px; font-size: 14px; cursor: pointer;
  border: 1px solid transparent; transition: all .2s; white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #5649c4);
  color: #fff; font-weight: 600; box-shadow: 0 4px 16px rgba(108, 92, 231, .4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(108, 92, 231, .55); }
.btn-ghost { background: rgba(255,255,255,.06); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent2); color: var(--accent2); }
.btn-lg { padding: 12px 30px; font-size: 16px; border-radius: 12px; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-danger { background: rgba(255,77,106,.15); color: var(--hot); border-color: rgba(255,77,106,.35); }

/* ---------- 区块标题 ---------- */
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 14px; }
.section-head h2 { font-size: 21px; }
.section-head .more { color: var(--accent2); font-size: 14px; }

/* ---------- 游戏卡片网格 ---------- */
.grid { display: grid; gap: 14px; }
.games-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.gcard {
  display: flex; gap: 14px; padding: 16px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line); position: relative;
  transition: all .22s ease;
}
.gcard:hover {
  transform: translateY(-4px); border-color: rgba(108, 92, 231, .6);
  box-shadow: 0 10px 30px rgba(108, 92, 231, .22);
}
.gicon { flex-shrink: 0; }
.gicon img, .icon-fallback {
  border-radius: 14px; display: block; object-fit: cover;
  background: linear-gradient(135deg, #2a2f52, #43389a);
  color: #fff; font-weight: 800; text-align: center; font-size: 34px;
}
.ginfo { min-width: 0; flex: 1; }
.ginfo h3 { font-size: 16px; margin-bottom: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ginfo p { font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tag {
  display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 11.5px;
  background: rgba(108, 92, 231, .2); color: #b3a7ff; margin: 0 6px 6px 0;
}
.tag-soft { background: rgba(255,255,255,.07); color: var(--muted); }
.gmeta { position: absolute; right: 14px; bottom: 12px; font-size: 11.5px; color: var(--muted); }

/* ---------- 帖子列表 ---------- */
.thread-list { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.thread-item {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 13px 18px; border-bottom: 1px solid var(--line); transition: background .15s;
}
.thread-item:last-child { border-bottom: 0; }
.thread-item:hover { background: var(--panel2); }
.t-main { min-width: 0; }
.t-main strong { display: inline; font-size: 15px; font-weight: 600; }
.t-meta { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.t-meta em { font-style: normal; color: var(--accent2); }
.badge-top {
  display: inline-block; padding: 0 7px; margin-right: 7px; border-radius: 5px;
  background: rgba(255, 77, 106, .15); color: var(--hot); font-size: 11px; font-weight: 600;
  vertical-align: 2px;
}
.t-nums { display: flex; gap: 12px; flex-shrink: 0; font-size: 12px; color: var(--muted); }

/* ---------- 两栏布局 / 侧栏 ---------- */
.two-col { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.panel-title { font-size: 16px; margin-bottom: 12px; }
.stat-row { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.stat-row:last-child { border-bottom: 0; }
.stat-row b { font-size: 22px; color: var(--accent2); }
.stat-row span { font-size: 13px; color: var(--muted); }
.cat-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-cloud a { padding: 5px 14px; border-radius: 999px; font-size: 13px; background: var(--panel2); border: 1px solid var(--line); }
.cat-cloud a:hover { color: var(--accent2); border-color: var(--accent2); }
.side-tip { font-size: 13px; color: var(--muted); margin-bottom: 12px; }

/* ---------- 面包屑 ---------- */
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.crumbs a:hover { color: var(--accent2); }
.crumbs b { color: var(--text); font-weight: 600; }

/* ---------- 游戏专区 ---------- */
.game-hero { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.game-banner img { width: 100%; max-height: 320px; object-fit: cover; display: block; }
.game-head { display: flex; gap: 22px; padding: 24px; }
.game-icon-lg img, .game-icon-lg .icon-fallback { border-radius: 18px; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.game-head-info { flex: 1; min-width: 0; }
.game-head-info h1 { font-size: 26px; margin-bottom: 10px; }
.game-brief { color: var(--muted); font-size: 14px; margin: 12px 0 16px; }
.game-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.game-stats { display: flex; gap: 18px; margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.shots { display: flex; gap: 10px; padding: 0 24px 24px; overflow-x: auto; }
.shot { flex-shrink: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.shot img { height: 130px; width: auto; display: block; cursor: zoom-in; transition: transform .25s; }
.shot img:hover { transform: scale(1.04); }
.game-detail .rich { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }

/* ---------- 富文本 ---------- */
.rich { font-size: 15px; word-break: break-word; }
.rich p { margin: 10px 0; }
.rich img { border-radius: 10px; margin: 10px 0; }
.rich h1, .rich h2, .rich h3 { margin: 18px 0 10px; }

/* ---------- 帖子详情 ---------- */
.post-main { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.post-title { font-size: 24px; margin-bottom: 14px; }
.post-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.post-meta b { color: var(--text); }
.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; font-weight: 700; font-size: 15px;
}
.post-content { border-top: 1px solid var(--line); padding-top: 16px; }
.replies { margin-top: 20px; }
.reply { display: flex; gap: 12px; padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; }
.r-head { display: flex; gap: 10px; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.r-head b { color: var(--text); }
.r-body { flex: 1; min-width: 0; font-size: 14.5px; }

/* ---------- 表单 ---------- */
input[type=text], textarea, select {
  width: 100%; padding: 11px 14px; margin-bottom: 14px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); font-size: 14px; outline: none; font-family: inherit;
  transition: border-color .2s;
}
input[type=text]:focus, textarea:focus, select:focus { border-color: var(--accent); }
textarea { resize: vertical; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.post-new-box, .reply-form-box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.reply-form-box { margin-top: 20px; }
.form-row { display: flex; gap: 12px; align-items: center; }
.form-row input { margin-bottom: 14px; }
.hp { position: absolute !important; left: -9999px !important; height: 0; opacity: 0; }
.alert {
  padding: 11px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px;
  background: rgba(255, 77, 106, .12); color: var(--hot); border: 1px solid rgba(255, 77, 106, .35);
}

/* ---------- 空状态 / 分页 ---------- */
.empty { padding: 46px 20px; text-align: center; color: var(--muted); font-size: 14px; grid-column: 1 / -1; }
.empty a { color: var(--accent2); }
.empty.big { padding: 90px 20px; font-size: 17px; }
.pager { display: flex; justify-content: center; gap: 8px; margin: 26px 0 6px; flex-wrap: wrap; }
.pager a, .pager .dots { padding: 7px 14px; border-radius: 9px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.pager a:hover { color: var(--accent2); border-color: var(--accent2); }
.pager a.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- 页脚 ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 50px; background: var(--bg2); }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 26px; padding: 34px 16px 24px; }
.f-col h4 { font-size: 14px; margin-bottom: 12px; }
.f-col a { display: block; font-size: 13px; color: var(--muted); padding: 3px 0; }
.f-col a:hover { color: var(--accent2); }
.f-col p { font-size: 13px; color: var(--muted); margin-top: 10px; max-width: 320px; }
.f-bottom { border-top: 1px solid var(--line); padding: 16px; display: flex; gap: 18px; justify-content: center; font-size: 12px; color: var(--muted); }
#backTop {
  position: fixed; right: 22px; bottom: 26px; width: 44px; height: 44px; border-radius: 12px;
  background: var(--accent); color: #fff; border: 0; font-size: 18px; cursor: pointer;
  opacity: 0; pointer-events: none; transition: opacity .25s; box-shadow: var(--shadow);
}
#backTop.show { opacity: 1; pointer-events: auto; }

/* ---------- 图片查看层 ---------- */
#lightbox {
  position: fixed; inset: 0; z-index: 99; background: rgba(0,0,0,.88);
  display: none; align-items: center; justify-content: center; cursor: zoom-out;
}
#lightbox img { max-width: 92vw; max-height: 92vh; border-radius: 8px; }
#lightbox.open { display: flex; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
  .games-grid { grid-template-columns: 1fr; }
  .nav { display: none; position: absolute; top: 62px; left: 0; right: 0; background: var(--bg2); flex-direction: column; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .menu-btn { display: block; margin-left: auto; }
  .search { margin-left: 0; }
  .search input { width: 120px; }
  .header-inner { gap: 10px; }
  .hero-body h1 { font-size: 26px; }
  .game-head { flex-direction: column; align-items: center; text-align: center; }
  .game-head-info .game-tags, .game-head-info .game-btns, .game-head-info .game-stats { justify-content: center; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
