/* 站点全局样式：暗色星空主题 + 玻璃拟态 + 霓虹点缀
   所有样式均为自定义，Element Plus 组件样式由本地 vendor 提供 */
:root {
  --bg: #080b18;
  --bg-soft: #0f1428;
  --panel: rgba(22, 28, 52, 0.72);
  --panel-border: rgba(170, 180, 255, 0.14);
  --text: #eef1ff;
  --muted: #9aa3c7;
  --pink: #ff5e8a;
  --purple: #8b7cff;
  --cyan: #49d6ff;
  --gold: #ffe08a;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  /* Element Plus 主色统一为粉紫星空，标签/链接/开关等控件不再显示默认蓝 */
  --el-color-primary: #ff5e8a;
  --el-color-primary-light-3: #ff8fae;
  --el-color-primary-light-5: #ffb2c8;
  --el-color-primary-light-7: #ffd5e0;
  --el-color-primary-light-9: #fff0f4;
  --el-color-primary-dark-2: #e64170;
  --el-text-color-primary: #eef1ff;
  --el-text-color-regular: #c3cae6;
  --el-border-color: rgba(170, 180, 255, 0.2);
  --el-border-color-light: rgba(170, 180, 255, 0.14);
  --el-fill-color-blank: transparent;
  --el-bg-color: #151a30;
  --el-bg-color-page: #0a0e1e;
}

/* 基础重置 */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
.muted { color: var(--muted); font-size: 13px; }
.spacer { flex: 1; }

