/* 烈焰传说 - 仿盛大游戏推广站 公共样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #0d0b09;
  --panel: #1a1410;
  --panel2: #241b13;
  --gold: #e8b34b;
  --gold-dim: #a97f2e;
  --red: #c0392b;
  --text: #e8dcc8;
  --muted: #9c8f78;
  --border: #3a2d1c;
}
body {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--text);
  line-height: 1.7;
  /* 原创玛法大陆背景图 + 轻遮罩（背景更明亮，文字仍可读） */
  background:
    linear-gradient(rgba(13, 11, 9, .45), rgba(13, 11, 9, .62)),
    url('../zbtp/bg.png') center top / cover no-repeat fixed,
    #0d0b09;
}
a { color: var(--gold); text-decoration: none; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* 顶栏 */
.topbar { background: linear-gradient(180deg, #241a10, #16100a); border-bottom: 2px solid var(--gold-dim); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.nav-search { display: flex; flex: 1; max-width: 300px; margin-left: 16px; }
.nav-search input {
  flex: 1; min-width: 0; padding: 7px 12px; font-size: 13px;
  background: #0d0b09; border: 1px solid var(--border); border-right: none;
  border-radius: 4px 0 0 4px; color: var(--text); outline: none;
}
.nav-search input:focus { border-color: var(--gold-dim); }
.nav-search button {
  padding: 7px 14px; font-size: 13px; letter-spacing: 1px; cursor: pointer;
  background: linear-gradient(180deg, #e8b34b, #a97f2e); color: #241b13; font-weight: bold;
  border: 1px solid var(--gold-dim); border-radius: 0 4px 4px 0;
}
.nav-search button:hover { filter: brightness(1.1); }
@media (max-width: 760px) { .nav-search { display: none; } }
.logo { font-size: 26px; font-weight: bold; color: var(--gold); letter-spacing: 2px; text-shadow: 0 0 12px rgba(232,179,75,.5); }
.logo small { font-size: 12px; color: var(--muted); display: block; letter-spacing: 4px; }
.nav a { color: var(--text); margin-left: 28px; font-size: 15px; padding: 6px 2px; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a.active { color: var(--gold); border-bottom-color: var(--gold); }

/* 横幅 */
.hero { position: relative; text-align: center; padding: 0; overflow: hidden; min-height: 380px; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at 50% 0%, rgba(192,57,43,.28), transparent 65%); }
.hero::before { content: ''; position: absolute; inset: 0; background: url('../zbtp/bg.png') center top / cover no-repeat; opacity: .5; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(13,11,9,.25), rgba(13,11,9,.55) 75%, var(--bg)); }
.hero-content { position: relative; z-index: 2; padding: 60px 16px; }
.hero-title {
  font-size: 56px; color: #ffd98a; letter-spacing: 8px; margin-bottom: 14px;
  text-shadow: 0 0 18px rgba(255,140,40,.9), 0 0 46px rgba(230,90,20,.7), 0 3px 0 #5a1a10;
  animation: titleGlow 2s ease-in-out infinite;
}
@keyframes titleGlow {
  0%, 100% { text-shadow: 0 0 14px rgba(255,140,40,.75), 0 0 38px rgba(230,90,20,.55), 0 3px 0 #5a1a10; color: #ffd98a; }
  50% { text-shadow: 0 0 26px rgba(255,170,60,1), 0 0 64px rgba(240,110,25,.9), 0 3px 0 #5a1a10; color: #ffe9b0; }
}
.hero-content p { color: #d8ccb8; margin: 14px 0 26px; font-size: 16px; text-shadow: 0 1px 6px rgba(0,0,0,.8); }
@media (max-width: 760px) { .hero-title { font-size: 34px; letter-spacing: 4px; } }
.hero h1 { font-size: 40px; color: var(--gold); text-shadow: 0 0 24px rgba(192,57,43,.8), 0 2px 0 #5a1a10; letter-spacing: 6px; }
.hero p { color: var(--muted); margin: 14px 0 24px; font-size: 16px; }
.btn {
  display: inline-block; padding: 12px 44px; font-size: 17px; letter-spacing: 3px;
  background: linear-gradient(180deg, #d94f2b, #8f2413); color: #ffe9c9;
  border: 1px solid #e8b34b; border-radius: 4px; cursor: pointer; transition: .2s;
}
.btn:hover { filter: brightness(1.15); }
.hero-btns { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.btn.small { padding: 6px 18px; font-size: 13px; letter-spacing: 1px; }
.btn.gold { background: linear-gradient(180deg, #e8b34b, #a97f2e); color: #241b13; font-weight: bold; }
.btn.ghost { background: transparent; border-color: var(--gold-dim); color: var(--gold); }

/* 装备展示：4个框 */
.equip-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 10px; }
@media (max-width: 760px) { .equip-row { grid-template-columns: repeat(2, 1fr); } }
.equip-box {
  background: linear-gradient(180deg, #221a10, var(--panel));
  border: 1px solid var(--gold-dim); border-radius: 8px;
  padding: 22px 16px; text-align: center; transition: .25s; position: relative; overflow: hidden;
}
.equip-box::before {
  content: ''; position: absolute; inset: 4px;
  border: 1px solid rgba(232,179,75,.25); border-radius: 6px; pointer-events: none;
}
.equip-box:hover { transform: translateY(-4px); box-shadow: 0 0 24px rgba(232,179,75,.35); border-color: var(--gold); }
.equip-img { width: 100%; max-width: 180px; aspect-ratio: 1/1; object-fit: cover; border-radius: 6px; margin-bottom: 12px; border: 1px solid rgba(232,179,75,.35); }
.equip-name { font-size: 18px; color: var(--gold); font-weight: bold; letter-spacing: 2px; margin-bottom: 8px; }
.equip-attr { font-size: 12px; color: #d98d5f; margin-bottom: 8px; }
.equip-desc { font-size: 12px; color: var(--muted); }

/* 搜索 */
.search-bar { display: flex; gap: 10px; max-width: 640px; margin: 0 auto 8px; }
.search-bar input {
  flex: 1; padding: 12px 18px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 4px; color: var(--text); font-size: 15px; outline: none;
}
.search-bar input:focus { border-color: var(--gold-dim); }

/* 分类标签 */
.tabs { display: flex; justify-content: center; gap: 10px; margin: 18px 0 26px; flex-wrap: wrap; }
.tabs button {
  padding: 7px 22px; background: var(--panel); border: 1px solid var(--border);
  color: var(--muted); border-radius: 20px; cursor: pointer; font-size: 14px;
}
.tabs button.active { background: linear-gradient(180deg, #3a2a14, #241b13); color: var(--gold); border-color: var(--gold-dim); }

/* 文章列表 */
.section-title { display: flex; align-items: center; gap: 12px; margin: 30px 0 16px; }
.section-title h2 { font-size: 22px; color: var(--gold); letter-spacing: 2px; }
.section-title .line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold-dim), transparent); }
.article-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.article-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  padding: 18px 20px; cursor: pointer; transition: .2s; display: flex; flex-direction: column;
}
.article-card:hover { border-color: var(--gold-dim); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.article-card h3 { font-size: 16px; color: var(--text); margin-bottom: 8px; line-height: 1.5; }
.article-card:hover h3 { color: var(--gold); }
.article-card .desc { font-size: 13px; color: var(--muted); flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-card .meta { display: flex; justify-content: space-between; margin-top: 12px; font-size: 12px; color: var(--muted); }
.tag { display: inline-block; padding: 1px 10px; border-radius: 3px; font-size: 12px; background: rgba(192,57,43,.2); color: #e88870; border: 1px solid rgba(192,57,43,.4); }
.tag.gonglue { background: rgba(232,179,75,.12); color: var(--gold); border-color: rgba(232,179,75,.4); }
.tag.gonggao { background: rgba(80,150,220,.12); color: #7fb3e8; border-color: rgba(80,150,220,.4); }
.empty { text-align: center; color: var(--muted); padding: 50px 0; }

/* 文章详情 */
.article-detail { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 34px 38px; margin: 26px 0; }
.article-detail h1 { color: var(--gold); font-size: 26px; margin-bottom: 12px; }
.article-detail .meta { color: var(--muted); font-size: 13px; padding-bottom: 16px; border-bottom: 1px dashed var(--border); margin-bottom: 22px; }
.article-body p { margin-bottom: 14px; font-size: 15px; }
.back-link { display: inline-block; margin: 18px 0; }

/* 留言板 */
.guestbook-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px; }
@media (max-width: 760px) { .guestbook-grid { grid-template-columns: 1fr; } }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 24px; }
.panel h3 { color: var(--gold); margin-bottom: 16px; font-size: 17px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 10px 14px; background: var(--panel2); border: 1px solid var(--border);
  border-radius: 4px; color: var(--text); font-size: 14px; outline: none; font-family: inherit;
}
.field input:focus, .field textarea:focus { border-color: var(--gold-dim); }
.msg-item { border-bottom: 1px dashed var(--border); padding: 14px 4px; }
.msg-item:last-child { border-bottom: none; }
.msg-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.msg-head .name { color: var(--gold); font-weight: bold; }
.msg-head .time { color: var(--muted); font-size: 12px; }
.msg-content { font-size: 14px; }
.msg-reply { margin-top: 8px; background: rgba(232,179,75,.07); border-left: 3px solid var(--gold-dim); padding: 8px 12px; font-size: 13px; border-radius: 0 4px 4px 0; }
.msg-reply b { color: var(--gold); }

/* 游戏精彩展示：幻灯片 */
.carousel { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid var(--gold-dim); background: #000; }
.carousel-track { display: flex; transition: transform .5s ease; }
.slide { min-width: 100%; position: relative; aspect-ratio: 16/7; max-height: 430px; overflow: hidden; }
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide .slide-placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1a1410, #2a1d10 50%, #1a1410); color: var(--muted); font-size: 14px; gap: 8px;
}
.slide .slide-placeholder .ph-icon { font-size: 42px; opacity: .5; }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--gold-dim);
  background: rgba(13,11,9,.6); color: var(--gold); font-size: 26px; line-height: 1;
  cursor: pointer; transition: .2s; display: flex; align-items: center; justify-content: center; padding-bottom: 4px;
}
.carousel-btn:hover { background: rgba(232,179,75,.25); }
.carousel-btn.prev { left: 14px; }
.carousel-btn.next { right: 14px; }
.carousel-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 5; }
.carousel-dots span {
  width: 10px; height: 10px; border-radius: 50%; background: rgba(232,217,200,.35);
  cursor: pointer; transition: .2s; border: 1px solid rgba(232,179,75,.4);
}
.carousel-dots span.active { background: var(--gold); transform: scale(1.2); }

/* 页脚 */
footer { margin-top: 60px; border-top: 1px solid var(--border); background: #0a0806; padding: 28px 0 34px; }
.footer-keywords { text-align: center; color: #6a5d47; font-size: 12px; margin-bottom: 10px; line-height: 2; }
.copy { text-align: center; color: #5a4f3d; font-size: 12px; }

/* 右下悬浮留言 */
.chat-fab {
  position: fixed; right: 22px; bottom: 26px; z-index: 200;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  width: 62px; height: 62px; border-radius: 50%; cursor: pointer;
  background: linear-gradient(160deg, #d94f2b, #8f2413); border: 2px solid var(--gold);
  color: #ffe9c9; font-size: 22px; line-height: 1;
  justify-content: center; box-shadow: 0 6px 20px rgba(0,0,0,.55);
  animation: fabPulse 2.4s ease-in-out infinite; transition: opacity .25s, transform .25s;
}
.chat-fab span { font-size: 10px; letter-spacing: 0; line-height: 1.3; text-align: center; }
.chat-fab:hover { filter: brightness(1.15); }
.chat-fab.hide { opacity: 0; transform: scale(.6); pointer-events: none; }
@keyframes fabPulse {
  0%, 100% { box-shadow: 0 6px 20px rgba(0,0,0,.55), 0 0 0 0 rgba(217,79,43,.5); }
  50% { box-shadow: 0 6px 20px rgba(0,0,0,.55), 0 0 0 12px rgba(217,79,43,0); }
}
.chat-panel {
  position: fixed; right: 22px; bottom: 26px; z-index: 201;
  width: 330px; max-width: calc(100vw - 32px); max-height: 78vh;
  background: var(--panel); border: 1px solid var(--gold-dim); border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,.65);
  display: flex; flex-direction: column;
  opacity: 0; transform: translateY(16px) scale(.96); pointer-events: none; transition: .25s;
}
.chat-panel.show { opacity: 1; transform: none; pointer-events: auto; }
.chat-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; color: var(--gold); font-weight: bold; font-size: 15px;
  background: linear-gradient(180deg, #2a1e10, #1c150c);
  border-bottom: 1px solid var(--border); border-radius: 10px 10px 0 0;
}
.chat-close { cursor: pointer; font-size: 22px; line-height: 1; color: var(--muted); }
.chat-close:hover { color: var(--gold); }
.chat-body { padding: 14px 16px 16px; overflow-y: auto; }
.chat-msg-title { color: var(--gold); font-size: 13px; margin: 14px 0 4px; padding-top: 10px; border-top: 1px dashed var(--border); }
.chat-body .msg-item { padding: 10px 2px; }
.chat-body .msg-content { font-size: 13px; }
.chat-body .msg-reply { font-size: 12px; }

/* toast */
.toast {
  position: fixed; top: 80px; left: 50%; transform: translateX(-50%);
  background: rgba(232,179,75,.95); color: #241b13; padding: 10px 28px; border-radius: 4px;
  font-size: 14px; z-index: 999; display: none; box-shadow: 0 4px 20px rgba(0,0,0,.5);
}

/* ================= 后台样式 ================= */
body.admin { background: #12100d; }
.admin-wrap { display: flex; min-height: calc(100vh - 64px); }
.sidebar { width: 210px; background: #171310; border-right: 1px solid var(--border); padding: 20px 0; flex-shrink: 0; }
.sidebar a { display: block; padding: 13px 26px; color: var(--muted); font-size: 15px; border-left: 3px solid transparent; cursor: pointer; }
.sidebar a.active, .sidebar a:hover { color: var(--gold); background: rgba(232,179,75,.06); border-left-color: var(--gold); }
.main { flex: 1; padding: 26px 30px; min-width: 0; }
.main h2 { color: var(--gold); font-size: 20px; margin-bottom: 18px; }
.table { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: 8px; overflow: hidden; }
.table th, .table td { padding: 12px 14px; text-align: left; font-size: 13px; border-bottom: 1px solid var(--border); }
.table th { background: var(--panel2); color: var(--gold); font-weight: normal; }
.table tr:hover td { background: rgba(232,179,75,.04); }
.op-btn { padding: 4px 12px; font-size: 12px; border-radius: 3px; border: 1px solid var(--border); background: transparent; color: var(--muted); cursor: pointer; margin-right: 6px; }
.op-btn:hover { color: var(--gold); border-color: var(--gold-dim); }
.op-btn.danger:hover { color: #e88870; border-color: #a04030; }
.status-pending { color: #e88870; }
.status-done { color: #8fd18f; }
.toolbar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.toolbar input, .toolbar select {
  padding: 9px 14px; background: var(--panel2); border: 1px solid var(--border);
  border-radius: 4px; color: var(--text); font-size: 14px; outline: none;
}
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: none; align-items: flex-start; justify-content: center; z-index: 100; overflow-y: auto; padding: 40px 16px; }
.modal-mask.show { display: flex; }
.modal { background: var(--panel); border: 1px solid var(--gold-dim); border-radius: 8px; width: 720px; max-width: 100%; padding: 28px; }
.modal h3 { color: var(--gold); margin-bottom: 20px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 26px; }
.stat-card { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 20px; }
.stat-card .num { font-size: 30px; color: var(--gold); font-weight: bold; }
.stat-card .label { color: var(--muted); font-size: 13px; margin-top: 4px; }
.login-box { max-width: 380px; margin: 80px auto; }
.reply-box { margin-top: 8px; }
.reply-box textarea { width: 100%; min-height: 70px; }
