/* ===== 平行三国官网 · 公共样式（移动优先） ===== */
:root {
  --bg: #14100c;
  --bg-soft: #1d1712;
  --panel: #241c15;
  --panel-2: #2c221a;
  --line: #3a2e22;
  --gold: #d9a94e;
  --gold-soft: #b8893a;
  --red: #b0402f;
  --text: #ece3d2;
  --text-dim: #a89a83;
  --ok: #5fae6b;
  --warn: #d9a94e;
  --err: #d0604f;
  --radius: 10px;
  --maxw: 1080px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 15px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
main { flex: 1; }

/* ===== 顶部导航 ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(20, 16, 12, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-bar { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 700; letter-spacing: 2px; color: var(--gold); }
.logo-mark {
  width: 30px; height: 30px; border-radius: 6px;
  background: linear-gradient(135deg, var(--red), #7c2418);
  color: #f5e6c8; font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.nav-menu { display: none; list-style: none; gap: 4px; }
.nav-menu a {
  display: block; padding: 8px 14px; border-radius: 8px;
  color: var(--text-dim); font-size: 15px; transition: .2s;
}
.nav-menu a:hover { color: var(--text); background: var(--panel); }
.nav-menu a.active { color: var(--gold); background: var(--panel); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-user { display: none; color: var(--gold); font-size: 14px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-toggle {
  width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); color: var(--text); font-size: 18px;
}
.mobile-menu { display: none; border-top: 1px solid var(--line); background: var(--bg-soft); }
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block; padding: 13px 20px; color: var(--text-dim);
  border-bottom: 1px solid var(--line);
}
.mobile-menu a.active { color: var(--gold); }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel-2); color: var(--text);
  padding: 10px 20px; font-size: 15px; transition: .2s;
}
.btn:hover { border-color: var(--gold-soft); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  border: none; color: #241a08; font-weight: 600;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-danger { background: linear-gradient(135deg, var(--red), #7c2418); border: none; color: #f5e6c8; }
.btn-block { display: flex; width: 100%; }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* ===== 表单 ===== */
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; color: var(--text-dim); font-size: 14px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 12px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); outline: none; transition: border-color .2s;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--gold-soft); }
.field textarea { resize: vertical; min-height: 110px; }
.field .hint { margin-top: 5px; font-size: 12px; color: var(--text-dim); }
.captcha-row { display: flex; gap: 10px; }
.captcha-row input { flex: 1; }
.captcha-img {
  height: 44px; width: 120px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); object-fit: cover;
}

/* ===== 卡片 / 面板 ===== */
.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
}
.panel + .panel { margin-top: 16px; }
.panel-title {
  font-size: 17px; font-weight: 700; color: var(--gold);
  padding-bottom: 12px; margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px;
}
.section-title {
  font-size: 22px; font-weight: 700; color: var(--gold);
  margin: 34px 0 16px; letter-spacing: 1px;
  display: flex; align-items: center; gap: 10px;
}
.section-title::before {
  content: ""; width: 4px; height: 20px; border-radius: 2px;
  background: linear-gradient(var(--gold), var(--red));
}

