/* ============================================================
   金币论坛 全局样式 v3（大气版）
   设计语言：深蓝紫渐变主调 + 金色点缀、玻璃拟态吸顶条、
   大圆角卡片、细腻光影、响应式多档适配
   ============================================================ */
:root {
  --bg: #eef1f8;
  --bg-deep: #e6ebf6;
  --card: #ffffff;
  --border: #e3e8f2;
  --text: #18202f;
  --muted: #6b7688;
  --primary: #2f5af0;
  --primary-dark: #1c3fc4;
  --primary-soft: #eaf0ff;
  --gold: #b45309;
  --gold-bg: #fff7e3;
  --gold-border: #f0d9a8;
  --success: #16a34a;
  --danger: #dc2626;
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 10px 30px rgba(22, 34, 84, 0.12);
  --shadow-lg: 0 18px 48px rgba(22, 34, 84, 0.16);
  --radius: 16px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Segoe UI", Arial, sans-serif;
  font-size: var(--body-font-size, 16px);
  color: var(--text);
  line-height: 1.75;
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 88% -130px, rgba(124, 92, 255, 0.16), transparent 60%),
    radial-gradient(780px 440px at -8% 30px, rgba(47, 90, 240, 0.12), transparent 55%),
    radial-gradient(720px 440px at 96% 40%, rgba(240, 177, 60, 0.14), transparent 55%),
    radial-gradient(660px 400px at 10% 80%, rgba(236, 72, 153, 0.10), transparent 55%),
    linear-gradient(180deg, #f2efff 0%, var(--bg) 360px);
  background-attachment: fixed;
}

a { color: var(--primary); text-decoration: none; transition: color .15s ease; }
a:hover { text-decoration: underline; }

.container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }

/* ==================== 内容超宽自动换行 / 自适应（防止横向溢出） ==================== */
body { overflow-x: hidden; word-break: break-word; overflow-wrap: break-word; }
/* 长单词 / 连续数字 / 长链接，在内容区可断行 */
.post-content, .paid-content, .card, .post-card, td, th {
  overflow-wrap: anywhere;
  word-break: break-word;
}
/* 图片 / 视频 / 框架等不超出容器 */
img, video, svg, canvas, iframe, embed, object { max-width: 100%; }
img, video { height: auto; }
/* 表格不撑破布局，单元格内容换行 */
table { max-width: 100%; width: 100%; border-collapse: collapse; }
/* 代码块自动换行，不横向撑破，极端情况内部滚动兜底 */
pre, code { white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; }
pre { overflow-x: auto; }
/* 表单控件不超出容器 */
input, textarea, select { max-width: 100%; }

