/* 铁一中学生论坛 · Bento 现代风（3.4）——Bento 布局 + 此前深枣红主题配色，深浅双模式 */
:root {
  --primary: #802028;      /* 校徽深枣红（此前主题） */
  --primary-dark: #5e161e;
  --primary-light: #fbe9e7;
  --primary-text: #802028; /* 浅色下正文里的深枣红 */
  --link: #802028;
  --accent: #f0543a;       /* 珊瑚橙红 */
  --accent-dark: #c93a24;
  --grad: linear-gradient(135deg, #a93226, #802028);
  --grad-3: linear-gradient(135deg, #5e161e, #802028, #b03a2e);
  --gold: #ffb020;
  --bg: #fff9f1;           /* 暖奶油底 */
  --bg-glow-1: rgba(255, 190, 120, 0.45);
  --bg-glow-2: rgba(240, 84, 58, 0.16);
  --card: rgba(255, 255, 255, 0.8);
  --card-solid: #ffffff;
  --card-border: rgba(255, 255, 255, 0.7);
  --modal-bg: rgba(255, 253, 249, 0.88);
  --text: #2b2b33;
  --muted: #8a8a95;
  --border: rgba(128, 32, 40, 0.13);
  --hover-bg: rgba(128, 32, 40, 0.05);
  --input-bg: rgba(255, 255, 255, 0.85);
  --bubble-mine: linear-gradient(135deg, #ffe9d6, #ffd9c2);
  --radius: 16px;            /* rounded-2xl */
  --shadow: 0 6px 20px rgba(128, 32, 40, 0.10);
  --shadow-pop: 0 10px 28px rgba(128, 32, 40, 0.16);
  --glass: blur(12px) saturate(1.4);
  --font-title: "ZCOOL KuaiLe", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-body: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color-scheme: light;
}

[data-theme="dark"] {
  --primary: #802028;
  --primary-dark: #5e161e;
  --primary-light: rgba(128, 32, 40, 0.4);
  --primary-text: #f08371; /* 深色下正文里的浅珊瑚红 */
  --link: #f08371;
  --accent: #f0543a;
  --accent-dark: #c93a24;
  --gold: #ffb020;
  --bg: #161013;
  --bg-glow-1: rgba(128, 32, 40, 0.5);
  --bg-glow-2: rgba(240, 84, 58, 0.18);
  --card: rgba(255, 255, 255, 0.06);
  --card-solid: #221819;
  --card-border: rgba(255, 255, 255, 0.12);
  --modal-bg: rgba(32, 22, 24, 0.88);
  --text: #f2e9e9;
  --muted: #a89a9c;
  --border: rgba(255, 255, 255, 0.12);
  --hover-bg: rgba(255, 255, 255, 0.06);
  --input-bg: rgba(255, 255, 255, 0.07);
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  --shadow-pop: 0 10px 28px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background:
    radial-gradient(480px 480px at -80px -80px, var(--bg-glow-1), transparent 70%),
    radial-gradient(480px 480px at 105% 30%, var(--bg-glow-2), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
::selection { background: rgba(240, 84, 58, 0.3); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; width: 100%; }
main.wrap { flex: 1; padding-top: 22px; padding-bottom: 44px; }

/* 标题字体：圆润 */
h1, h2, .brand-text strong, .hero h1, .section-title,
.auth-card h2, .error-page h1, .ui-modal-title, .game-card h3 {
  font-family: var(--font-title);
  font-weight: 400;
  letter-spacing: 2px;
}

/* ---- 入场动画 ---- */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(16px) scale(.995); }
  to { opacity: 1; transform: none; }
}
main.wrap > .card { animation: rise-in .45s cubic-bezier(.2,.8,.3,1.1) both; }
main.wrap > .card:nth-of-type(2) { animation-delay: .07s; }
main.wrap > .card:nth-of-type(3) { animation-delay: .14s; }
main.wrap > .card:nth-of-type(n+4) { animation-delay: .2s; }
/* 首页 Bento 三栏错峰入场 */
.bento-stack > .card, .game-hall-card { animation: rise-in .45s cubic-bezier(.2,.8,.3,1.1) both; }
.bento-center .bento-stack > .card { animation-delay: .08s; }
.bento-right .bento-stack > .card { animation-delay: .16s; }
/* 主题切换平滑过渡（轻量化已取消，不再为省资源牺牲动画） */
body, .site-header, .card { transition: background-color .35s ease, color .35s ease, border-color .35s ease; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- 顶栏（demo 式浅色毛玻璃顶栏） ---- */
.site-header {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  position: sticky; top: 0; z-index: 100;
}
[data-theme="dark"] .site-header { background: rgba(15, 23, 42, 0.75); }
.header-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 16px; height: 64px;
  display: flex; align-items: center; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
/* 校徽金色横版放在深枣红小底座上，浅色顶栏里也能看清 */
.brand-banner { height: 34px; width: auto; display: block;
  background: linear-gradient(135deg, #5e161e, #802028);
  border-radius: 10px; padding: 5px 10px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-text strong { font-size: 19px; letter-spacing: 1px;
  background: linear-gradient(90deg, #802028, #c93a24);
  -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap; }
[data-theme="dark"] .brand-text strong { background: linear-gradient(90deg, #f08371, #ff8a70);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-text small { font-size: 11px; color: var(--muted); }
.main-nav { display: flex; gap: 4px; margin-left: 8px; }
.main-nav a {
  color: var(--muted); padding: 8px 14px; border-radius: 12px; font-size: 14px; font-weight: 500;
  transition: background .15s, color .15s;
}
.main-nav a:hover { background: var(--hover-bg); text-decoration: none; color: var(--text); }
.main-nav a.active { background: var(--grad); color: #fff; box-shadow: 0 4px 14px rgba(128, 32, 40, 0.35); }
.main-nav a.nav-admin { color: var(--primary-text); }
.user-box { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.username { color: var(--text); font-size: 14px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-toggle { display: none; background: var(--hover-bg); border: none; color: var(--text); border-radius: 12px; font-size: 18px; padding: 6px 10px; cursor: pointer; }
/* 顶栏搜索框 */
.top-search { flex: 1; max-width: 420px; position: relative; }
.top-search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--muted); pointer-events: none; }
.top-search input {
  width: 100%; padding: 9px 16px 9px 38px; border-radius: 16px; font-size: 14px; font-family: inherit;
  background: rgba(128, 32, 40, 0.04); border: 1px solid var(--border); color: var(--text); outline: none;
  transition: border-color .15s, background .15s;
}
.top-search input:focus { border-color: rgba(240, 84, 58, 0.5); background: var(--card-solid); }
[data-theme="dark"] .top-search input { background: rgba(255, 255, 255, 0.07); }
/* 主题切换按钮（demo 式 slate 小方块） */
.theme-toggle {
  background: var(--hover-bg); color: var(--muted); border: none;
  border-radius: 12px; font-size: 16px; padding: 8px 11px; cursor: pointer; line-height: 1;
  transition: background .15s, transform .15s;
}
.theme-toggle:hover { background: var(--border); transform: scale(1.06); }

/* ---- 头像 ---- */
.avatar {
  --hue: 210;
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, hsl(var(--hue), 60%, 52%), hsl(var(--hue), 60%, 40%));
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
.avatar.lg { width: 44px; height: 44px; font-size: 20px; }
.avatar-img {
  width: 32px; height: 32px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0; background: #ddd;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
.avatar-img.lg { width: 44px; height: 44px; }
.user-sign { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.4;
  word-break: break-all; }

/* ---- 等级徽章 / 信用点 ---- */
.level-badge {
  --lc: #6b7280;
  display: inline-block; font-size: 11px; font-weight: 700; color: #fff;
  background: var(--lc);
  border-radius: 999px; padding: 2px 10px; white-space: nowrap;
  box-shadow: 0 2px 0 rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.25);
}
.level-badge.sm { font-size: 10px; padding: 0 8px; }
/* 信用点徽章（demo 式琥珀徽章，真实信用点） */
.credits-pill {
  font-size: 12px; font-weight: 700; color: #92600a; background: linear-gradient(180deg, #fff7dd, #fef0c2);
  border: 1px solid #fcd34d; border-radius: 999px; padding: 4px 12px; white-space: nowrap;
  box-shadow: 0 2px 0 rgba(146, 96, 10, .18);
}
.post-side .level-badge { margin-top: 4px; }

/* ---- 全服公告弹窗 ---- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: ui-fade .2s ease both;
}
.modal-card {
  background: var(--modal-bg); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
  border-radius: 20px; max-width: 480px; width: 100%;
  padding: 26px; box-shadow: var(--shadow-pop);
  animation: modal-pop 0.28s cubic-bezier(.2,.9,.3,1.25);
  border: 1px solid var(--card-border);
}
@keyframes modal-pop {
  from { transform: scale(.85) translateY(10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
.modal-head {
  font-size: 20px; color: var(--primary-text);
  margin-bottom: 12px; text-align: center;
  font-family: var(--font-title); letter-spacing: 2px;
}
.modal-body {
  font-size: 15px; line-height: 1.7; margin-bottom: 18px;
  max-height: 50vh; overflow-y: auto; word-break: break-word;
}

/* ---- 站内弹窗（ui.js） ---- */
.ui-modal-ov {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: ui-fade .18s ease;
}
@keyframes ui-fade { from { opacity: 0; } to { opacity: 1; } }
.ui-modal-card {
  background: var(--modal-bg); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
  border-radius: 20px; max-width: 400px; width: 100%;
  padding: 28px 26px 24px; text-align: center;
  box-shadow: var(--shadow-pop);
  border: 1px solid var(--card-border);
  animation: modal-pop .3s cubic-bezier(.2,.9,.3,1.3);
}
.ui-modal-icon { font-size: 44px; margin-bottom: 6px; animation: ui-bounce .5s ease; }
@keyframes ui-bounce { 0% { transform: scale(0); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
.ui-modal-title {
  font-size: 21px; color: var(--primary-text); margin-bottom: 8px;
  font-family: var(--font-title); letter-spacing: 3px;
}
.ui-modal-body { font-size: 15px; line-height: 1.7; color: var(--text); margin-bottom: 20px; word-break: break-word; }
.ui-modal-btns { display: flex; gap: 10px; justify-content: center; }
.ui-modal-btns .btn { flex: 1; max-width: 160px; }
/* 弹窗关闭动画：遮罩淡出 + 卡片缩小淡出 */
.ui-modal-ov.closing { animation: ui-fade-out .15s ease both; }
.ui-modal-ov.closing .ui-modal-card { animation: ui-pop-out .15s ease both; }
@keyframes ui-fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes ui-pop-out { from { transform: scale(1); opacity: 1; } to { transform: scale(.92) translateY(6px); opacity: 0; } }

/* ---- Toast ---- */
.ui-toast-box {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%);
  z-index: 1100; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none; width: max-content; max-width: 92vw;
}
.ui-toast {
  background: rgba(15, 23, 42, .94); color: #fff; font-size: 14px;
  padding: 11px 22px; border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,.3);
  opacity: 0; transform: translateY(14px) scale(.95);
  transition: opacity .3s, transform .3s cubic-bezier(.2,.9,.3,1.3);
  max-width: 92vw; word-break: break-word; text-align: center;
}
.ui-toast.show { opacity: 1; transform: none; }
.ui-toast-success { background: rgba(22, 120, 70, .95); }
.ui-toast-warning { background: rgba(170, 110, 10, .95); }
.ui-toast-danger { background: rgba(180, 40, 40, .95); }

/* ---- 按钮 / 表单 ---- */
.btn {
  display: inline-block; border: none; cursor: pointer;
  border-radius: 12px;
  padding: 10px 20px; font-size: 14px; text-align: center; font-weight: 600;
  color: #fff;
  background: var(--grad);
  box-shadow: 0 4px 14px rgba(128, 32, 40, .35);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
  user-select: none;
}
.btn:hover { text-decoration: none; filter: brightness(1.07); transform: scale(1.03); }
.btn:active { transform: scale(.97); }
.btn-primary { /* 基类 .btn 本身就是主按钮样式，此处为语义别名 */ }
.btn-accent {
  background: linear-gradient(135deg, #ff7a54, #f0543a);
  box-shadow: 0 4px 14px rgba(240, 84, 58, .35);
}
.btn-ghost { background: var(--hover-bg); color: var(--muted); border: none; box-shadow: none; }
.btn-ghost:hover { background: var(--border); color: var(--text); box-shadow: none; }
.btn-ghost:active { box-shadow: none; }
.btn-ghost-danger { color: #dc2626; }
[data-theme="dark"] .btn-ghost-danger { color: #f87171; }
.btn-outline {
  background: var(--card-solid); color: var(--primary-text);
  border: 2px solid var(--primary); box-shadow: none;
}
.btn-outline:hover { box-shadow: 0 4px 14px rgba(128, 32, 40, .2); }
.btn-outline:active { box-shadow: none; }
.btn-danger {
  background: linear-gradient(135deg, #f05252, #dc2626);
  box-shadow: 0 4px 14px rgba(220, 38, 38, .35);
}
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: 10px; box-shadow: 0 3px 10px rgba(128, 32, 40, .3); }
.btn-block { display: block; width: 100%; }

/* Bento 卡片（通用） */
.card {
  background: var(--card); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; margin-bottom: 18px; border: 1px solid var(--card-border);
}
.card h2, .card h3 { margin-top: 0; }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.form-control {
  width: 100%; padding: 11px 16px; border: 2px solid var(--border); border-radius: 12px;
  font-size: 15px; font-family: inherit; background: var(--input-bg); color: var(--text);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.form-control:focus { outline: none; border-color: rgba(240, 84, 58, .5); background: var(--card-solid); box-shadow: 0 0 0 4px rgba(240, 84, 58, .15); }
textarea.form-control { resize: vertical; min-height: 120px; border-radius: 12px; }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
select.form-control, select.input { border-radius: 12px; }
.input {
  padding: 10px 16px; border: 2px solid var(--border); border-radius: 12px;
  font-size: 14px; font-family: inherit; background: var(--input-bg); color: var(--text);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.input:focus { outline: none; border-color: rgba(240, 84, 58, .5); background: var(--card-solid); box-shadow: 0 0 0 4px rgba(240, 84, 58, .15); }

.flashes { margin-bottom: 16px; }
.flash { padding: 12px 18px; border-radius: 12px; margin-bottom: 8px; font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow); animation: rise-in .3s ease both; }
.flash-success { background: #e7fbe9; color: #166534; border: 2px solid #86efac; }
.flash-danger { background: #ffe9e9; color: #991b1b; border: 2px solid #fca5a5; }
.flash-warning { background: #fff6dd; color: #92400e; border: 2px solid #fcd34d; }
.flash-info { background: #e3efff; color: #1e40af; border: 2px solid #93c5fd; }
[data-theme="dark"] .flash-success { background: rgba(22, 101, 52, 0.3); color: #86efac; border-color: rgba(134, 239, 172, 0.35); }
[data-theme="dark"] .flash-danger { background: rgba(153, 27, 27, 0.3); color: #fca5a5; border-color: rgba(252, 165, 165, 0.35); }
[data-theme="dark"] .flash-warning { background: rgba(146, 96, 10, 0.3); color: #fcd34d; border-color: rgba(252, 211, 77, 0.35); }
[data-theme="dark"] .flash-info { background: rgba(30, 64, 175, 0.3); color: #93c5fd; border-color: rgba(147, 197, 253, 0.35); }

/* ---- 公告条 ---- */
.announce-bar { background: linear-gradient(90deg, #fff3d6, #ffe9b8); border-bottom: 2px solid #f5d78e; color: #8a5a00; font-size: 14px; }
.announce-bar .wrap { padding-top: 9px; padding-bottom: 9px; }
.announce-bar a { color: #8a5a00; font-weight: 600; }
[data-theme="dark"] .announce-bar { background: linear-gradient(90deg, rgba(146, 96, 10, 0.35), rgba(146, 96, 10, 0.22)); border-bottom-color: rgba(252, 211, 77, 0.3); color: #fcd34d; }
[data-theme="dark"] .announce-bar a { color: #fcd34d; }

/* ---- 首页 Bento ---- */
.hero {
  background: var(--grad-3);
  border-radius: 20px; color: #fff; padding: 38px 30px; margin-bottom: 22px;
  display: flex; align-items: center; gap: 26px; box-shadow: var(--shadow-pop);
  position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,.25);
}
.hero-logo { width: 96px; height: 96px; border-radius: 50%; object-fit: contain; flex-shrink: 0;
  background: #fff; padding: 6px; box-shadow: 0 6px 0 rgba(0,0,0,.18); animation: ui-bounce 1s ease; }
.hero h1 { margin: 0 0 6px; font-size: 30px; letter-spacing: 4px; text-shadow: 0 3px 0 rgba(0,0,0,.2); }
.hero p { margin: 0; opacity: .88; font-size: 14px; }
.hero .motto { margin-top: 10px; font-size: 16px; letter-spacing: 8px; color: #ffd978; text-shadow: 0 2px 0 rgba(0,0,0,.2); }

/* Bento 三栏布局 */
.bento-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; align-items: start; }
.bento-left { grid-column: span 3; }
.bento-center { grid-column: span 5; }
.bento-right { grid-column: span 4; }
.bento-stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.bento-stack > .card { margin-bottom: 0; }
@media (max-width: 1024px) {
  .bento-left, .bento-center, .bento-right { grid-column: span 12; }
}
/* 左侧导航 */
.bento-nav { padding: 12px; }
.bento-nav-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-radius: 12px; font-size: 14px; font-weight: 500;
  color: var(--muted); transition: background .15s, color .15s;
}
.bento-nav-item:hover { background: var(--hover-bg); color: var(--text); text-decoration: none; }
.bento-nav-item.active { background: var(--grad); color: #fff; box-shadow: 0 4px 14px rgba(128, 32, 40, 0.35); }
/* 游戏大厅渐变卡 */
.game-hall-card {
  background: var(--grad-3); color: #fff; border-radius: var(--radius); padding: 16px;
  position: relative; overflow: hidden; box-shadow: 0 12px 32px rgba(128, 32, 40, 0.25);
}
.game-hall-card h3 { margin: 8px 0 4px; font-size: 16px; color: #fff; }
.game-hall-card p { margin: 0 0 12px; font-size: 12px; color: rgba(255,255,255,.8); }
.tag-pill { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 1px;
  background: rgba(255,255,255,.2); padding: 3px 10px; border-radius: 999px; }
.game-hall-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.game-hall-btns a { text-align: center; padding: 8px 6px; border-radius: 12px; font-size: 12px; font-weight: 700; }
.game-hall-btns a:hover { text-decoration: none; }
.game-hall-btns .gh-primary { background: #fff; color: #802028; }
.game-hall-btns .gh-secondary { background: rgba(0,0,0,.25); color: #fff; }
/* 帖子卡片 */
.post-card { padding: 20px; }
.post-card:hover { border-color: rgba(240, 84, 58, 0.3); }
.post-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.post-author { display: flex; align-items: center; gap: 10px; min-width: 0; }
.post-author-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.post-author-meta b { font-size: 14px; }
.post-author-meta .post-time { font-size: 11px; color: var(--muted); }
.tag-chip { font-size: 12px; padding: 4px 10px; border-radius: 12px; font-weight: 600;
  background: var(--primary-light); color: var(--primary-text); border: 1px solid var(--border); white-space: nowrap; }
.post-card h2 { margin: 0 0 6px; font-size: 16px; line-height: 1.5; }
.post-card h2 a { color: var(--text); }
.post-card h2 a:hover { color: var(--primary-text); }
.post-excerpt { font-size: 13px; color: var(--muted); line-height: 1.7; margin: 0 0 12px; word-break: break-word; }
.post-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 10px;
  border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.post-acts { display: flex; gap: 16px; }
.post-act { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); background: none; border: none; cursor: pointer; font-size: 12px; padding: 0; }
.post-act:hover { color: var(--primary-text); }
.post-act.liked { color: var(--accent); font-weight: 700; }
/* 迷你标题 / 排行行 / 统计行 */
.mini-label { font-size: 11px; font-weight: 700; letter-spacing: 2px; color: var(--muted); margin: 0 0 12px; }
.rank-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; font-size: 13px; gap: 8px; }
.rank-row + .rank-row { border-top: 1px dashed var(--border); }
.rank-row .rank-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row .rank-num { color: var(--primary-text); font-weight: 700; white-space: nowrap; }
.stat-row { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; font-size: 13px; }
.stat-row + .stat-row { border-top: 1px dashed var(--border); }
.stat-row b { color: var(--primary-text); }
.room-link-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; }
.room-link-row + .room-link-row { border-top: 1px dashed var(--border); }
.room-link-row b { font-size: 14px; }
.room-link-row p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
/* 快捷发帖 */
.quick-post-form { display: flex; gap: 8px; flex-wrap: wrap; }
.quick-post-form select { flex: 0 0 130px; }
.quick-post-form input[type="text"] { flex: 1; min-width: 180px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.section-title { font-size: 20px; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; color: var(--text); }
.section-title::before { content: ""; width: 6px; height: 22px; background: linear-gradient(180deg, var(--gold), var(--accent)); border-radius: 4px; }

.thread-row {
  display: flex; gap: 12px; padding: 13px 10px; border-radius: 14px; align-items: flex-start;
  transition: background .15s, transform .15s;
}
.thread-row:hover { background: var(--hover-bg); transform: translateX(3px); }
.thread-row + .thread-row { border-top: 1px dashed var(--border); }
.thread-main { flex: 1; min-width: 0; }
.thread-title { font-size: 15px; font-weight: 600; color: var(--text); display: block; }
.thread-title:hover { color: var(--primary-text); }
.thread-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.badge { display: inline-block; font-size: 11px; padding: 2px 10px; border-radius: 999px; font-weight: 700; margin-right: 6px; vertical-align: 1px; }
.badge-pin { background: var(--grad); color: #fff; box-shadow: 0 2px 8px rgba(128, 32, 40, .35); }
.badge-lock { background: #9aa0aa; color: #fff; }
.badge-board { background: var(--primary-light); color: var(--primary-text); border: 1px solid var(--border); }
.stat-num { font-size: 13px; color: var(--muted); text-align: right; white-space: nowrap; }
.stat-num b { color: var(--primary-text); font-size: 17px; font-family: var(--font-title); }

.board-row { display: flex; align-items: center; gap: 14px; padding: 14px 10px; border-radius: 14px; transition: background .15s, transform .15s; }
.board-row:hover { background: var(--hover-bg); transform: translateX(3px); }
.board-row + .board-row { border-top: 1px dashed var(--border); }
.board-icon { font-size: 30px; filter: drop-shadow(0 3px 3px rgba(0,0,0,.12)); transition: transform .2s; }
.board-row:hover .board-icon { transform: scale(1.18) rotate(-6deg); }
.board-info { flex: 1; }
.board-info a { font-size: 16px; font-weight: 700; color: var(--text); font-family: var(--font-title); letter-spacing: 1px; }
.board-info a:hover { color: var(--primary-text); }
.board-info p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }

.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat-card { background: var(--card); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
  border-radius: var(--radius); padding: 18px; text-align: center; box-shadow: var(--shadow); border: 1px solid var(--card-border);
  transition: transform .18s; }
.stat-card:hover { transform: translateY(-4px) rotate(-1deg); }
.stat-card b { display: block; font-size: 26px; color: var(--primary-text); font-family: var(--font-title); }
.stat-card span { font-size: 12px; color: var(--muted); }

.quick-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.quick-link {
  background: var(--card); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--card-border); border-radius: var(--radius);
  padding: 22px 12px; text-align: center; box-shadow: var(--shadow);
  transition: transform .18s cubic-bezier(.2,.8,.3,1.2), box-shadow .18s;
}
.quick-link:hover { text-decoration: none; transform: translateY(-5px) scale(1.02); box-shadow: var(--shadow-pop); }
.quick-link .ql-icon { font-size: 38px; display: block; margin-bottom: 8px; transition: transform .2s; }
.quick-link:hover .ql-icon { transform: scale(1.2) rotate(-8deg); }
.quick-link b { color: var(--text); font-size: 15px; display: block; font-family: var(--font-title); letter-spacing: 2px; }
.quick-link small { color: var(--muted); font-size: 12px; }

/* ---- 帖子页 ---- */
.thread-head { border-bottom: 2px dashed var(--border); padding-bottom: 14px; margin-bottom: 6px; }
.thread-head h1 { font-size: 24px; margin: 0 0 8px; color: var(--primary-text); }
.post-row { display: flex; gap: 14px; padding: 18px 6px; }
.post-row + .post-row { border-top: 1px dashed var(--border); }
.post-side { width: 64px; text-align: center; flex-shrink: 0; }
.post-side .username { display: block; font-size: 12px; margin-top: 6px; word-break: break-all; }
.post-body { flex: 1; min-width: 0; }
.post-meta { font-size: 12px; color: var(--muted); margin-bottom: 8px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.post-content { font-size: 15px; word-break: break-word; }
.post-actions { margin-top: 10px; display: flex; gap: 8px; }
.like-btn { background: var(--primary-light); color: var(--primary-text); border: 2px solid var(--border); border-radius: 999px; padding: 6px 16px; font-size: 13px; cursor: pointer; font-weight: 700;
  transition: transform .12s, box-shadow .12s; font-family: var(--font-title); letter-spacing: 1px; }
.like-btn:hover { transform: translateY(-2px); }
.like-btn:active { transform: translateY(2px); }
.like-btn.liked { background: linear-gradient(180deg, #ff7a54, var(--accent)); color: #fff; border-color: var(--accent-dark); }
.floor-tag { background: var(--hover-bg); color: var(--muted); font-size: 11px; padding: 3px 10px; border-radius: 999px; font-weight: 700; }

.pagination { display: flex; gap: 8px; justify-content: center; margin: 20px 0; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--border); border-radius: 999px; background: var(--card-solid); color: var(--text); font-size: 14px; padding: 0 12px;
  font-weight: 700; transition: transform .12s;
}
.pagination a:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-2px); }
.pagination .current { background: var(--grad); color: #fff; border-color: transparent;
  box-shadow: 0 3px 10px rgba(128, 32, 40, .35); }

/* ---- 聊天室 ---- */
.chat-layout { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: start; }
.room-list { display: flex; flex-direction: column; gap: 8px; }
.room-item { padding: 12px 14px; border-radius: 16px; border: 1px solid var(--card-border); background: var(--card); cursor: pointer;
  backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
  transition: transform .15s, box-shadow .15s; box-shadow: var(--shadow); }
.room-item:hover { border-color: var(--accent); transform: translateY(-2px); }
.room-item.active { background: var(--grad); color: #fff; border-color: transparent;
  box-shadow: 0 4px 14px rgba(128, 32, 40, .35); }
.room-item.active small { color: rgba(255,255,255,.85); }
.room-item b { display: block; font-size: 14px; font-family: var(--font-title); letter-spacing: 1px; }
.room-item small { font-size: 12px; color: var(--muted); }
.chat-box { display: flex; flex-direction: column; height: 560px; }
.chat-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 2px dashed var(--border); padding-bottom: 12px; margin-bottom: 0; }
.chat-head h3 { margin: 0; font-size: 17px; font-family: var(--font-title); letter-spacing: 2px; color: var(--primary-text); }
.online-count { font-size: 12px; color: #8a5a00; background: #fff3e2; border: 1px solid #f5d78e; padding: 4px 12px; border-radius: 999px; font-weight: 700; }
.chat-messages { flex: 1; overflow-y: auto; padding: 12px 4px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { display: flex; gap: 8px; align-items: flex-start; animation: rise-in .25s ease both; }
.chat-msg .avatar { width: 28px; height: 28px; font-size: 13px; }
.chat-msg .avatar-img { width: 28px; height: 28px; }
.chat-bubble { background: var(--card-solid); border: 1px solid var(--border); border-radius: 6px 18px 18px 18px; padding: 9px 14px; max-width: 75%; font-size: 14px; word-break: break-word;
  box-shadow: 0 3px 8px rgba(0,0,0,.06); }
.chat-bubble .cm-user { font-size: 12px; color: var(--primary-text); font-weight: 700; display: block; margin-bottom: 2px; }
.chat-bubble .cm-time { font-size: 10px; color: var(--muted); margin-left: 6px; font-weight: 400; }
.chat-msg.mine { flex-direction: row-reverse; }
.chat-msg.mine .chat-bubble { background: var(--bubble-mine); color: #fff; border-color: transparent; border-radius: 18px 6px 18px 18px; }
.chat-input-row { display: flex; gap: 8px; padding-top: 12px; border-top: 2px dashed var(--border); }
.chat-input-row input { flex: 1; }
.admin-tag { background: var(--grad); color: #fff; font-size: 10px; padding: 2px 8px; border-radius: 999px; margin-left: 4px; font-weight: 700; }

/* ---- 游戏 ---- */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.game-card { background: var(--card); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--card-border); border-radius: 20px; padding: 24px; text-align: center; box-shadow: var(--shadow);
  transition: transform .2s cubic-bezier(.2,.8,.3,1.25), box-shadow .2s; position: relative; overflow: hidden; }
.game-card::before { content: ""; position: absolute; top: -30px; right: -30px; width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle, rgba(240,84,58,.14), transparent 70%); }
.game-card:hover { transform: translateY(-6px) scale(1.02); box-shadow: var(--shadow-pop); }
.game-card .g-icon { font-size: 52px; display: inline-block; transition: transform .25s; filter: drop-shadow(0 4px 6px rgba(0,0,0,.15)); }
.game-card:hover .g-icon { transform: scale(1.18) rotate(-8deg); }
.game-card h3 { margin: 12px 0 6px; color: var(--primary-text); font-size: 20px; }
.game-card p { font-size: 13px; color: var(--muted); margin: 0 0 14px; min-height: 40px; }
.game-card .my-best { font-size: 12px; color: var(--accent); font-weight: 700; }
.leaderboard { list-style: none; margin: 0; padding: 0; }
.leaderboard li { display: flex; align-items: center; gap: 10px; padding: 9px 6px; font-size: 14px; border-radius: 12px; transition: background .15s; }
.leaderboard li:hover { background: var(--hover-bg); }
.leaderboard li + li { border-top: 1px dashed var(--border); }
.rank { width: 28px; height: 28px; border-radius: 50%; background: var(--hover-bg); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.08); }
.rank.r1 { background: linear-gradient(180deg, #ffd35e, #f5a623); color: #fff; }
.rank.r2 { background: linear-gradient(180deg, #e5e7eb, #c3c9d1); color: #fff; }
.rank.r3 { background: linear-gradient(180deg, #f0a35e, #d97706); color: #fff; }
.lb-score { margin-left: auto; font-weight: 700; color: var(--primary-text); font-family: var(--font-title); font-size: 16px; }
.game-play-wrap { display: grid; grid-template-columns: 1fr 280px; gap: 16px; align-items: start; }
.game-stage { text-align: center; }
.game-canvas { border: 3px solid var(--primary); border-radius: 18px; background: #fafafa; touch-action: none; max-width: 100%;
  box-shadow: var(--shadow-pop); }
.game-controls { margin-top: 12px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.score-line { font-size: 16px; margin: 10px 0; font-family: var(--font-title); letter-spacing: 1px; }
.score-line b { color: var(--accent); font-size: 24px; }

/* 2048 */
.tfe-anim { position: relative; background: #bbada0; border-radius: 18px; padding: 8px;
  width: 320px; max-width: 92vw; aspect-ratio: 1; margin: 0 auto; touch-action: none;
  box-shadow: var(--shadow-pop); }
.tfe-gridbg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; height: 100%; }
.tfe-bgcell { background: #cdc1b4; border-radius: 10px; }
.tile { position: absolute; left: 0; top: 0; transition: transform 110ms ease-in-out; will-change: transform; }
.tile-inner { width: 100%; height: 100%; border-radius: 10px; display: flex; align-items: center;
  justify-content: center; font-size: 24px; font-weight: 700; color: #776e65; background: #eee4da;
  font-family: var(--font-title); box-shadow: inset 0 -4px 0 rgba(0,0,0,.06); }
.tile-inner.pop { animation: tfe-pop 160ms ease; }
@keyframes tfe-pop { 0% { transform: scale(0); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
.tile-inner.n2 { background: #eee4da; } .tile-inner.n4 { background: #ede0c8; }
.tile-inner.n8 { background: #f2b179; color: #fff; } .tile-inner.n16 { background: #f59563; color: #fff; }
.tile-inner.n32 { background: #f67c5f; color: #fff; } .tile-inner.n64 { background: #f65e3b; color: #fff; }
.tile-inner.n128 { background: #edcf72; color: #fff; font-size: 20px; } .tile-inner.n256 { background: #edcc61; color: #fff; font-size: 20px; }
.tile-inner.n512 { background: #edc850; color: #fff; font-size: 20px; } .tile-inner.n1024 { background: #edc53f; color: #fff; font-size: 18px; }
.tile-inner.n2048 { background: #edc22e; color: #fff; font-size: 18px; } .tile-inner.nbig { background: #3c3a32; color: #fff; font-size: 16px; }

/* ---- 页脚 ---- */
.site-footer { background: linear-gradient(180deg, var(--primary-dark), #421016); color: rgba(255,255,255,.85); margin-top: auto;
  border-top-left-radius: 26px; border-top-right-radius: 26px; }
.site-footer .wrap { padding-top: 26px; padding-bottom: 26px; text-align: center; font-size: 13px; }
.site-footer p { margin: 6px 0; }
.site-footer .disclaimer { font-size: 12px; opacity: .7; }
.site-footer .copyright { font-size: 12px; opacity: .6; }

/* ---- 认证页 ---- */
.auth-wrap { max-width: 430px; margin: 30px auto; }
.auth-card { background: var(--card); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
  border-radius: 20px; box-shadow: var(--shadow-pop); padding: 36px 30px;
  border: 1px solid var(--card-border); animation: rise-in .5s cubic-bezier(.2,.8,.3,1.15) both; }
.auth-card h2 { text-align: center; margin: 0 0 6px; color: var(--primary-text); font-size: 26px; }
.auth-card .sub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.auth-logo { display: block; width: 76px; height: 76px; margin: 0 auto 12px; border-radius: 50%; border: 3px solid var(--primary-light); object-fit: contain;
  background: #fff; box-shadow: 0 4px 0 rgba(128,32,40,.15); animation: ui-bounce .7s ease; }

/* ---- 搜索 ---- */
.search-row { display: flex; gap: 8px; margin-bottom: 16px; }
.search-row input { flex: 1; }

/* ---- 错误页 ---- */
.error-page { text-align: center; padding: 60px 20px; animation: rise-in .4s ease both; }
.error-page h1 { font-size: 72px; margin: 0; color: var(--primary-text); text-shadow: 0 4px 0 rgba(128,32,40,.15); }
.error-page p { color: var(--muted); }

/* ---- 房间行（各游戏大厅） ---- */
.room-row { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; border-radius: 16px; border: 1px solid var(--card-border); background: var(--card);
  backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
  margin-bottom: 8px; transition: transform .15s, box-shadow .15s; }
.room-row:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: rgba(240, 84, 58, 0.45); }

/* ---- 响应式 ---- */
@media (max-width: 1024px) {
  .top-search { display: none; }
}
@media (max-width: 860px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .quick-links { grid-template-columns: repeat(3, 1fr); }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--card-solid); flex-direction: column; padding: 10px; margin: 8px;
    border-radius: 18px; box-shadow: var(--shadow-pop); border: 1px solid var(--card-border);
  }
  .main-nav.open { display: flex; animation: rise-in .25s ease both; }
  .site-header { position: sticky; }
  .header-inner { position: relative; height: 60px; }
  .nav-toggle { display: block; }
  .username { display: none; }
  .brand-text strong { font-size: 16px; letter-spacing: 1px; }
  .brand-text small { display: none; }
  .brand-banner { height: 30px; }
  .credits-pill { display: none; }
  .chat-layout { grid-template-columns: 1fr; }
  .room-list { flex-direction: row; overflow-x: auto; }
  .room-item { white-space: nowrap; }
  .chat-box { height: 480px; }
  .game-play-wrap { grid-template-columns: 1fr; }
  .hero { padding: 26px 20px; }
  .hero h1 { font-size: 23px; }
  .hero-logo { width: 72px; height: 72px; }
  .post-side { width: 48px; }
  .quick-post-form select { flex: 1 1 100%; }
}

/* ---------- 日麻 ---------- */
.mj-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.mj-title { margin: 0; }
.mj-panel { margin-top: 12px; }
.mj-game-panel { display: none; }
.mj-hint { color: var(--muted); font-size: 13px; margin-left: 8px; }
.mj-muted { color: var(--muted); }
.mj-watchers { font-size: 13px; color: var(--muted); }
.mj-round-title { font-size: 15px; font-weight: 700; }
.mj-round-sub { font-size: 12px; color: var(--muted); }
.mj-wait { color: var(--muted); font-size: 13px; }
.mj-seats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 12px; }
.mj-seat { border: 1px solid var(--card-border); border-radius: 16px; padding: 12px; text-align: center; background: var(--card); }
.mj-seat-empty { color: var(--muted); padding: 6px 0; }
.mj-seat-btns { margin-top: 6px; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.mj-table { background: linear-gradient(135deg, #1e6b4a, #155a3d); border-radius: 20px; padding: 14px;
  box-shadow: var(--shadow-pop); border: 3px solid rgba(255,255,255,.2); }
.mj-top { text-align: center; margin-bottom: 6px; }
.mj-mid { display: flex; justify-content: space-between; align-items: stretch; gap: 8px; }
.mj-side { flex: 1; min-width: 0; }
.mj-center { flex: 1.2; display: flex; align-items: center; justify-content: center; }
.mj-center-box { background: rgba(0,0,0,.25); color: #fff; border-radius: 12px; padding: 10px 14px; text-align: center; font-size: 13px; line-height: 1.9; }
.mj-bottom { margin-top: 8px; }
.mj-pinfo { color: #fff; font-size: 13px; margin-bottom: 4px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mj-pinfo .mj-wind { background: rgba(0,0,0,.35); border-radius: 8px; padding: 2px 9px; font-weight: 700; }
.mj-pinfo .mj-score { color: #ffe9a8; font-weight: 700; }
.mj-pinfo strong { color: #fff; }
.mj-river { display: flex; flex-wrap: wrap; align-items: center; min-height: 34px; background: rgba(0,0,0,.15); border-radius: 10px; padding: 4px; margin-bottom: 4px; }
.mj-hand { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; background: rgba(0,0,0,.15); border-radius: 10px; padding: 6px 4px; margin: 6px 0; }
.mj-meldsrow { min-height: 4px; margin-bottom: 2px; }
.mj-meld { display: inline-flex; margin: 0 8px 2px 0; }
.mj-opp-hand { margin: 2px 0; }
.mjtile { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 42px;
  background: #f8f6f0; border: 1px solid #b9b2a4; border-bottom: 3px solid #a89f8d; border-radius: 6px;
  font-size: 13px; font-weight: 700; color: #2b2b2b; margin: 1px; vertical-align: middle; line-height: 1.15; text-align: center;
  transition: transform .1s; }
.mjtile.sm { width: 21px; height: 29px; font-size: 9px; border-bottom-width: 2px; }
.mjtile.back { background: #0f4d33; border-color: #0b3d28; border-bottom-color: #082e1f; width: 16px; height: 24px; }
.mjtile.red { color: #d23434; }
.mjtile.playable { cursor: pointer; }
.mjtile.playable:hover { transform: translateY(-7px) scale(1.05); border-color: var(--accent); }
.mjtile.drawn { margin-left: 12px; }
.mjtile.sm.rq { transform: rotate(90deg); margin: 0 6px; border-color: #d23434; }
.mj-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; min-height: 10px; margin-top: 6px; }
.mj-callbox { display: inline-flex; gap: 6px; align-items: center; background: rgba(0,0,0,.3);
  color: #fff; border-radius: 12px; padding: 6px 12px; font-size: 13px; }
.mj-log { font-size: 12px; color: var(--muted); max-height: 110px; overflow-y: auto; }
.mj-result { background: var(--card); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--card-border); border-radius: 16px; padding: 14px; margin-top: 10px; }
.mj-result h3 { margin: 0 0 8px; font-family: var(--font-title); letter-spacing: 2px; color: var(--primary-text); }
.mj-winrow { background: rgba(255, 215, 0, .12); }
.mj-detail { font-size: 12px; white-space: pre-wrap; color: var(--muted); max-height: 120px; overflow-y: auto; }
@media (max-width: 640px) {
  .mjtile { width: 26px; height: 37px; font-size: 11px; }
  .mj-mid { flex-direction: column; }
}

/* ---- 用户主页与个人资料 ---- */
a.user-link { color: inherit; text-decoration: none; }
a.user-link:hover { color: var(--link); text-decoration: underline; }
.user-home-top { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.user-home-info { flex: 1; min-width: 220px; }
.user-home-name { font-size: 20px; font-weight: 800; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.user-home-class { color: var(--muted); font-size: 14px; margin-top: 4px; }
.user-home-bio { font-size: 14px; line-height: 1.7; margin-top: 8px; white-space: pre-wrap; word-break: break-word; }
.user-home-meta { font-size: 13px; color: var(--muted); margin-top: 8px; }
.xp-track { height: 10px; background: var(--hover-bg); border-radius: 5px; overflow: hidden; margin-top: 10px; }
.xp-bar { height: 100%; background: linear-gradient(90deg, var(--accent), var(--primary)); transition: width .5s ease; }
.xp-label { font-size: 12px; color: var(--muted); margin-top: 4px; }
.user-thread-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--border); }
.user-thread-row:last-child { border-bottom: none; }
.user-thread-row a.thread-title { font-weight: 600; }
.user-thread-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.profile-narrow { max-width: 560px; margin: 0 auto; }
.profile-head { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.profile-name { font-weight: 700; font-size: 16px; }
.profile-meta { font-size: 12px; color: var(--muted); }
.profile-stats { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.profile-form { margin-top: 16px; }
.profile-field { margin-bottom: 14px; }
.profile-label { font-size: 14px; font-weight: 700; }
.profile-hint { font-size: 12px; color: var(--muted); margin: 4px 0 8px; }
.profile-check { font-size: 13px; display: block; margin-top: 8px; }

/* ---- 右上角头像悬停弹窗 ---- */
.user-dropdown { position: relative; }
.user-dropdown-trigger { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; cursor: pointer; color: inherit; padding: 0; font: inherit; }
.user-dropdown-panel { display: none; position: absolute; right: 0; top: 100%; padding-top: 10px; z-index: 300; }
.user-dropdown:hover .user-dropdown-panel,
.user-dropdown:focus-within .user-dropdown-panel,
.user-dropdown.open .user-dropdown-panel { display: block; }
.user-dropdown-card { width: 260px; background: var(--modal-bg); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); border: 1px solid var(--card-border); border-radius: 16px; box-shadow: var(--shadow-pop); padding: 16px; animation: dropdown-in .18s cubic-bezier(.2,.8,.3,1.2) both; }
@keyframes dropdown-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.user-dropdown-head { display: flex; gap: 12px; align-items: center; }
.user-dropdown-name { font-weight: 800; font-size: 16px; }
.user-dropdown-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.user-dropdown-sign { font-size: 13px; color: var(--muted); margin-top: 10px; line-height: 1.6; word-break: break-word; }
.user-dropdown-links { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.user-dropdown-links a { padding: 8px 10px; border-radius: 10px; font-size: 14px; color: var(--text); }
.user-dropdown-links a:hover { background: var(--hover-bg); text-decoration: none; }
.user-dropdown-links form { margin: 0; }
.user-dropdown-links .dropdown-link { width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: none; font: inherit; font-size: 14px; color: var(--text); cursor: pointer; text-align: left; }
.user-dropdown-links .dropdown-link:hover { background: var(--hover-bg); }

/* 发帖/回复配图 */
.post-img-preview { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.post-img-thumb { position: relative; width: 96px; height: 96px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); }
.post-img-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-img-remove { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-size: 14px; line-height: 1; }
.post-images { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.post-images img.post-img { max-width: 100%; max-height: 360px; border-radius: 12px; border: 1px solid var(--border); }
.file-input-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

/* 登录密码可见切换 */
.pw-wrap { position: relative; }
.pw-wrap .form-control { padding-right: 44px; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px; display: inline-flex; }
.pw-toggle:hover { color: var(--text); }
.signin-form-inline { display: inline; margin: 0; }

/* 线条图标：跟随文字颜色与大小，深浅模式自动适配 */
.ic { width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex: none; }
.game-card .g-icon svg { width: 52px; height: 52px; }
.board-icon svg { width: 30px; height: 30px; }
.ui-modal-icon svg { width: 44px; height: 44px; }
.top-search-icon svg { width: 14px; height: 14px; }
.rank-medal.r1 { color: #d4a017; }
.rank-medal.r2 { color: #8a94a6; }
.rank-medal.r3 { color: #b0713a; }