/* ===== 首页 ===== */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse at 70% 20%, rgba(176, 64, 47, .35), transparent 55%),
    radial-gradient(ellipse at 20% 80%, rgba(217, 169, 78, .18), transparent 50%),
    linear-gradient(160deg, #241a10, #14100c 70%);
  border-bottom: 1px solid var(--line);
}
.hero-inner { padding: 64px 0 56px; text-align: center; }
.hero h1 {
  font-size: 40px; letter-spacing: 8px; font-weight: 800;
  background: linear-gradient(180deg, #f3d99a, var(--gold) 60%, #8a6428);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 14px;
}
.hero p { color: var(--text-dim); font-size: 15px; margin-bottom: 26px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-actions .btn { padding: 12px 30px; font-size: 16px; }

.feature-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.feature-card {
  display: flex; gap: 14px; align-items: center;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; transition: .2s;
}
.feature-card:hover { border-color: var(--gold-soft); transform: translateY(-2px); }
.feature-img {
  flex: none; width: 72px; height: 72px; border-radius: 8px;
  background: linear-gradient(135deg, var(--panel-2), var(--line));
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: var(--gold); overflow: hidden;
}
.feature-img img { width: 100%; height: 100%; object-fit: cover; }
.feature-card h3 { font-size: 16px; margin-bottom: 4px; }
.feature-card p { font-size: 13px; color: var(--text-dim); }

/* 新闻 / 活动列表 */
.news-list { list-style: none; }
.news-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 4px; border-bottom: 1px dashed var(--line);
  transition: .15s;
}
.news-item:hover { background: rgba(217, 169, 78, .05); }
.news-date {
  flex: none; width: 58px; text-align: center;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 0; font-size: 12px; color: var(--text-dim); line-height: 1.35;
}
.news-date b { display: block; font-size: 18px; color: var(--gold); font-weight: 700; }
.news-main { flex: 1; min-width: 0; }
.news-main .title {
  font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.news-main .title:hover { color: var(--gold); }
.tag {
  flex: none; font-size: 12px; padding: 2px 10px; border-radius: 20px;
  border: 1px solid var(--line); color: var(--text-dim);
}
.tag-ann { color: var(--gold); border-color: var(--gold-soft); }
.tag-ing { color: var(--ok); border-color: var(--ok); }
.tag-wait { color: var(--text-dim); }
.tag-end { color: #6d6152; }

/* 活动卡片（PC 网格） */
.event-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.event-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; transition: .2s;
}
.event-card:hover { border-color: var(--gold-soft); transform: translateY(-2px); }
.event-cover {
  height: 150px;
  background: linear-gradient(135deg, #3a2a18, #241a10 70%);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-soft); font-size: 30px; overflow: hidden;
}
.event-cover img { width: 100%; height: 100%; object-fit: cover; }
.event-body { padding: 14px 16px 16px; }
.event-body h3 { font-size: 16px; margin-bottom: 6px; }
.event-body .time { font-size: 13px; color: var(--text-dim); margin-bottom: 10px; }
.event-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* ===== 详情页 ===== */
.detail-head { padding: 26px 0 8px; }
.detail-head h1 { font-size: 24px; line-height: 1.4; margin-bottom: 10px; }
.detail-meta { font-size: 13px; color: var(--text-dim); display: flex; gap: 12px; flex-wrap: wrap; }
.rich-text { padding: 18px 2px 30px; word-break: break-word; }
.rich-text img { border-radius: 8px; margin: 10px 0; }
.rich-text p { margin-bottom: 10px; }
.rich-text h1, .rich-text h2, .rich-text h3 { margin: 16px 0 8px; color: var(--gold); }
.rich-text a { color: var(--gold); text-decoration: underline; }
.rich-text ul, .rich-text ol { padding-left: 22px; margin-bottom: 10px; }

/* ===== 用户中心 ===== */
.tabs { display: flex; gap: 6px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.tabs button {
  background: none; border: none; color: var(--text-dim);
  padding: 10px 18px; font-size: 15px; border-bottom: 2px solid transparent;
}
.tabs button.active { color: var(--gold); border-bottom-color: var(--gold); font-weight: 600; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

.profile-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.profile-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.profile-row .k { color: var(--text-dim); flex: none; }
.profile-row .v { word-break: break-all; text-align: right; }
.badge-on { color: var(--ok); }
.badge-off { color: var(--err); }

/* 反馈图片上传 */
.upload-row { display: flex; gap: 10px; flex-wrap: wrap; }
.upload-box {
  width: 84px; height: 84px; border-radius: 8px; overflow: hidden;
  border: 1px dashed var(--line); position: relative;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); font-size: 22px; cursor: pointer;
  background: var(--bg-soft);
}
.upload-box img { width: 100%; height: 100%; object-fit: cover; }
.upload-box .rm {
  position: absolute; top: 2px; right: 2px; width: 20px; height: 20px;
  border: none; border-radius: 50%; background: rgba(0,0,0,.7); color: #fff; font-size: 12px;
}
.feedback-item { padding: 14px 0; border-bottom: 1px dashed var(--line); }
.feedback-item .meta { font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }
.feedback-item .content { font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.feedback-item .imgs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.feedback-item .imgs img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; }

/* ===== Toast ===== */
#toast-wrap {
  position: fixed; top: 70px; left: 50%; transform: translateX(-50%);
  z-index: 999; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none; width: max-content; max-width: 90vw;
}
.toast {
  background: rgba(30, 24, 17, .95); border: 1px solid var(--gold-soft);
  color: var(--text); padding: 10px 20px; border-radius: 8px; font-size: 14px;
  animation: toast-in .25s ease; max-width: 90vw;
}
.toast.err { border-color: var(--err); }
.toast.ok { border-color: var(--ok); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; } }

/* ===== 空状态 / 加载 ===== */
.empty { text-align: center; color: var(--text-dim); padding: 40px 0; font-size: 14px; }
.loading { text-align: center; color: var(--text-dim); padding: 20px 0; font-size: 13px; }
.lock-tip {
  background: var(--bg-soft); border: 1px dashed var(--line);
  border-radius: 8px; padding: 22px; text-align: center;
  color: var(--text-dim); font-size: 14px;
}
.lock-tip a { color: var(--gold); }

/* ===== 页脚 ===== */
.site-footer {
  border-top: 1px solid var(--line); margin-top: 50px;
  background: var(--bg-soft); padding: 26px 0;
  text-align: center; color: var(--text-dim); font-size: 13px; line-height: 2;
}
.site-footer .f-links { margin-bottom: 6px; }
.site-footer .f-links a { margin: 0 10px; }
.site-footer .f-links a:hover { color: var(--gold); }

/* ===== PC 断点 ===== */
@media (min-width: 768px) {
  body { font-size: 16px; }
  .nav-toggle { display: none; }
  .nav-menu { display: flex; }
  .mobile-menu { display: none !important; }
  .nav-user { display: block; }
  .hero h1 { font-size: 56px; }
  .hero-inner { padding: 90px 0 80px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .event-grid { grid-template-columns: repeat(2, 1fr); }
  .profile-grid { grid-template-columns: 1fr 1fr; }
  .detail-head h1 { font-size: 30px; }
  .rich-text { max-width: 820px; }
}
@media (min-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .event-grid { grid-template-columns: repeat(3, 1fr); }
}