/* ==================== 顶部 Logo 条（玻璃拟态） ==================== */
.logo-strip {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(22, 34, 84, 0.06);
}
.logo-strip::after {
  content: "";
  display: block;
  height: 3px;
  max-width: 1000px;
  margin: 0 auto;
  background: linear-gradient(90deg, #2f5af0, #7c5cff, #ec4899, #f0b13c, #22c55e, #2f5af0);
  background-size: 300% 100%;
  animation: stripFlow 8s linear infinite;
}
@keyframes stripFlow {
  0%   { background-position: 0% 0; }
  100% { background-position: 300% 0; }
}
.logo-strip-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;   /* 第一行：网站名（左）+ 用户信息（右） */
  grid-template-rows: auto auto;                /* 第二行：帖子标题 + 返回首页 */
  align-items: center;
  gap: 8px 10px;
  min-height: 56px;
  padding: 4px;
}
.brand { grid-column: 1; grid-row: 1; justify-self: start; min-width: 0; }
.userbox { grid-column: 2; grid-row: 1; justify-self: end; }
.brand {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 1.5px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(120deg, #2f5af0 0%, #6a5cf5 42%, #9b5cf0 68%, #ec4899 92%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 1px 8px rgba(92, 107, 255, 0.22);
  animation: brandFlow 6s ease-in-out infinite alternate;
}
@keyframes brandFlow {
  0%   { background-position: 0% 0; }
  100% { background-position: 100% 0; }
}
.brand-logo { height: 42px; width: auto; display: inline-block; }
.brand:hover { text-decoration: none; }
.logo-strip .brand {
  font-size: 35px; font-weight: 900;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.userbox { margin-left: auto !important; display: flex; align-items: center; gap: 8px; font-size: 17px; flex-wrap: nowrap; }
.userbox a {
  font-weight: 600;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease,
              transform .18s ease, border-color .18s ease;
}
.coins-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #fff4d6, #ffe3a6);
  color: #9a4a00;
  border: 1px solid var(--gold-border);
  padding: 5px 13px 5px 8px;
  border-radius: 999px;
  font-weight: 800; font-size: 16px;
  box-shadow: 0 3px 10px rgba(180, 83, 9, 0.14);
}
.coins-label { display: inline; }
.coins-badge::before {
  content: "\00A5";
  width: 18px; height: 18px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 900; color: #fff; border-radius: 50%;
  background: linear-gradient(135deg, #ffbe3d, #f08a12);
  box-shadow: inset 0 -1px 2px rgba(0,0,0,.22), 0 1px 2px rgba(180,83,9,.3);
}
/* 已登录：用户名胶囊 */
.user-name-link {
  padding: 5px 14px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary);
  border: 1px solid rgba(47, 90, 240, 0.16);
}
.user-name-link:hover { background: var(--primary); color: #fff; text-decoration: none; }
/* 退出 */
.logout-link { color: var(--muted); padding: 5px 8px; }
.logout-link:hover { color: var(--danger); text-decoration: none; }
/* 未登录：登录描边按钮 */
.login-link {
  padding: 6px 16px; border-radius: 999px;
  border: 1.5px solid var(--primary); color: var(--primary); font-weight: 700;
}
.login-link:hover { background: var(--primary); color: #fff; text-decoration: none; }
/* 注册渐变实心按钮 */
.register-link {
  padding: 6px 16px; border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), #7c5cff);
  color: #fff; font-weight: 700;
  box-shadow: 0 6px 16px rgba(67, 88, 235, 0.32);
}
.register-link:hover {
  color: #fff; text-decoration: none; transform: translateY(-1px);
  box-shadow: 0 9px 22px rgba(67, 88, 235, 0.42);
}

/* ==================== 主体 / 页脚 ==================== */
main.container { padding-top: 3px; padding-bottom: 60px; }
.footer {
  border-top: none;
  padding: 22px 0;
  color: var(--muted);
  font-size: 14px;
  background: rgba(255, 255, 255, 0.78);
  text-align: center;
}
.footer .container { border-top: 1px solid var(--border); padding-top: 22px; }

/* ==================== 区块标题 ==================== */
.list-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.list-head h1 { font-size: 26px; margin: 0; }
.section-title {
  font-size: 21px;
  font-weight: 800;
  margin: 0;
  padding-left: 14px;
  border-left: none;
  position: relative;
  line-height: 1.3;
}
.section-title::before {
  content: "";
  position: absolute;
  left: 0; top: 2px; bottom: 2px;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, #2f5af0, #7c5cff 45%, #ec4899);
}

/* ==================== 首页广告 ==================== */
.home-ad {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 0 0 0;
  text-align: center;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.home-ad-bottom { margin: 28px 0 0; }
/* 广告与帖子之间 / 帖子区开场的渐变分隔线（两端淡出，与内容同宽） */
.section-divider {
  height: 1px; margin: 24px 0 26px; border: 0;
  background: linear-gradient(90deg, transparent, rgba(124, 92, 255, 0.5) 18%, rgba(47, 90, 240, 0.55) 50%, rgba(236, 72, 153, 0.5) 82%, transparent);
}

/* ==================== 卡片 ==================== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 30px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-md);
}
.card h1 { margin: 0 0 16px; font-size: 24px; }
.card h2 { margin: 0 0 12px; font-size: 18px; }

/* ==================== 提示消息 ==================== */
.flash {
  border-radius: 12px;
  padding: 12px 18px;
  margin-bottom: 16px;
  font-size: 15px;
  box-shadow: var(--shadow-sm);
}
.flash-success { background: #ecfdf3; border: 1px solid #b9f0cd; color: #15803d; }
.flash-error   { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.flash-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8; }

/* ==================== 按钮 ==================== */
.btn {
  display: inline-block;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  background: var(--card);
  color: var(--text);
  line-height: 1.4;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 6px 18px rgba(47, 90, 240, 0.30);
}
.btn-primary:hover { box-shadow: 0 8px 26px rgba(47, 90, 240, 0.42), 0 0 20px rgba(124, 92, 255, 0.28); }
.btn-gold {
  background: linear-gradient(135deg, #ff9a2e, #e07012);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(255, 150, 20, 0.38), 0 0 16px rgba(255, 190, 70, 0.30);
}
.btn-gold:hover { box-shadow: 0 8px 26px rgba(255, 150, 20, 0.46), 0 0 22px rgba(255, 190, 70, 0.38); }
.btn-danger { background: linear-gradient(135deg, #ef4444, var(--danger)); color: #fff; box-shadow: 0 4px 12px rgba(220, 38, 38, 0.22); }
.btn-sm { padding: 6px 14px; font-size: 14px; border-radius: 9px; }
.btn-outline { background: #fff; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

/* ==================== 表单 ==================== */
.form-row { margin-bottom: 20px; }
.form-row label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 15px; }
.form-row input[type="text"],
.form-row input[type="password"],
.form-row input[type="number"],
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #dfe5f0;
  border-radius: 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(16, 24, 40, 0.04);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.form-row input:hover, .form-row select:hover, .form-row textarea:hover {
  border-color: #c3d0ea;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(47, 90, 240, 0.12);
  background: #fff;
}
.form-row input::placeholder, .form-row textarea::placeholder {
  color: #a3adc2;
}
textarea.code-editor { scrollbar-width: thin; scrollbar-color: #c6d0e5 transparent; }
textarea.code-editor::-webkit-scrollbar { width: 8px; height: 8px; }
textarea.code-editor::-webkit-scrollbar-thumb { background: #c6d0e5; border-radius: 8px; }
textarea.code-editor::-webkit-scrollbar-thumb:hover { background: #a9b8d8; }
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; }
.form-check { font-weight: normal; }
.form-check label { font-weight: normal; display: flex; align-items: center; gap: 8px; }
.theme-picker { display: flex; align-items: center; gap: 12px; }
.theme-picker input[type="color"] {
  width: 54px; height: 38px; padding: 3px;
  border: 1px solid var(--border); border-radius: 10px;
  background: #fff; cursor: pointer;
}
/* 发帖页两列紧凑布局 */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; align-items: start; }
.form-grid .form-row { margin-bottom: 14px; }

/* 设置页分组标题 */
.form-group-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin: 10px 0 6px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--border);
}
/* 最小值 ~ 最大值范围输入 */
.range-inputs { display: flex; align-items: center; gap: 10px; }
.range-inputs input[type="number"] { width: 120px; padding: 11px 14px; }
.range-inputs span { color: var(--muted); font-size: 16px; }
.form-group-title + .form-grid { margin-bottom: 8px; }
/* ==================== 登录 / 注册 美化 ==================== */
.auth-wrap {
  position: relative;
  min-height: calc(100vh - 210px);
  display: flex; align-items: center; justify-content: center;
  padding: 36px 16px;
}
.auth-bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: linear-gradient(135deg, #eef3ff 0%, #f5f0ff 48%, #ecfbff 100%);
}
.blob { position: absolute; border-radius: 50%; filter: blur(72px); opacity: 0.55; }
.b1 { width: 420px; height: 420px; left: -120px; top: -120px; background: #8ab4ff; }
.b2 { width: 380px; height: 380px; right: -110px; top: 18%; background: #c4a2ff; }
.b3 { width: 360px; height: 360px; left: 28%; bottom: -170px; background: #8fe0ff; }
.auth-card {
  width: 100%; max-width: 440px;
  margin: 0; padding: 40px 38px 32px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 22px 60px rgba(40, 60, 130, 0.16), 0 2px 8px rgba(40, 60, 130, 0.06);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  animation: authIn 0.5s ease both;
}
@keyframes authIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.auth-badge {
  width: 72px; height: 72px; margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--primary), #7c5cff);
  box-shadow: 0 10px 24px rgba(67, 88, 235, 0.4);
}
.auth-badge svg {
  width: 34px; height: 34px; fill: none; stroke: #fff;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.auth-title {
  text-align: center; font-size: 26px; font-weight: 800; margin: 0;
  background: linear-gradient(135deg, var(--primary), #7c5cff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-sub { text-align: center; color: var(--muted); font-size: 14px; margin: 8px 0 24px; }
.auth-card .flash { margin-bottom: 18px; }
.auth-card .form-row { margin-bottom: 18px; }
.auth-card .form-row label { font-size: 14px; margin-bottom: 7px; color: #44506a; }
.auth-card .form-row input { padding: 13px 16px; border-radius: 13px; font-size: 15px; }
.auth-submit {
  width: 100%; padding: 14px; font-size: 17px; border-radius: 13px; margin-top: 4px;
  background: linear-gradient(135deg, var(--primary), #6d58f0);
  box-shadow: 0 10px 24px rgba(67, 88, 235, 0.35);
}
.auth-submit:hover { box-shadow: 0 14px 32px rgba(67, 88, 235, 0.48); transform: translateY(-2px); }
.auth-switch { text-align: center; margin: 20px 0 0; font-size: 14px; color: var(--muted); }
.auth-switch a { color: var(--primary); font-weight: 700; }

.muted { color: var(--muted); font-size: 14px; }

/* ==================== 代码编辑器（发帖内容） ==================== */
.code-editor {
  width: 100%;
  min-height: 200px;
  padding: 14px 18px;
  border: 1px solid #dfe5f0;
  border-radius: 14px;
  font-family: Consolas, Monaco, Menlo, "Courier New", monospace;
  font-size: 15px;
  line-height: 1.8;
  background: #fff;
  color: var(--text);
  resize: vertical;
  box-shadow: inset 0 1px 2px rgba(16, 24, 40, 0.04);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.code-editor:hover { border-color: #c3d0ea; }
.code-editor:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(47, 90, 240, 0.12);
}

/* ==================== 帖子列表 ==================== */
.post-list { display: flex; flex-direction: column; gap: 20px; }
.post-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff, #fcfdff);
  border: 1px solid #e8edf7;
  border-radius: 18px;
  padding: 22px 28px;
  box-shadow: 0 6px 20px rgba(40, 60, 130, 0.06);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.post-card::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  background: linear-gradient(90deg, #2f5af0, #7c5cff, #ec4899, #f0b13c, #22c55e, #2f5af0);
  background-size: 300% 100%;
  opacity: 0;
  animation: stripFlow 7s linear infinite;
  transition: opacity .25s ease;
}
.post-card:hover {
  border-color: #cdb8ff;
  box-shadow: 0 18px 44px rgba(124, 92, 255, 0.2), 0 6px 18px rgba(40, 60, 130, 0.08);
  transform: translateY(-3px);
}
.post-card:hover::before { opacity: 1; }
.post-title {
  font-size: 18px; font-weight: 700; letter-spacing: .2px;
  display: flex; align-items: center; gap: 12px;
}
.post-title .badge {
  font-size: 16px; font-weight: 700; letter-spacing: .5px;
  padding: 6px 16px; margin: 0; flex-shrink: 0;
  border-radius: 10px;
  display: inline-flex; align-items: center; gap: 7px;
  text-shadow: 0 1px 1px rgba(255,255,255,.35);
}
.post-title .badge::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: currentColor; box-shadow: 0 0 0 3px rgba(255,255,255,.45);
}
.post-title-link {
  flex: 1 1 auto; min-width: 0;
  color: var(--title-color, var(--text));
  white-space: normal; word-break: break-word; overflow-wrap: anywhere;
}
.post-title-link:hover { color: var(--primary); text-decoration: none; }
.post-meta-right {
  flex-shrink: 0; margin-left: auto;
  display: inline-flex; align-items: center; gap: 10px;
}
.post-title .post-author-inline {
  color: inherit; font-size: inherit; font-weight: inherit;
  white-space: nowrap;
}
.tip-count-inline {
  font-size: 13px; font-weight: 500; white-space: nowrap;
  padding: 3px 12px; border-radius: 999px;
  color: var(--gold); background: var(--gold-bg);
  border: 1px solid var(--gold-border);
}
.post-meta { color: var(--muted); font-size: 14px; display: flex; gap: 18px; flex-wrap: wrap; }
.badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 999px;
  vertical-align: 2px;
  margin-left: 8px;
}
.badge-gold { background: linear-gradient(135deg, #ffe08a, #ffb347 55%, #ff9a2e); color: #6b3400; border: 1px solid #ffcf6e; box-shadow: 0 4px 14px rgba(255, 170, 40, 0.4); }
.badge-info { background: linear-gradient(135deg, #e6eeff, #d6e4ff); color: #1d4ed8; border: 1px solid #bcd4ff; box-shadow: 0 3px 10px rgba(47, 90, 240, 0.22); }
.badge-free { background: linear-gradient(135deg, #8ef7c5, #34d399 55%, #17c98a); color: #045c38; border: 1px solid #6ee7b7; box-shadow: 0 4px 14px rgba(52, 211, 153, 0.4); }
.badge-top { background: linear-gradient(135deg, #ff8a80, #ef4444); color: #fff; border: 1px solid #fca5a5; box-shadow: 0 3px 10px rgba(239, 68, 68, 0.35); }

/* ==================== 帖子详情（正文代码块） ==================== */
.post-detail { padding: 30px 34px; }
.post-title-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding-bottom: 18px; margin-bottom: 18px;
  border-bottom: 1px solid #e7e3f7;
}
.post-title-row h1 {
  margin: 0; flex: 1 1 auto; min-width: 0;
  font-size: 35px; font-weight: 600; line-height: 1.4;
}
.post-title-row .btn { flex-shrink: 0; margin-top: 4px; }
.post-detail .post-meta {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 9px 14px; margin-bottom: 22px;
  color: var(--muted); font-size: 14px;
}
.post-detail .post-meta > span { display: inline-flex; align-items: center; }
.post-detail .post-meta .badge { font-size: 13px; padding: 4px 13px; }
.post-detail > .post-content {
  margin-top: 0; line-height: 1.9;
  background: transparent; border: 0; border-radius: 0; padding: 2px;
}
.post-detail > .post-content p { margin: 0 0 16px; }
.post-detail > .post-content p:last-child { margin-bottom: 0; }
.post-content {
  margin-top: 22px;
  font-size: 16px;
  line-height: 1.8;
  word-break: break-word;
  overflow-wrap: break-word;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
}
.post-content img, .post-content video, .post-content iframe { max-width: 100%; height: auto; }
.post-content table { border-collapse: collapse; max-width: 100%; }
.post-content th, .post-content td { border: 1px solid var(--border); padding: 6px 10px; }
.post-content pre, .post-content code {
  background: #f4f6fb;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: Consolas, Monaco, Menlo, "Courier New", monospace;
  font-size: 13px;
}
.post-content pre { padding: 12px 14px; overflow-x: auto; }
.post-content pre code { background: transparent; border: 0; }
.paid-box {
  position: relative; overflow: hidden;
  margin-top: 34px;
  border: 1px solid var(--gold-border);
  border-radius: 18px;
  padding: 26px 28px;
  background: linear-gradient(160deg, #fff8e8, #fff3d6 60%, #ffffff);
  box-shadow: 0 10px 30px rgba(214, 140, 30, 0.14);
}
.paid-box::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, #f0b13c, #ff8a2e, #f5d76e, #ffb347);
  background-size: 200% 100%;
}
.paid-box h3 {
  margin: 0 0 16px; color: #9a5d00;
  font-size: 19px; font-weight: 800;
  display: flex; align-items: center; gap: 9px;
}
.paid-box .paid-tip-hint {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 700; color: #9a5d00;
  background: linear-gradient(135deg, #fff4d6, #ffe3a6);
  border: 1px solid var(--gold-border);
  padding: 4px 12px; border-radius: 999px;
  box-shadow: 0 2px 8px rgba(180, 83, 9, 0.12);
  margin-left: 6px;
}
.paid-box .paid-tip-hint::before {
  content: "\00A5";
  width: 16px; height: 16px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 900; color: #fff; border-radius: 50%;
  background: linear-gradient(135deg, #ffbe3d, #f08a12);
}
.paid-box h3::before {
  content: ""; width: 21px; height: 21px; flex-shrink: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='10' fill='%23f5b62f'/><circle cx='12' cy='12' r='7' fill='none' stroke='%23fff' stroke-width='1.4'/><text x='12' y='16' text-anchor='middle' font-size='10' fill='%23fff' font-weight='bold'>¥</text></svg>") center/contain no-repeat;
}
.paid-box.is-locked .paid-locked { text-align: center; padding: 8px 2px 2px; }
.paid-box.is-locked .paid-locked::before {
  content: ""; display: block; width: 60px; height: 60px; margin: 2px auto 16px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='4.5' y='10.5' width='15' height='10' rx='2.5' fill='%23f5b62f'/><path d='M7.5 10.5V8a4.5 4.5 0 0 1 9 0v2.5' fill='none' stroke='%23e08a12' stroke-width='2.2' stroke-linecap='round'/></svg>") center/contain no-repeat;
}
.paid-locked p { margin: 0 0 18px; font-size: 16px; }
.paid-locked strong { color: var(--gold); font-size: 19px; }
.paid-locked .btn-gold { padding: 12px 36px; font-size: 16.5px; border-radius: 14px; }
.paid-locked .muted { margin: 16px 0 0; }
.paid-box .flash { margin-top: 16px; text-align: left; }
.paid-box.is-unlocked {
  background: linear-gradient(160deg, #f3f0ff, #f7f4ff 55%, #ffffff);
  border-color: #ddd0ff;
}
.paid-box.is-unlocked::before { background: linear-gradient(90deg, #7c5cff, #2f5af0, #9b5cf0); }
.paid-box.is-unlocked h3 { color: #5b3fd6; }
.paid-content {
  background: #fff; color: var(--text);
  border: 1px solid var(--border); border-radius: 14px;
  padding: 20px 22px; box-shadow: var(--shadow-sm);
}

/* ==================== 分页 ==================== */
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 30px; color: var(--muted); font-size: 15px; }
.pagination a {
  color: var(--primary);
  background: #fff;
  border: 1px solid var(--border);
  padding: 7px 18px;
  border-radius: 999px;
  transition: all .15s ease;
}
.pagination a:hover { border-color: var(--primary); background: var(--primary-soft); text-decoration: none; }

/* ==================== 列表 / 金币 ==================== */
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li {
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}
.plain-list li:last-child { border-bottom: none; }
.empty {
  color: var(--muted); text-align: center;
  padding: 56px 24px; font-size: 16px;
  background: var(--card); border: 1px dashed var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.coin-line { font-size: 17px; }
.coin-num {
  color: var(--gold);
  font-size: 30px;
  font-weight: 800;
  background: linear-gradient(135deg, #d97b16, #a85a05);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 1px 8px rgba(92, 107, 255, 0.22);
}

/* ==================== 管理后台 ==================== */
.admin-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  box-shadow: var(--shadow-sm);
}
.admin-nav a {
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  padding: 8px 18px;
  border-radius: 999px;
  transition: all .15s ease;
}
.admin-nav a:hover { color: var(--primary); background: var(--primary-soft); text-decoration: none; }
.admin-nav a.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 4px 12px rgba(47, 90, 240, 0.25);
}

.data-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.data-table th, .data-table td { border-bottom: 1px solid var(--border); padding: 11px 8px; text-align: left; vertical-align: top; }
.data-table th { color: var(--muted); font-weight: 600; font-size: 14px; letter-spacing: 0.4px; background: #f8faff; }
.data-table tbody tr:hover { background: #f8faff; }
.inline-form { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.small-input { width: 74px; padding: 7px 9px; border: 1px solid #dfe5f0; border-radius: 9px; font-size: 14px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease; }
.small-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47, 90, 240, 0.12); }
.small-input[type="password"] { width: 96px; }
.ops { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ops-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.empty-cell { text-align: center; color: var(--muted); padding: 20px 0; }
.batch-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.batch-form input[type="color"] {
  width: 52px; height: 34px; padding: 2px;
  border: 1px solid var(--border); border-radius: 8px;
  background: #fff; cursor: pointer;
}
.check-all, .post-check { cursor: pointer; accent-color: var(--primary); width: 17px; height: 17px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* 手动排序（拖拽手柄 + 数字框） */
.sort-cell { display: flex; align-items: center; gap: 6px; }
.drag-handle {
  cursor: grab; color: #9aa5bd; font-size: 19px; line-height: 1;
  user-select: none; padding: 3px 5px; border-radius: 6px;
  transition: background .15s ease, color .15s ease;
}
.drag-handle:hover { background: var(--primary-soft); color: var(--primary); }
.drag-handle:active { cursor: grabbing; }
.sort-input { width: 82px; text-align: center; }
.qe-input { width: 100%; min-width: 84px; }
.paid-content-input {
  width: 100%; min-width: 230px; min-height: 60px;
  padding: 8px 10px;
  border: 1px solid #dfe5f0; border-radius: 9px;
  font-family: Consolas, Monaco, Menlo, "Courier New", monospace;
  font-size: 13px; line-height: 1.6; color: var(--text);
  background: #fff; resize: vertical;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.paid-content-input:hover { border-color: #c3d0ea; }
.paid-content-input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 90, 240, 0.12);
}
/* 打赏内容只读预览（双击进入编辑） */
.paid-content-view {
  margin: 0; width: 100%; min-width: 230px; min-height: 60px; max-height: 160px;
  overflow: auto; padding: 8px 10px;
  border: 1px dashed #c9d2e4; border-radius: 9px;
  background: #f8faff;
  font-family: Consolas, Monaco, Menlo, "Courier New", monospace;
  font-size: 13px; line-height: 1.6; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
  cursor: text;
  transition: border-color .15s ease, background .15s ease;
}
.paid-content-view:hover { border-color: var(--primary); background: var(--primary-soft); }
.data-table tbody tr[draggable="true"] { cursor: move; }
.data-table tbody tr.dragging { opacity: 0.45; background: var(--primary-soft); }

/* ==================== 自定义标题样式（首页广告中可直接使用） ==================== */
.biaoti {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  text-align: center;
  line-height: 40px;
  border-radius: 0 40px;
  background: linear-gradient(#8B4513, #fff);
  box-shadow: 0 4px 1px 0 rgba(255, 255, 0), 0 6px 20px 0 rgba(0, 0, 0, .19);
}
.colors {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  background-image: linear-gradient(to right, #02000e 90%, #000 95%, #FFFF00 100%);
  display: inline-block;
  max-width: 100%;
  box-sizing: border-box;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: colorChange 10s infinite;
  -webkit-animation: colorChange 10s infinite;
}
@keyframes colorChange {
  0%   { background-position-x: 0; background-position-y: 0; }
  20%  { background-position-x: 1500px; background-position-y: -233px; }
  100% { background-position-x: 0; background-position-y: 0; }
}

/* ==================== 自适应布局 ==================== */
img, video { max-width: 100%; height: auto; }
iframe { max-width: 100%; }

@media (min-width: 1200px) {
  .container { max-width: 1140px; }
  .logo-strip::after { max-width: 1140px; }
}







/* ===== 帖子页：返回网站首页按钮（美观） ===== */
.back-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #3b5bfd 0%, #7c5cff 55%, #b04bff 100%);
  border: none;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(76, 92, 255, 0.28);
  text-decoration: none;
  white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.back-home-btn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(76, 92, 255, 0.4);
  filter: brightness(1.06);
}
.back-home-btn:active { transform: translateY(0); }
.back-home-arrow {
  display: inline-block;
  font-size: 16px;
  line-height: 1;
  transition: transform .18s ease;
}
.back-home-btn:hover .back-home-arrow { transform: translateX(-3px); }

/* ===== 返回首页按钮：手机端适配 ===== */



/* 首页帖子卡片：整卡可点击 */
.post-card { cursor: pointer; }
/* ==================== 顶部栏帖子标题 ==================== */
.top-title-row {
  grid-column: 1 / -1;
  grid-row: 2;
  min-width: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;   /* 标题靠左，返回按钮靠右 */
  gap: 12px;
  margin-top: 4px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, #3b5bfd 0%, #7c5cff 55%, #ffbe3d 130%) border-box;
  box-shadow: 0 4px 16px rgba(76, 92, 255, 0.14);
  transition: transform .2s ease, box-shadow .2s ease;
}
.top-title-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(76, 92, 255, 0.20);
}
.top-post-title {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 65%;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}
.top-post-title::before {
  content: "";
  width: 6px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffbe3d 0%, #f08a12 55%, #ff7ab8 130%);
  box-shadow: 0 0 8px rgba(255, 176, 61, 0.55);
}
.logo-strip .back-home-btn { flex-shrink: 0; }