/* 站点外框与顶部导航：Header 浮在页面上，与 Hero 共用背景，不再形成独立横条 */
.site-shell { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
/* 全站粒子背景：固定在最底层，内容层 z-index 更高 */
.global-particle-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
.site-main, .site-footer { position: relative; z-index: 1; }
.site-header {
  position: fixed; top: 14px; left: 0; right: 0; z-index: 100;
  width: max-content; max-width: calc(100% - 48px); margin: 0 auto;
  display: flex; align-items: center; gap: 18px;
  padding: 4px 0;
  background: transparent; border: 0; box-shadow: none;
  /* 空白区域让鼠标穿透，只有品牌和菜单本身可点击 */
  pointer-events: none;
}
.site-header > * { pointer-events: auto; }
.brand {
  display: flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px;
  font-weight: 700; font-size: 16px; letter-spacing: .5px; border-radius: 999px; transition: .25s;
}
.brand:hover { background: transparent; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 12px;
  background: linear-gradient(135deg, var(--pink), var(--purple)); box-shadow: 0 0 22px rgba(255,94,138,.45);
}
.brand-text { background: linear-gradient(90deg, #fff, #ffc8da); -webkit-background-clip: text; color: transparent; }
.nav {
  display: flex; gap: 4px; margin-left: 16px; padding: 0;
  border-radius: 999px; background: transparent;
}
.nav-link {
  position: relative; display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px;
  color: var(--muted); font-size: 14px; background: transparent;
  transition: color .25s, text-shadow .25s;
}
/* 菜单项只靠文字颜色和微光与背景融合，不再使用填充色块 */
.nav-link:hover { color: #fff; text-shadow: 0 0 14px rgba(255,255,255,.35); }
.nav-link.router-link-active { color: #ffd9e5; text-shadow: 0 0 16px rgba(255,94,138,.55); }
/* 当前页仅用底部小光点提示，避免背景块造成割裂 */
.nav-link.router-link-active::after {
  content: ''; position: absolute; left: 50%; bottom: 0; width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%; background: var(--pink); box-shadow: 0 0 10px var(--pink);
}
.nav-icon { color: var(--pink); font-size: 13px; }
/* 移动端菜单入口与抽屉：桌面端隐藏 */
.mobile-menu-btn {
  display: none; width: 34px; height: 34px; place-items: center; margin-left: auto;
  border: 1px solid rgba(255,255,255,.16); border-radius: 10px; cursor: pointer;
  background: rgba(22,28,52,.7); color: var(--text); font-size: 18px; line-height: 1;
}
.mobile-nav {
  position: absolute; top: 46px; right: 0; display: grid; gap: 4px; min-width: 160px; padding: 10px;
  background: rgba(18, 23, 45, 0.96); border: 1px solid var(--panel-border);
  border-radius: 14px; box-shadow: var(--shadow); backdrop-filter: blur(18px);
}
.mobile-nav-link {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  border-radius: 10px; color: var(--muted); font-size: 14px;
}
.mobile-nav-link.router-link-active { color: #ffd9e5; background: rgba(255,94,138,.12); }
.admin-entry {
  padding: 8px 15px; border-radius: 999px; font-size: 13px;
  border: 1px solid rgba(255,255,255,.18); color: #dfe4ff; transition: .25s;
}
.admin-entry:hover { border-color: var(--pink); color: #fff; box-shadow: 0 0 18px rgba(255,94,138,.35); }
.site-main { flex: 1; }
.site-footer {
  padding: 26px 5vw; text-align: center; color: var(--muted); font-size: 13px;
  border-top: 1px solid var(--panel-border);
}
.footer-dot { margin: 0 8px; }

/* 首页 Hero：全屏沉浸式入口；光晕直接画在背景上，避免元素被裁出硬边 */
.hero {
  position: relative; min-height: calc(100vh - 60px); overflow: hidden; display: flex; align-items: center; padding: 60px 6vw;
  background:
    radial-gradient(circle at 12% 18%, rgba(255,94,138,.14), transparent 42%),
    radial-gradient(circle at 88% 72%, rgba(139,124,255,.12), transparent 46%);
}
.particle-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
/* 旧的独立光晕元素会与 hero 裁切边界形成矩形硬边，已改用背景渐变替代 */
.hero-glow { display: none; }
.hero-inner { position: relative; z-index: 2; max-width: 660px; }
.hero-eyebrow, .section-kicker {
  margin: 0 0 14px; color: var(--pink); font-size: 12px; font-weight: 700; letter-spacing: 3px;
}
.hero-title {
  margin: 0; font-size: clamp(42px, 6vw, 78px); line-height: 1.12; font-weight: 800;
  background: linear-gradient(120deg, #fff 10%, #ffd1df 45%, #b7a8ff 80%);
  -webkit-background-clip: text; color: transparent;
  text-shadow: 0 8px 40px rgba(255,94,138,.18);
}
.hero-subtitle { margin: 22px 0 30px; color: #c3cae6; font-size: 17px; line-height: 1.8; max-width: 560px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 13px 26px; border-radius: 999px;
  font-weight: 600; font-size: 15px; transition: .25s;
}
.hero-btn.primary { background: linear-gradient(135deg, var(--pink), #ff8eaa); color: #fff; box-shadow: 0 12px 30px rgba(255,94,138,.35); }
.hero-btn.ghost { border: 1px solid rgba(255,255,255,.2); color: #fff; }
.hero-btn:hover { transform: translateY(-3px); box-shadow: 0 16px 38px rgba(255,94,138,.45); }
.hero-chips { display: flex; gap: 10px; margin-top: 34px; flex-wrap: wrap; }
.hero-chips span { padding: 6px 13px; border-radius: 999px; font-size: 12px; color: var(--muted); border: 1px solid var(--panel-border); }

/* 悬浮拍立得照片 */
.polaroid-stack { position: absolute; right: 6vw; top: 50%; transform: translateY(-50%); width: 340px; height: 380px; z-index: 1; }
.polaroid {
  position: absolute; width: 190px; padding: 10px 10px 32px; background: #f7f2ff; border-radius: 6px;
  box-shadow: 0 20px 50px rgba(0,0,0,.5); transform: rotate(-8deg); transition: .4s;
}
.polaroid img { width: 100%; height: 150px; object-fit: cover; border-radius: 3px; display: block; }
.polaroid span { display: block; text-align: center; color: #6b6480; font-size: 12px; margin-top: 10px; }
.polaroid:hover { transform: rotate(0deg) translateY(-10px) scale(1.05); z-index: 5; }
.polaroid.p0 { left: 0; top: 10px; }
.polaroid.p1 { left: 120px; top: 80px; transform: rotate(7deg); }
.polaroid.p2 { left: 40px; top: 190px; transform: rotate(-3deg); }
.scroll-hint { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); color: var(--muted); font-size: 12px; letter-spacing: 2px; }
.scroll-hint span { display: block; text-align: center; color: var(--pink); font-size: 20px; margin-top: 6px; }

/* 通用区块 */
.section { padding: 80px 6vw; }
.section-head { margin-bottom: 36px; }
.section-head h2 { margin: 0 0 8px; font-size: 34px; }
.section-head p:last-child { margin: 0; color: var(--muted); }
.section-more { display: inline-block; margin-top: 22px; color: var(--pink); font-size: 14px; }

/* 快捷入口卡片 */
.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; }
.quick-card {
  position: relative; overflow: hidden; min-height: 180px; padding: 24px;
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius);
  transition: .3s;
}
.quick-card::after {
  content: ''; position: absolute; inset: auto -30% -60% auto; width: 160px; height: 160px;
  background: var(--card-color); filter: blur(60px); opacity: .22; transition: .3s;
}
.quick-card:hover { transform: translateY(-8px); border-color: var(--card-color); box-shadow: 0 18px 40px rgba(0,0,0,.35); }
.quick-card:hover::after { opacity: .5; }
.quick-icon { font-size: 34px; margin-bottom: 16px; }
.quick-card h3 { margin: 0 0 8px; font-size: 20px; }
.quick-card p { margin: 0; color: var(--muted); font-size: 13px; }
.quick-arrow { position: absolute; top: 20px; right: 22px; color: var(--card-color); font-size: 20px; }

/* 回忆胶囊照片条 */
.memory-strip { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; }
.memory-photo { flex: 0 0 170px; height: 220px; border-radius: 14px; overflow: hidden; position: relative; }
.memory-photo img { width: 100%; height: 100%; object-fit: cover; transition: .4s; }
.memory-photo:hover img { transform: scale(1.12); }

/* 最近文字：带方向感切换动画的文章轮播 */
.latest-stage { position: relative; }
.featured-article {
  display: grid; grid-template-columns: 42% 1fr; min-height: 260px; overflow: hidden;
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: border-color .3s, box-shadow .3s;
}
.featured-article:hover { border-color: var(--purple); box-shadow: 0 22px 60px rgba(0,0,0,.42); }
.featured-cover {
  min-height: 260px; background-size: cover; background-position: center; background-color: #1b2140;
  background-image: radial-gradient(circle at 28% 26%, rgba(255,94,138,.34), transparent 55%),
                    radial-gradient(circle at 72% 74%, rgba(139,124,255,.34), transparent 55%);
  position: relative;
}
.featured-cover::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 40%, rgba(15,20,40,.45));
}
.featured-body { padding: 32px 34px; display: flex; flex-direction: column; justify-content: center; }
.featured-cat { color: var(--pink); font-size: 12px; letter-spacing: 2px; }
.featured-body h3 { margin: 12px 0; font-size: 25px; line-height: 1.35; }
.featured-body p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.85; }
.featured-meta { display: flex; justify-content: space-between; margin-top: 26px; color: var(--muted); font-size: 12px; }
.featured-meta span:last-child { color: var(--pink); }
.latest-empty {
  padding: 60px 24px; text-align: center; color: var(--muted);
  background: var(--panel); border: 1px dashed var(--panel-border); border-radius: var(--radius);
}

/* 切换动画：淡入淡出 + 轻微位移与模糊，离场元素绝对定位避免高度跳动 */
.article-next-enter-active, .article-next-leave-active,
.article-prev-enter-active, .article-prev-leave-active {
  transition: opacity .5s cubic-bezier(.22,1,.36,1), transform .6s cubic-bezier(.22,1,.36,1), filter .5s ease;
}
.article-next-enter-from { opacity: 0; transform: translate3d(56px, 0, 0) scale(.985); filter: blur(8px); }
.article-next-leave-to { opacity: 0; transform: translate3d(-56px, 0, 0) scale(.985); filter: blur(8px); }
.article-prev-enter-from { opacity: 0; transform: translate3d(-56px, 0, 0) scale(.985); filter: blur(8px); }
.article-prev-leave-to { opacity: 0; transform: translate3d(56px, 0, 0) scale(.985); filter: blur(8px); }
.article-next-leave-active, .article-prev-leave-active { position: absolute; inset: 0; }

/* 手动切换控件与自动轮播进度条 */
.latest-controls { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.latest-nav {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--panel-border); background: rgba(255,255,255,.04); color: var(--text);
  font-size: 22px; line-height: 1; transition: .25s;
}
.latest-nav:hover { border-color: var(--pink); color: var(--pink); transform: scale(1.08); }
.latest-dots { display: flex; align-items: center; gap: 8px; }
.latest-dot {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,.22); transition: width .35s cubic-bezier(.22,1,.36,1), background .35s;
}
.latest-dot.active {
  width: 26px; background: linear-gradient(90deg, var(--pink), var(--purple));
  box-shadow: 0 0 14px rgba(255,94,138,.5);
}
.latest-count { margin-left: auto; color: var(--muted); font-size: 12px; letter-spacing: 1px; }
.article-progress { height: 2px; margin-top: 14px; background: rgba(255,255,255,.06); border-radius: 999px; overflow: hidden; }
.article-progress-bar {
  display: block; height: 100%; transform-origin: left;
  background: linear-gradient(90deg, var(--pink), var(--purple), var(--cyan));
  animation: articleProgress 5.2s linear forwards;
}
/* 悬停阅读时暂停计时器，同时冻结进度条 */
.latest-stage:hover .article-progress-bar { animation-play-state: paused; }
@keyframes articleProgress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* 通用页面容器 */
.page-wrap { max-width: 1200px; margin: 0 auto; padding: 64px 5vw 90px; }
.page-head { margin-bottom: 34px; }
.page-head h1 { margin: 0 0 10px; font-size: 42px; }
.page-head p:last-child { margin: 0; color: var(--muted); }
.filter-bar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }

/* 文章卡片网格 */
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.article-card {
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius);
  overflow: hidden; transition: .3s;
}
.article-card:hover { transform: translateY(-6px); border-color: var(--pink); box-shadow: var(--shadow); }
.article-cover { height: 160px; background-size: cover; background-position: center; background-color: #1b2140; }
.article-body { padding: 20px; }
.article-cat { color: var(--pink); font-size: 12px; letter-spacing: 1px; }
.article-body h3 { margin: 10px 0; font-size: 19px; }
.article-body p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.article-meta { display: flex; justify-content: space-between; margin-top: 18px; color: var(--muted); font-size: 12px; }
.pager { display: flex; justify-content: center; margin-top: 36px; }
.empty-state { padding: 60px; text-align: center; color: var(--muted); }

/* 文章详情 */
.detail-wrap { max-width: 900px; }
.back-link { display: inline-block; margin-bottom: 20px; color: var(--muted); }
.detail-card { background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius); overflow: hidden; }
.detail-cover { height: 280px; background-size: cover; background-position: center; }
.detail-body { padding: 36px; }
.detail-body h1 { margin: 12px 0; font-size: 34px; }
.detail-meta { display: flex; gap: 18px; color: var(--muted); font-size: 13px; margin-bottom: 28px; }

/* Markdown 正文样式 */
.markdown-body { line-height: 1.9; color: #dfe4ff; font-size: 15px; }
.markdown-body h1, .markdown-body h2, .markdown-body h3 { color: #fff; margin: 28px 0 12px; }
.markdown-body p { margin: 10px 0; }
.markdown-body blockquote { margin: 18px 0; padding: 10px 18px; border-left: 3px solid var(--pink); background: rgba(255,94,138,.08); }
.markdown-body img { max-width: 100%; border-radius: 12px; }
.markdown-body pre { background: #0b1020; padding: 16px; border-radius: 12px; overflow: auto; }
.markdown-body code { color: var(--gold); }
.markdown-body ul, .markdown-body ol { padding-left: 22px; }

/* 我的照片瀑布网格 */
.photo-grid { columns: 4; column-gap: 16px; }
.photo-card {
  position: relative; break-inside: avoid; margin-bottom: 16px; border-radius: 14px; overflow: hidden;
  cursor: pointer; background: #151a32;
}
.photo-card img { width: 100%; display: block; transition: .4s; }
.photo-card.size-0 img { height: 260px; }
.photo-card.size-1 img { height: 200px; }
.photo-card.size-2 img { height: 320px; }
.photo-card.size-3 img { height: 230px; }
.photo-card:hover img { transform: scale(1.06); filter: brightness(.75); }
.photo-overlay {
  position: absolute; inset: auto 0 0 0; padding: 26px 18px 16px; opacity: 0; transition: .3s;
  background: linear-gradient(transparent, rgba(0,0,0,.78));
}
.photo-card:hover .photo-overlay { opacity: 1; }
.photo-overlay b, .photo-overlay span { display: block; }
.photo-overlay span { color: #ddd; font-size: 12px; margin-top: 4px; }
.dialog-photo { max-width: 100%; max-height: 72vh; display: block; margin: 0 auto; border-radius: 10px; }
.dialog-caption { text-align: center; margin-top: 14px; }
.dialog-caption b { display: block; font-size: 17px; }
.dialog-caption span { color: var(--muted); font-size: 13px; }

/* 关于我们 */
.about-wrap { max-width: 1000px; }
.about-card { display: grid; grid-template-columns: 42% 1fr; gap: 40px; align-items: center; }
.about-photo img { width: 100%; border-radius: 20px; box-shadow: var(--shadow); }
.about-text h1 { margin: 0 0 10px; font-size: 40px; }
.about-lead { color: var(--pink); font-size: 18px; }
.about-tags { display: flex; gap: 10px; margin: 24px 0; flex-wrap: wrap; }
.about-tags span { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--panel-border); color: var(--muted); font-size: 13px; }

/* 游戏大厅 */
.game-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.game-card {
  position: relative; min-height: 230px; padding: 28px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--panel-border); transition: .3s;
}
.game-card:hover { transform: translateY(-8px); border-color: var(--card-color); box-shadow: 0 20px 50px rgba(0,0,0,.4); }
.game-icon { font-size: 42px; }
.game-card h3 { margin: 18px 0 8px; font-size: 22px; }
.game-card p { margin: 0; color: var(--muted); font-size: 13px; }
.game-enter { position: absolute; bottom: 22px; right: 26px; color: var(--card-color); font-size: 14px; }

/* 游戏页通用 */
.game-page { max-width: 1180px; margin: 0 auto; padding: 72px 5vw 80px; }
.game-page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 28px; }
.game-page-head h1 { margin: 0 0 8px; font-size: 36px; }
.game-page-head p { margin: 0; color: var(--muted); }
.btn-ghost { padding: 9px 16px; border: 1px solid var(--panel-border); border-radius: 10px; color: var(--muted); font-size: 13px; }
.btn-ghost:hover { color: #fff; border-color: var(--pink); }
.game-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.mode-tabs { display: flex; background: rgba(255,255,255,.05); border-radius: 12px; padding: 4px; }
.mode-tabs button { border: 0; background: transparent; color: var(--muted); padding: 8px 16px; border-radius: 9px; cursor: pointer; }
.mode-tabs button.active { background: linear-gradient(135deg, var(--pink), var(--purple)); color: #fff; }
.panel { background: var(--panel); border: 1px solid var(--panel-border); border-radius: 14px; padding: 18px; }
.panel h3 { margin: 0 0 14px; font-size: 15px; }
.side-stack { display: grid; gap: 16px; align-content: start; }
.status-line { font-size: 14px; }
.player-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; margin-bottom: 6px; }
.player-row.active { background: rgba(255,94,138,.12); }
.player-row span { margin-left: auto; color: var(--muted); font-size: 12px; }
.stone { width: 16px; height: 16px; border-radius: 50%; display: inline-block; }
.stone.black { background: #171a2c; border: 1px solid #777; }
.stone.white { background: #f4f4ff; }
.room-code { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.room-code code { font-size: 22px; letter-spacing: 4px; color: var(--gold); }
.chat-log { max-height: 160px; overflow-y: auto; font-size: 13px; margin-bottom: 10px; }
.chat-log > div { padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.recent-list { font-size: 13px; color: var(--muted); line-height: 1.9; }
.toast { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); z-index: 30000; padding: 10px 22px; border-radius: 999px; background: rgba(20,24,44,.95); border: 1px solid var(--pink); box-shadow: var(--shadow); }
.fade-enter-active, .fade-leave-active { transition: opacity .25s; }
.fade-enter-from, .fade-leave-to { opacity: 0; }

/* 五子棋棋盘：木质纹理 + 细网格线 + 立体棋子 */
.gomoku-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; }
.board-card { background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 20px; }
.board-caption { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.gomoku-board {
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  width: min(100%, 660px);
  aspect-ratio: 1;
  margin: 0 auto;
  padding: 12px;
  border: 10px solid #70472a;
  border-radius: 16px;
  background:
    repeating-linear-gradient(94deg, rgba(255,255,255,.035) 0 2px, transparent 2px 7px),
    linear-gradient(135deg, #e7c787 0%, #d6a55f 45%, #c38b46 100%);
  box-shadow: inset 0 0 44px rgba(87,51,18,.28), 0 18px 42px rgba(0,0,0,.38);
}
/* 必须限定在棋盘内：Element Plus 表格内部也使用 .cell 类名 */
.gomoku-board .cell {
  position: relative;
  border: 0;
  border-right: 1px solid rgba(74,45,19,.42);
  border-bottom: 1px solid rgba(74,45,19,.42);
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.gomoku-board .cell:nth-child(15n) { border-right: 0; }
.gomoku-board .cell:nth-last-child(-n+15) { border-bottom: 0; }
.gomoku-board .cell:disabled { cursor: default; }
/* 星位点 */
.gomoku-board .cell.star { background-image: radial-gradient(circle at center, rgba(78,48,20,.55) 0 2.5px, transparent 2.5px); }
/* 棋子本体：空位悬停时显示半透明预览 */
.gomoku-board .cell::before {
  content: '';
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  opacity: 0;
  transition: opacity .16s, transform .16s;
}
.gomoku-board .cell:not(:disabled):hover::before {
  opacity: .35;
  background: radial-gradient(circle at 34% 28%, #6b6b6b, #101010 70%);
  transform: scale(.92);
}
.gomoku-board .cell.black::before {
  opacity: 1;
  background: radial-gradient(circle at 34% 28%, #6e6e6e 0%, #252525 42%, #050505 100%);
  box-shadow: 0 3px 7px rgba(0,0,0,.45), inset 0 -3px 5px rgba(0,0,0,.5);
}
.gomoku-board .cell.white::before {
  opacity: 1;
  background: radial-gradient(circle at 32% 26%, #ffffff 0%, #f4f4f4 42%, #b7b7b7 100%);
  box-shadow: 0 3px 7px rgba(0,0,0,.35), inset 0 -3px 5px rgba(0,0,0,.18);
}
/* 最后一手：细金圈；胜利连线：粗粉圈并呼吸 */
.gomoku-board .cell.last::after,
.gomoku-board .cell.win::after {
  content: '';
  position: absolute;
  inset: 7%;
  border-radius: 50%;
  pointer-events: none;
}
.gomoku-board .cell.last::after { border: 2px solid rgba(255,214,102,.9); }
.gomoku-board .cell.win::after {
  border: 3px solid #ff5e8a;
  box-shadow: 0 0 16px rgba(255,94,138,.85);
  animation: gomoku-win-pulse 1.1s ease-in-out infinite;
}
@keyframes gomoku-win-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.12); opacity: .7; }
}

/* 圈小猫：六边形棋盘与发光路障 */
.cat-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; }
.cat-stage {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 520px; padding: 18px;
  background: radial-gradient(circle at 50% 12%, rgba(139,124,255,.18), transparent 58%), var(--panel);
  border: 1px solid var(--panel-border); border-radius: var(--radius);
  box-shadow: inset 0 0 60px rgba(139,124,255,.08);
}
.cat-hint { margin: 0 0 12px; color: var(--muted); font-size: 13px; letter-spacing: .02em; }
.cat-board { width: min(100%, 680px); max-height: 68vh; overflow: visible; }
.cat-node { cursor: pointer; }
.cat-dot {
  fill: #cbbfe6; stroke: rgba(255,255,255,.22); stroke-width: 1;
  transition: fill .18s, r .18s;
}
.cat-node:hover .cat-dot { fill: #ff8fb1; r: 9; }
.cat-hit { cursor: pointer; }
.cat-wall {
  fill: url(#catWallGrad);
  filter: drop-shadow(0 0 7px rgba(255,94,138,.6));
}
.cat-aura {
  fill: rgba(255,94,138,.16);
  stroke: rgba(255,94,138,.72);
  stroke-width: 1.5;
  animation: cat-pulse 1.8s ease-in-out infinite;
}
.cat-face { font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif; user-select: none; }
@keyframes cat-pulse {
  0%, 100% { transform: scale(1); opacity: .9; }
  50% { transform: scale(1.18); opacity: .45; }
}
.cat-score { display: flex; gap: 12px; }
.score-box { flex: 1; text-align: center; padding: 14px; border-radius: 12px; background: rgba(255,255,255,.05); }
.score-box b { display: block; font-size: 26px; }
.score-box span { color: var(--muted); font-size: 12px; }
.rules { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.9; }

/* 结果弹窗 */
.result-dialog .el-dialog__body { text-align: center; padding-top: 10px !important; }
.result-emoji { font-size: 56px; }
.result-title { margin: 8px 0; font-size: 26px; }
.result-status { margin: 0; color: var(--muted); }

/* 全屏小游戏 */
.legacy-game { position: fixed; inset: 0; z-index: 500; background: #000; }
.legacy-game iframe { width: 100vw; height: 100vh; border: 0; display: block; }
.legacy-tools { position: fixed; top: 16px; right: 16px; z-index: 600; display: flex; gap: 10px; }
.legacy-btn { padding: 9px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.3); background: rgba(10,12,24,.7); color: #fff; cursor: pointer; font-size: 13px; }
.legacy-btn:hover { background: var(--pink); border-color: var(--pink); }

/* 后台登录页 */
.login-page { position: relative; min-height: 100vh; display: grid; place-items: center; overflow: hidden; }
.login-bg { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.06); filter: blur(4px); }
.login-mask { position: absolute; inset: 0; background: radial-gradient(circle at 50% 40%, rgba(20,10,40,.55), rgba(5,7,18,.92)); }
.login-card {
  position: relative; z-index: 2; width: min(92vw, 420px); padding: 40px;
  border-radius: 24px; background: rgba(18,22,42,.82); border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 30px 80px rgba(0,0,0,.55); backdrop-filter: blur(22px);
}
.login-brand { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; font-size: 24px; background: linear-gradient(135deg, var(--pink), var(--purple)); box-shadow: 0 0 30px rgba(255,94,138,.5); }
.login-card h1 { margin: 22px 0 8px; font-size: 30px; }
.login-card > p { margin: 0 0 26px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.login-submit { width: 100%; margin-top: 6px; }
.login-back { display: block; text-align: center; margin-top: 20px; color: var(--muted); font-size: 13px; }

/* 后台布局：与前台统一的深色星空 + 粉紫霓虹，专业且酷炫 */
.admin-shell {
  position: relative; min-height: 100vh; display: flex;
  /* 星空渐变背景；粒子画布悬浮其上，内容层再盖在画布之上 */
  background:
    radial-gradient(circle at 8% 0%, rgba(139, 124, 255, .16), transparent 42%),
    radial-gradient(circle at 100% 100%, rgba(255, 94, 138, .12), transparent 45%),
    linear-gradient(135deg, #0a0e1e 0%, #080b18 100%);
  color: var(--text);
}
/* 后台粒子背景：固定最底层，不拦截鼠标 */
.admin-particle-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
.admin-side, .admin-content { position: relative; z-index: 1; }
.admin-side {
  width: 232px; flex: 0 0 232px; padding: 26px 16px;
  border-right: 1px solid var(--panel-border);
  background: rgba(12, 16, 34, .66); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  display: flex; flex-direction: column;
}
.admin-logo {
  display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px;
  margin-bottom: 30px; padding: 0 10px;
  background: linear-gradient(90deg, #fff, #ffc8da); -webkit-background-clip: text; color: transparent;
}
.admin-logo::before {
  content: '✦'; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px;
  background: linear-gradient(135deg, var(--pink), var(--purple)); color: #fff;
  font-size: 14px; box-shadow: 0 0 18px rgba(255, 94, 138, .5); -webkit-text-fill-color: #fff;
}
.admin-menu { border-right: 0 !important; background: transparent !important; flex: 1; }
.admin-menu .el-menu-item { position: relative; color: var(--muted) !important; border-radius: 12px; margin-bottom: 4px; }
.admin-menu .el-menu-item.is-active {
  background: linear-gradient(135deg, rgba(255, 94, 138, .2), rgba(139, 124, 255, .14)) !important;
  color: #fff !important; font-weight: 600;
}
.admin-menu .el-menu-item.is-active::before {
  content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--pink); box-shadow: 0 0 10px rgba(255, 94, 138, .6);
}
.admin-back { color: var(--muted); font-size: 13px; padding: 10px; }
.admin-back:hover { color: #fff; }
.admin-content { flex: 1; min-width: 0; }
.admin-top {
  position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center;
  padding: 18px 32px; border-bottom: 1px solid var(--panel-border);
  background: rgba(10, 13, 28, .72); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.admin-top h2 { margin: 0; font-size: 20px; color: #fff; }
.admin-top p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.admin-body { padding: 28px 32px 60px; }
.admin-panel {
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius);
  padding: 24px; margin-bottom: 20px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: border-color .25s, box-shadow .25s;
}
.admin-panel:hover { border-color: rgba(255, 94, 138, .3); box-shadow: 0 12px 34px rgba(0, 0, 0, .3); }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
.panel-head h3 { margin: 0; font-size: 18px; color: #fff; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; margin-bottom: 22px; }
.stat-card {
  padding: 24px; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 94, 138, .18), rgba(139, 124, 255, .12));
  border: 1px solid var(--panel-border); transition: .25s;
}
.stat-card:hover { transform: translateY(-3px); border-color: rgba(255, 94, 138, .45); box-shadow: 0 12px 30px rgba(255, 94, 138, .16); }
.stat-card span { display: block; color: var(--muted); font-size: 13px; }
.stat-card b { display: block; font-size: 36px; margin-top: 8px; color: #fff; text-shadow: 0 0 20px rgba(255, 94, 138, .45); }
.admin-actions { margin-top: 20px; }
.article-form .el-form-item { margin-bottom: 16px; }
.editor-row { align-items: stretch; }
.preview-box { height: 100%; min-height: 420px; padding: 18px; border-radius: 12px; background: rgba(6, 8, 20, .35); border: 1px solid var(--panel-border); color: var(--text); overflow: auto; }
.preview-box h4 { margin: 0 0 12px; color: var(--pink); }
.cover-preview { max-width: 220px; max-height: 120px; border-radius: 10px; display: block; }
/* 照片管理：上传工具条、缩略图与提示 */
.photo-upload-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.panel-tip { color: var(--muted); font-size: 12px; }
.photo-thumb { width: 88px; height: 56px; object-fit: cover; border-radius: 8px; display: block; }
.polaroid-stack.photo-empty { display: grid; place-items: center; color: var(--muted); font-size: 13px; border: 1px dashed var(--panel-border); border-radius: var(--radius); background: rgba(10,12,24,.35); padding: 20px; text-align: center; }
.memory-section .photo-empty { color: var(--muted); text-align: center; padding: 30px 0; }
.settings-form .el-form-item { max-width: 760px; }

/* Element Plus 前台深色主题：与粉紫星空保持一致 */
.el-input__wrapper, .el-select__wrapper {
  background-color: rgba(20, 26, 48, 0.78) !important;
  box-shadow: 0 0 0 1px rgba(170, 180, 255, 0.18) inset !important;
}
.el-input__inner, .el-select__placeholder { color: var(--text) !important; }
.el-input__wrapper.is-focus, .el-select__wrapper.is-focused {
  box-shadow: 0 0 0 1px var(--pink) inset, 0 0 18px rgba(255, 94, 138, 0.22) !important;
}
.el-select-dropdown { background: #151a30 !important; border: 1px solid var(--panel-border); }
.el-select-dropdown__item { color: var(--text) !important; }
.el-select-dropdown__item.is-hovering, .el-select-dropdown__item.is-selected {
  background: rgba(255, 94, 138, 0.14) !important; color: #fff !important;
}
/* 实心主按钮：粉紫渐变；用 :not(.is-link) 排除文字按钮，避免误伤表格里的编辑/撤回 */
.el-button--primary:not(.is-link) {
  --el-button-bg-color: var(--pink);
  --el-button-border-color: var(--pink);
  --el-button-hover-bg-color: var(--purple);
  --el-button-hover-border-color: var(--purple);
  background: linear-gradient(135deg, var(--pink), var(--purple)) !important;
  border: 0 !important;
  box-shadow: 0 8px 22px rgba(255, 94, 138, 0.28);
}
/* 文字型主按钮：透明背景 + 明亮粉色文字，悬停加下划线与微光，保证深色表格上清晰可读 */
.el-button.is-link {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 4px 2px;
  font-weight: 500;
}
.el-button--primary.is-link { color: #ff9ab5 !important; }
.el-button--primary.is-link:hover { color: #ffc2d3 !important; text-decoration: underline; text-underline-offset: 3px; }
.el-button--danger.is-link { color: #ff7a8a !important; }
.el-button--danger.is-link:hover { color: #ffb0bb !important; text-decoration: underline; text-underline-offset: 3px; }
.el-pagination { --el-pagination-button-color: var(--text); --el-pagination-hover-color: var(--pink); }
.el-pager li, .el-pagination button {
  background: rgba(22, 28, 52, 0.78) !important; color: var(--muted) !important;
  border: 1px solid var(--panel-border) !important; border-radius: 10px !important;
}
.el-pager li.is-active {
  background: linear-gradient(135deg, var(--pink), var(--purple)) !important;
  color: #fff !important; border-color: transparent !important;
  box-shadow: 0 0 18px rgba(255, 94, 138, 0.35);
}
.el-pagination button:disabled { color: #5d6580 !important; }
.el-table { background: transparent !important; --el-table-tr-bg-color: rgba(22,28,52,.5) !important; --el-table-header-bg-color: rgba(255,255,255,.05) !important; --el-table-row-hover-bg-color: rgba(255,255,255,.08) !important; }
.el-table th.el-table__cell { color: var(--muted) !important; }
.el-table td.el-table__cell { border-color: rgba(255,255,255,.06) !important; }
.el-dialog { background: #151a30 !important; border: 1px solid var(--panel-border); border-radius: 18px !important; }
.el-dialog__title, .el-dialog__body { color: var(--text) !important; }
.el-message-box { background: #151a30 !important; border: 1px solid var(--panel-border) !important; }
.el-message-box__title, .el-message-box__message { color: var(--text) !important; }

/* 后台弹窗与下拉：Element Plus 组件传送到 body 渲染，需按深色星空主题统一 */
body.admin-mode .el-select-dropdown { background: #151a30 !important; border-color: var(--panel-border); }
body.admin-mode .el-select-dropdown__item { color: var(--text) !important; }
body.admin-mode .el-select-dropdown__item.is-hovering,
body.admin-mode .el-select-dropdown__item.is-selected { background: rgba(255, 94, 138, .14) !important; color: #fff !important; }
body.admin-mode .el-dialog, body.admin-mode .el-message-box { background: #151a30 !important; border-color: var(--panel-border); }
body.admin-mode .el-dialog__title, body.admin-mode .el-dialog__body,
body.admin-mode .el-message-box__title, body.admin-mode .el-message-box__message { color: var(--text) !important; }

/* 点击波纹特效 */
.click-ripple {
  position: fixed; z-index: 99999; width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 50%; border: 2px solid rgba(255,255,255,.85);
  pointer-events: none; animation: ripple .65s ease-out forwards;
}
@keyframes ripple {
  from { transform: scale(.4); opacity: .9; }
  to { transform: scale(5); opacity: 0; }
}

/* 响应式适配：平板与手机分别收敛布局，避免横向溢出 */
@media (max-width: 900px) {
  .site-header { top: 10px; max-width: calc(100% - 24px); margin: 0 auto; padding: 4px 0; }
  .nav { display: none; }
  .mobile-menu-btn { display: grid; }
  .hero { padding: 92px 5vw 48px; min-height: auto; }
  .hero-inner { max-width: 100%; }
  .hero-title { font-size: clamp(34px, 8vw, 56px); }
  .hero-subtitle { font-size: 15px; }
  .polaroid-stack { display: none; }
  .section { padding: 56px 5vw; }
  .section-head h2 { font-size: 28px; }
  .gomoku-layout, .cat-layout, .about-card { grid-template-columns: 1fr; }
  .featured-article { grid-template-columns: 1fr; }
  .featured-cover { min-height: 180px; }
  .featured-body { padding: 22px; }
  .featured-body h3 { font-size: 21px; }
  .photo-grid { columns: 2; }
  .filter-bar { gap: 10px; }
  /* 窄屏侧栏折叠为纯图标，文字隐藏但图标保留 */
  .admin-side { width: 72px; flex-basis: 72px; padding: 20px 8px; }
  .admin-logo, .admin-back { display: none; }
  .admin-menu .el-menu-item { justify-content: center; padding: 12px 0 !important; }
  .admin-menu .el-menu-item .menu-icon { font-size: 19px; line-height: 1; }
  .admin-menu .el-menu-item .menu-label { display: none; }
  .admin-menu .el-menu-item.is-active::before { top: 8px; bottom: 8px; }
  .admin-body, .admin-top { padding-left: 16px; padding-right: 16px; }
  /* 表格与上传工具条允许横向滚动，避免窄屏溢出 */
  .admin-panel .el-table { min-width: 640px; }
  .admin-panel { overflow-x: auto; }
  .photo-upload-bar .el-input, .photo-upload-bar .el-input-number { min-width: 140px; }
  /* 文章编辑双列在窄屏堆叠 */
  .editor-row .el-col { max-width: 100%; flex: 0 0 100%; width: 100%; }
}
@media (max-width: 560px) {
  .site-header { left: 12px; right: 12px; max-width: none; }
  .brand-text { font-size: 14px; }
  .brand-mark { width: 30px; height: 30px; }
  .hero { padding: 84px 18px 40px; }
  .hero-title { font-size: 36px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-btn { justify-content: center; }
  .hero-chips { gap: 6px; }
  .section { padding: 48px 18px; }
  .section-head h2, .page-head h1 { font-size: 30px; }
  .filter-bar { display: grid; grid-template-columns: 1fr; }
  .filter-bar .el-select, .filter-bar .el-input { width: 100% !important; }
  .filter-bar .el-button { width: 100%; }
  .article-grid { grid-template-columns: 1fr; }
  .article-cover { height: 150px; }
  .detail-body { padding: 18px; }
  .detail-body h1 { font-size: 26px; }
  .photo-grid { columns: 1; }
  .memory-photo { flex-basis: 140px; height: 180px; }
  .latest-controls { flex-wrap: wrap; }
  .latest-count { width: 100%; margin-left: 0; text-align: center; }
  .game-page { padding-top: 72px; }
  .game-page-head h1 { font-size: 28px; }
  .site-footer { padding: 20px 18px; }
  .admin-top { flex-direction: column; align-items: flex-start; gap: 6px; }
  .stat-grid { grid-template-columns: 1fr; }
}

/* 尊重系统「减少动态效果」设置，避免动画造成不适 */
@media (prefers-reduced-motion: reduce) {
  .article-next-enter-active, .article-next-leave-active,
  .article-prev-enter-active, .article-prev-leave-active { transition-duration: .01ms !important; }
  .article-progress-bar { animation: none; }
  .latest-nav, .latest-dot, .featured-article { transition: none !important; }
}
