/* ============================================================
   霓虹游戏港 NEON GAME PORT - 赛博像素主题
   ============================================================ */

:root {
  --bg: #05070f;
  --bg-2: #0a0f20;
  --panel: #0c1326;
  --panel-2: #111a33;
  --line: #1d2a4d;
  --line-bright: #2b3d6b;
  --text: #d7e5ff;
  --text-dim: #8ea1c8;
  --text-faint: #5d6f96;
  --neon-cyan: #00f0ff;
  --neon-magenta: #ff2bd6;
  --neon-yellow: #ffd319;
  --neon-green: #39ff88;
  --neon-red: #ff4b6b;
  --neon-purple: #b388ff;
  --font-pixel: 'Press Start 2P', 'DotGothic16', 'Courier New', monospace;
  --font-head: 'DotGothic16', 'Press Start 2P', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Noto Sans SC', 'Microsoft YaHei', 'PingFang SC', sans-serif;
  --radius: 2px;
  --shadow-neon: 0 0 18px rgba(0, 240, 255, 0.18), 0 0 4px rgba(0, 240, 255, 0.25);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.7;
  font-size: 15px;
  background-image:
    radial-gradient(ellipse 900px 420px at 12% -6%, rgba(0, 240, 255, 0.09), transparent 60%),
    radial-gradient(ellipse 900px 420px at 88% 4%, rgba(255, 43, 214, 0.08), transparent 60%),
    linear-gradient(rgba(20, 32, 64, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 32, 64, 0.16) 1px, transparent 1px);
  background-size: auto, auto, 44px 44px, 44px 44px;
  background-attachment: fixed;
}

/* CRT 扫描线覆盖层 */
.crt-overlay {
  position: fixed;
  inset: 0;
  z-index: 9990;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
  opacity: 0.55;
  animation: crt-flicker 7s infinite steps(1);
}

@keyframes crt-flicker {
  0%, 96%, 100% { opacity: 0.55; }
  97% { opacity: 0.38; }
  98% { opacity: 0.62; }
}

::selection {
  background: var(--neon-cyan);
  color: #031018;
}

a {
  color: var(--neon-cyan);
  text-decoration: none;
}

a:hover {
  color: var(--neon-yellow);
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1180px, 100% - 32px);
  margin: 0 auto;
}

.main-content {
  min-height: 62vh;
  padding: 28px 0 56px;
}

/* ---------------- 顶部导航 ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 8, 18, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--line);
  box-shadow: 0 2px 0 rgba(0, 240, 255, 0.12), 0 8px 24px rgba(0, 0, 0, 0.5);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 0;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-pixel {
  width: 34px;
  height: 34px;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.8));
}

.logo-text {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--text);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.55);
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-en {
  font-family: var(--font-pixel);
  font-size: 8px;
  letter-spacing: 2px;
  color: var(--neon-cyan);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--line-bright);
  background: rgba(13, 19, 38, 0.7);
  padding: 4px 10px 4px 4px;
  color: var(--text);
  font-family: var(--font-head);
  font-size: 13px;
  transition: all 0.15s;
}

.user-chip:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
  color: var(--text);
}

.admin-tag {
  font-style: normal;
  font-family: var(--font-pixel);
  font-size: 7px;
  color: var(--neon-magenta);
  border: 1px solid var(--neon-magenta);
  padding: 2px 4px;
  text-shadow: 0 0 6px var(--neon-magenta);
}

.main-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.main-nav a {
  font-family: var(--font-head);
  color: var(--text-dim);
  padding: 7px 12px;
  border: 2px solid transparent;
  position: relative;
  transition: all 0.15s;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--neon-cyan);
  border-color: rgba(0, 240, 255, 0.4);
  background: rgba(0, 240, 255, 0.06);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.8);
  box-shadow: inset 0 0 12px rgba(0, 240, 255, 0.08);
}

.header-search {
  display: flex;
  gap: 6px;
  margin-left: auto;
  flex: 1;
  max-width: 340px;
  min-width: 200px;
}

.header-search input {
  flex: 1;
  min-width: 0;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.skeleton-line {
  height: 14px;
  background: linear-gradient(90deg, var(--line), var(--line-bright), var(--line));
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: 2px;
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* ---------------- 通用控件 ---------------- */
.btn {
  font-family: var(--font-head);
  font-size: 13px;
  letter-spacing: 1px;
  border: 2px solid var(--line-bright);
  background: var(--panel-2);
  color: var(--text);
  padding: 9px 16px;
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.12s;
  user-select: none;
  text-shadow: none;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.12);
}

.btn:active {
  transform: translateY(2px);
  box-shadow: none !important;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary {
  background: var(--neon-cyan);
  border-color: var(--neon-cyan);
  color: #031018;
  font-weight: 700;
  box-shadow: 0 4px 0 #007a86, 0 0 14px rgba(0, 240, 255, 0.4);
}

.btn-magenta {
  background: var(--neon-magenta);
  border-color: var(--neon-magenta);
  color: #14020f;
  font-weight: 700;
  box-shadow: 0 4px 0 #8f1377, 0 0 14px rgba(255, 43, 214, 0.4);
}

.btn-green {
  background: var(--neon-green);
  border-color: var(--neon-green);
  color: #03180b;
  font-weight: 700;
  box-shadow: 0 4px 0 #1c8a4e, 0 0 14px rgba(57, 255, 136, 0.35);
}

.btn-yellow {
  background: var(--neon-yellow);
  border-color: var(--neon-yellow);
  color: #170f00;
  font-weight: 700;
  box-shadow: 0 4px 0 #8f6f00, 0 0 14px rgba(255, 211, 25, 0.35);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-bright);
  color: var(--text-dim);
}

.btn-ghost:hover {
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
}

.btn-danger {
  background: transparent;
  border-color: rgba(255, 75, 107, 0.6);
  color: var(--neon-red);
}

.btn-sm {
  padding: 6px 10px;
  font-size: 11px;
}

.btn-lg {
  padding: 13px 24px;
  font-size: 14px;
}

input[type="text"],
input[type="search"],
input[type="password"],
input[type="url"],
input[type="number"],
textarea,
select {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  background: #070c1a;
  border: 2px solid var(--line-bright);
  padding: 9px 12px;
  outline: none;
  border-radius: 0;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.18), 0 0 14px rgba(0, 240, 255, 0.2);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-faint);
}

textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.7;
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--neon-cyan) 50%), linear-gradient(135deg, var(--neon-cyan) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.pixel-card {
  background: var(--panel);
  border: 2px solid var(--line-bright);
  position: relative;
  box-shadow: 0 0 0 2px var(--bg), 0 6px 18px rgba(0, 0, 0, 0.45);
}

.pixel-card::before,
.pixel-card::after {
  content: '';
  position: absolute;
  width: 7px;
  height: 7px;
  background: var(--neon-cyan);
  box-shadow: 0 0 8px var(--neon-cyan);
  z-index: 2;
}

.pixel-card::before {
  top: -2px;
  left: -2px;
}

.pixel-card::after {
  bottom: -2px;
  right: -2px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-head);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--text-dim);
  border: 2px solid var(--line);
  background: rgba(13, 19, 38, 0.75);
  padding: 6px 11px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.chip:hover {
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.2);
}

.chip.active {
  color: #031018;
  background: var(--neon-cyan);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.45);
}

.tag {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 10px;
  letter-spacing: 0.5px;
  color: var(--neon-green);
  border: 1px solid rgba(57, 255, 136, 0.45);
  background: rgba(57, 255, 136, 0.07);
  padding: 2px 7px;
  margin: 0 4px 4px 0;
}

.badge {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 10px;
  letter-spacing: 1px;
  padding: 3px 8px;
  border: 1px solid;
}

.badge-cyan { color: var(--neon-cyan); border-color: var(--neon-cyan); background: rgba(0, 240, 255, 0.08); }
.badge-magenta { color: var(--neon-magenta); border-color: var(--neon-magenta); background: rgba(255, 43, 214, 0.08); }
.badge-yellow { color: var(--neon-yellow); border-color: var(--neon-yellow); background: rgba(255, 211, 25, 0.08); }
.badge-green { color: var(--neon-green); border-color: var(--neon-green); background: rgba(57, 255, 136, 0.08); }

.section-title {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 3px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.35);
}

.section-title::before {
  content: '▮';
  color: var(--neon-magenta);
  text-shadow: 0 0 10px var(--neon-magenta);
  font-size: 14px;
}

.section-title .sub {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--text-faint);
  letter-spacing: 2px;
  align-self: flex-end;
  margin-bottom: 4px;
}

/* ---------------- 首页 Hero ---------------- */
.hero {
  position: relative;
  padding: 52px 0 40px;
  text-align: center;
}

.hero-eyebrow {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--neon-magenta);
  letter-spacing: 4px;
  text-shadow: 0 0 12px rgba(255, 43, 214, 0.8);
  animation: blink 1.6s infinite steps(1);
}

@keyframes blink {
  50% { opacity: 0.35; }
}

.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(34px, 6vw, 62px);
  font-weight: 900;
  letter-spacing: 6px;
  line-height: 1.2;
  margin: 14px 0 8px;
}

.glitch {
  position: relative;
  display: inline-block;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
}

.glitch::before {
  color: var(--neon-magenta);
  animation: glitch-a 3.2s infinite steps(1);
}

.glitch::after {
  color: var(--neon-cyan);
  animation: glitch-b 3.7s infinite steps(1);
}

@keyframes glitch-a {
  0%, 86%, 100% { opacity: 0; }
  87% { opacity: 0.85; transform: translate(-3px, 1px); clip-path: inset(18% 0 52% 0); }
  89% { opacity: 0.85; transform: translate(3px, -1px); clip-path: inset(62% 0 8% 0); }
  91% { opacity: 0; }
}

@keyframes glitch-b {
  0%, 88%, 100% { opacity: 0; }
  89% { opacity: 0.85; transform: translate(3px, 2px); clip-path: inset(42% 0 38% 0); }
  91% { opacity: 0.85; transform: translate(-2px, -2px); clip-path: inset(8% 0 74% 0); }
  93% { opacity: 0; }
}

.hero-sub {
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 auto 26px;
  font-size: 15px;
}

.hero-search {
  display: flex;
  gap: 0;
  max-width: 560px;
  margin: 0 auto;
  border: 2px solid var(--neon-cyan);
  box-shadow: 0 0 22px rgba(0, 240, 255, 0.28), 0 4px 0 #007a86;
  background: #070c1a;
}

.hero-search input {
  border: none;
  background: transparent;
  box-shadow: none !important;
  flex: 1;
  padding: 14px 16px;
  font-size: 15px;
}

.hero-search .btn {
  border: none;
  border-left: 2px solid var(--neon-cyan);
  box-shadow: none;
  padding: 0 22px;
  font-family: var(--font-pixel);
  font-size: 12px;
  background: rgba(0, 240, 255, 0.12);
  color: var(--neon-cyan);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: clamp(20px, 6vw, 64px);
  margin-top: 34px;
}

.hero-stat {
  font-family: var(--font-pixel);
  font-size: 18px;
  color: var(--neon-yellow);
  text-shadow: 0 0 12px rgba(255, 211, 25, 0.6);
}

.hero-stat small {
  display: block;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 2px;
  margin-top: 6px;
  text-shadow: none;
}

.hot-search {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-faint);
}

.hot-search a {
  color: var(--text-dim);
  border-bottom: 1px dashed var(--line-bright);
}

.hot-search a:hover {
  color: var(--neon-magenta);
  border-color: var(--neon-magenta);
}

/* ---------------- 滚动公告 ---------------- */
.ticker {
  overflow: hidden;
  border-bottom: 2px solid var(--line);
  background: rgba(10, 15, 32, 0.85);
  padding: 8px 0;
}

.ticker-track {
  display: flex;
  gap: 48px;
  white-space: nowrap;
  width: max-content;
  animation: marquee 42s linear infinite;
  font-family: var(--font-head);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--text-dim);
}

.ticker-track span:nth-child(odd) { color: var(--neon-cyan); }
.ticker-track span:nth-child(even) { color: var(--neon-yellow); }

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------------- 分类区 ---------------- */
.category-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 6px 0 26px;
}

.category-row .chip {
  padding: 9px 14px;
  font-size: 13px;
}

/* ---------------- 游戏卡片 ---------------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
  gap: 20px;
}

.game-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.16s, box-shadow 0.16s;
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 0 2px var(--bg), 0 0 22px rgba(0, 240, 255, 0.3);
}

.game-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #070c1a;
  overflow: hidden;
  border-bottom: 2px solid var(--line);
}

.game-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  transition: transform 0.25s;
}

.game-card:hover .game-cover img {
  transform: scale(1.05);
}

.game-cover .cat-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  font-family: var(--font-head);
  font-size: 11px;
  letter-spacing: 1px;
  color: #031018;
  background: var(--neon-cyan);
  padding: 3px 8px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.5);
}

.game-cover .size-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--neon-yellow);
  background: rgba(5, 7, 15, 0.82);
  border: 1px solid rgba(255, 211, 25, 0.5);
  padding: 3px 7px;
}

.game-info {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.game-info h3 {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 1.35;
}

.game-info h3 a {
  color: var(--text);
}

.game-info h3 a:hover {
  color: var(--neon-cyan);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.7);
}

.game-en {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--text-faint);
  letter-spacing: 2px;
}

.game-meta {
  margin-top: auto;
  display: flex;
  gap: 14px;
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--text-dim);
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}

.game-meta .dl { color: var(--neon-cyan); }
.game-meta .fav { color: var(--neon-magenta); }
.game-meta .view { color: var(--text-faint); }

.empty-state {
  text-align: center;
  padding: 70px 20px;
  color: var(--text-faint);
  font-family: var(--font-head);
}

.empty-state .big {
  font-family: var(--font-pixel);
  font-size: 22px;
  color: var(--neon-magenta);
  display: block;
  margin-bottom: 14px;
  text-shadow: 0 0 16px rgba(255, 43, 214, 0.6);
}

/* ---------------- 页签 ---------------- */
.tab-row {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  border-bottom: 2px solid var(--line);
  padding-bottom: 12px;
}

.tab {
  font-family: var(--font-head);
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--text-dim);
  padding: 8px 16px;
  cursor: pointer;
  border: 2px solid transparent;
  position: relative;
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  color: var(--neon-cyan);
  border-color: var(--line-bright);
  background: rgba(0, 240, 255, 0.06);
  box-shadow: inset 0 -3px 0 var(--neon-cyan), 0 0 14px rgba(0, 240, 255, 0.12);
}

/* ---------------- 侧栏 ---------------- */
.home-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 26px;
  align-items: start;
}

.rank-list {
  display: flex;
  flex-direction: column;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px dashed var(--line);
  transition: background 0.15s;
}

.rank-item:hover {
  background: rgba(0, 240, 255, 0.05);
}

.rank-no {
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--neon-yellow);
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}

.rank-item:nth-child(1) .rank-no,
.rank-item:nth-child(2) .rank-no,
.rank-item:nth-child(3) .rank-no {
  color: var(--neon-magenta);
  text-shadow: 0 0 8px var(--neon-magenta);
}

.rank-cover {
  width: 76px;
  height: 43px;
  object-fit: cover;
  image-rendering: pixelated;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.rank-title {
  font-family: var(--font-head);
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meta {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--neon-cyan);
  margin-top: 4px;
}

/* ---------------- 详情页 ---------------- */
.detail-head {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 28px;
}

.detail-cover {
  border: 2px solid var(--line-bright);
  box-shadow: 0 0 0 2px var(--bg), 0 0 28px rgba(0, 240, 255, 0.15);
  position: relative;
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  image-rendering: pixelated;
}

.detail-title {
  font-family: var(--font-head);
  font-size: clamp(24px, 3.4vw, 36px);
  font-weight: 900;
  letter-spacing: 3px;
  line-height: 1.3;
  margin-bottom: 6px;
  text-shadow: 0 0 16px rgba(0, 240, 255, 0.3);
}

.detail-en {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--neon-magenta);
  letter-spacing: 3px;
  margin-bottom: 14px;
}

.detail-tags {
  margin-bottom: 16px;
}

.detail-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.info-table td {
  padding: 8px 10px;
  border: 1px solid var(--line);
}

.info-table td:first-child {
  width: 110px;
  color: var(--text-faint);
  font-family: var(--font-head);
  font-size: 12px;
  letter-spacing: 1px;
  background: rgba(13, 19, 38, 0.7);
}

.info-table a.author-link {
  color: var(--neon-yellow);
}

.panel {
  background: var(--panel);
  border: 2px solid var(--line-bright);
  padding: 22px;
  margin-bottom: 26px;
  position: relative;
}

.panel h2 {
  font-family: var(--font-head);
  font-size: 17px;
  letter-spacing: 2px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel h2::before {
  content: '▶';
  color: var(--neon-green);
  font-size: 11px;
}

.description {
  white-space: pre-line;
  color: #c3d3f2;
  font-size: 15px;
  line-height: 1.9;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.screenshot-grid img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  image-rendering: pixelated;
  border: 1px solid var(--line);
  cursor: zoom-in;
  transition: all 0.15s;
}

.screenshot-grid img:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.3);
  transform: scale(1.02);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

/* ---------------- 评论 ---------------- */
.comment-box {
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
}

.avatar {
  width: 42px;
  height: 42px;
  border: 2px solid var(--line-bright);
  flex-shrink: 0;
  image-rendering: pixelated;
  background: var(--panel-2);
}

.avatar-sm {
  width: 32px;
  height: 32px;
}

.comment-box form {
  flex: 1;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.comment-item {
  border: 1px solid var(--line);
  background: rgba(13, 19, 38, 0.6);
  padding: 14px;
}

.comment-item.reply {
  margin-left: 42px;
  border-color: rgba(255, 43, 214, 0.3);
  background: rgba(255, 43, 214, 0.04);
}

.comment-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.comment-name {
  font-family: var(--font-head);
  font-size: 13px;
  color: var(--neon-cyan);
}

.comment-time {
  font-size: 12px;
  color: var(--text-faint);
  margin-left: auto;
}

.comment-content {
  white-space: pre-line;
  font-size: 14px;
  color: #c3d3f2;
}

.comment-actions {
  margin-top: 8px;
  display: flex;
  gap: 12px;
}

.link-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-faint);
  padding: 0;
}

.link-btn:hover {
  color: var(--neon-cyan);
}

.reply-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 43, 214, 0.08);
  border: 1px dashed rgba(255, 43, 214, 0.5);
  color: var(--neon-magenta);
  font-size: 12px;
  padding: 5px 10px;
  margin-bottom: 10px;
}

/* ---------------- 表单 ---------------- */
.auth-wrap {
  max-width: 440px;
  margin: 30px auto;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 0;
}

.auth-tabs .tab {
  text-align: center;
  border: 2px solid var(--line);
  border-bottom: none;
}

.auth-tabs .tab.active {
  background: var(--panel);
  border-color: var(--line-bright);
  border-bottom-color: var(--panel);
  color: var(--neon-cyan);
}

.auth-body {
  padding: 28px 24px;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-family: var(--font-head);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 7px;
}

.field .hint {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 5px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

.form-error {
  color: var(--neon-red);
  border: 1px solid rgba(255, 75, 107, 0.5);
  background: rgba(255, 75, 107, 0.07);
  padding: 9px 12px;
  font-size: 13px;
  margin-bottom: 14px;
  display: none;
}

.cover-preview {
  margin-top: 10px;
  max-width: 320px;
  border: 2px solid var(--line);
  display: none;
}

.cover-preview img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  image-rendering: pixelated;
}

.thumb-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.thumb-row .thumb {
  position: relative;
  width: 120px;
  aspect-ratio: 16 / 9;
  border: 2px solid var(--line);
}

.thumb-row .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.thumb-row .thumb button {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  border: 1px solid var(--neon-red);
  background: #16060b;
  color: var(--neon-red);
  cursor: pointer;
  line-height: 1;
}

.radio-row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.radio-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
  margin: 0;
}

/* ---------------- 个人主页 ---------------- */
.profile-head {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 26px;
  margin-bottom: 26px;
}

.profile-head .avatar {
  width: 72px;
  height: 72px;
}

.profile-name {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-bio {
  color: var(--text-dim);
  margin-top: 6px;
  font-size: 14px;
}

.profile-stats {
  margin-left: auto;
  display: flex;
  gap: 26px;
  text-align: center;
}

.profile-stats .num {
  font-family: var(--font-pixel);
  font-size: 18px;
  color: var(--neon-yellow);
  text-shadow: 0 0 10px rgba(255, 211, 25, 0.5);
}

.profile-stats .lbl {
  font-size: 12px;
  color: var(--text-faint);
}

.profile-tabs {
  margin-bottom: 0;
}

/* ---------------- 关于页 ---------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.about-grid .panel {
  margin-bottom: 0;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature-list li {
  display: flex;
  gap: 10px;
  color: #c3d3f2;
  font-size: 14px;
}

.feature-list li::before {
  content: '▸';
  color: var(--neon-green);
  flex-shrink: 0;
}

code {
  font-family: 'Consolas', 'Courier New', monospace;
  background: #05070f;
  border: 1px solid var(--line);
  color: var(--neon-green);
  padding: 2px 7px;
  font-size: 13px;
}

/* ---------------- 加载 ---------------- */
.loading {
  text-align: center;
  padding: 60px 0;
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--neon-cyan);
  animation: blink 1s infinite steps(1);
}

.load-more-wrap {
  text-align: center;
  margin-top: 30px;
}

/* ---------------- 弹窗 / 轻量框 ---------------- */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(2, 4, 10, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fade-in 0.15s ease;
}

@keyframes fade-in {
  from { opacity: 0; }
}

.lightbox {
  max-width: min(1000px, 100%);
  border: 2px solid var(--neon-cyan);
  box-shadow: 0 0 34px rgba(0, 240, 255, 0.35);
}

.lightbox img {
  max-height: 78vh;
  width: auto;
  margin: 0 auto;
  image-rendering: pixelated;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  background: var(--neon-magenta);
  border: 2px solid var(--neon-magenta);
  color: #14020f;
  font-family: var(--font-pixel);
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 3px 0 #8f1377;
}

.lightbox-close:hover {
  filter: brightness(1.15);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 40px;
  height: 52px;
  background: rgba(5, 8, 18, 0.8);
  border: 2px solid var(--neon-cyan);
  color: var(--neon-cyan);
  font-family: var(--font-pixel);
  font-size: 16px;
  cursor: pointer;
}

.lightbox-nav:hover {
  background: rgba(0, 240, 255, 0.2);
}

.lightbox-prev { left: -8px; }
.lightbox-next { right: -8px; }

/* ---------------- Toast ---------------- */
.toast-root {
  position: fixed;
  top: 84px;
  right: 20px;
  z-index: 9800;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  font-family: var(--font-head);
  font-size: 13px;
  letter-spacing: 1px;
  padding: 12px 18px;
  border: 2px solid;
  background: rgba(8, 12, 26, 0.94);
  max-width: 340px;
  animation: toast-in 0.18s ease;
  pointer-events: auto;
}

.toast.success { border-color: var(--neon-green); color: var(--neon-green); box-shadow: 0 0 16px rgba(57, 255, 136, 0.25); }
.toast.error { border-color: var(--neon-red); color: var(--neon-red); box-shadow: 0 0 16px rgba(255, 75, 107, 0.25); }
.toast.info { border-color: var(--neon-cyan); color: var(--neon-cyan); box-shadow: 0 0 16px rgba(0, 240, 255, 0.25); }

@keyframes toast-in {
  from { transform: translateX(30px); opacity: 0; }
}

.toast.out {
  transition: all 0.3s;
  opacity: 0;
  transform: translateX(30px);
}

/* ---------------- 页脚 ---------------- */
.site-footer {
  border-top: 2px solid var(--line);
  background: rgba(5, 7, 15, 0.94);
  margin-top: 30px;
}

.footer-inner {
  padding: 26px 0 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.footer-brand .logo-text {
  font-size: 17px;
  align-items: center;
}

.footer-brand p,
.footer-disclaimer {
  font-size: 12px;
  color: var(--text-faint);
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  font-family: var(--font-head);
  font-size: 13px;
  color: var(--text-dim);
}

.footer-links a:hover {
  color: var(--neon-cyan);
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 960px) {
  .detail-head {
    grid-template-columns: 1fr;
  }

  .home-layout {
    grid-template-columns: 1fr;
  }

  .profile-head {
    flex-wrap: wrap;
  }

  .profile-stats {
    margin-left: 0;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .header-inner {
    gap: 10px;
  }

  .header-search {
    order: 3;
    max-width: none;
    flex-basis: 100%;
  }

  .main-nav {
    order: 4;
    flex-basis: 100%;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }

  .game-info {
    padding: 10px;
  }

  .game-info h3 {
    font-size: 13px;
  }

  .comment-item.reply {
    margin-left: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   公告 + 管理后台
   ============================================================ */

.announcement {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 4px;
  padding: 12px 16px;
  border: 1px solid var(--line-bright);
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.08), rgba(255, 43, 214, 0.06));
  color: var(--text);
  font-size: 14px;
  box-shadow: inset 0 0 18px rgba(0, 240, 255, 0.05);
}

.ann-label {
  flex: none;
  padding: 2px 8px;
  font-family: var(--font-pixel);
  font-size: 10px;
  color: #05070f;
  background: var(--neon-yellow);
  box-shadow: 0 0 10px rgba(255, 211, 25, 0.5);
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 22px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}

.admin-tabs .tab {
  border: 1px solid var(--line-bright);
  background: var(--panel);
  color: var(--text-dim);
  font-family: var(--font-head);
  padding: 8px 16px;
  cursor: pointer;
}

.admin-tabs .tab:hover {
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
}

.admin-tabs .tab.active {
  color: #05070f;
  background: var(--neon-cyan);
  border-color: var(--neon-cyan);
  box-shadow: var(--shadow-neon);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.stat-card {
  padding: 16px;
  text-align: center;
}

.stat-num {
  font-family: var(--font-pixel);
  font-size: 22px;
  color: var(--neon-cyan);
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.45);
}

.stat-label {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text);
}

.stat-en {
  margin-top: 2px;
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--text-faint);
}

.admin-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.admin-cols .panel {
  padding: 16px;
}

.admin-cols .panel h2 {
  font-size: 14px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}

.admin-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 13px;
  border-bottom: 1px dotted rgba(29, 42, 77, 0.6);
}

.admin-row:last-child {
  border-bottom: none;
}

.admin-row .rank-no {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--neon-magenta);
  width: 22px;
}

.muted {
  color: var(--text-faint);
  font-size: 12px;
}

.comment-snip {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 320px;
  display: inline-block;
  vertical-align: bottom;
}

.cat-bar-row {
  display: grid;
  grid-template-columns: 64px 1fr 30px;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 12px;
}

.cat-bar {
  height: 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}

.cat-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta));
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

.cat-count {
  text-align: right;
  color: var(--neon-yellow);
  font-family: var(--font-pixel);
  font-size: 9px;
}

.admin-search {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.admin-search input[type='search'],
.admin-search select {
  background: var(--panel);
  border: 1px solid var(--line-bright);
  color: var(--text);
  padding: 8px 12px;
  font-family: var(--font-body);
  min-width: 200px;
}

.admin-search input:focus,
.admin-search select:focus {
  outline: none;
  border-color: var(--neon-cyan);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--panel);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 860px;
}

.admin-table th {
  font-family: var(--font-head);
  font-size: 12px;
  color: var(--neon-cyan);
  text-align: left;
  padding: 10px 12px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line-bright);
  white-space: nowrap;
}

.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(29, 42, 77, 0.7);
  vertical-align: middle;
}

.admin-table tbody tr:hover {
  background: rgba(0, 240, 255, 0.04);
}

.cell-game {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cell-game img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border: 1px solid var(--line-bright);
}

.cell-game .avatar {
  border-radius: 0;
}

.cell-game b {
  display: block;
  font-size: 13px;
}

.cell-game small {
  color: var(--text-faint);
  font-size: 11px;
}

.cell-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  white-space: nowrap;
}

.admin-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-dim);
}

.admin-pager button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.check-line input {
  accent-color: var(--neon-cyan);
  width: 16px;
  height: 16px;
}

@media (max-width: 720px) {
  .admin-search input[type='search'] {
    min-width: 100%;
  }

  .admin-search select {
    min-width: calc(50% - 5px);
  }
}

/* ============================================================
   参考站布局：统一顶栏 / 分类导航 / 抽屉 / 首页模块 / 详情页
   ============================================================ */

.header-top {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 0;
  flex-wrap: nowrap;
}

.header-top .main-nav {
  flex-wrap: nowrap;
  min-width: 0;
}

.main-nav a {
  white-space: nowrap;
}

.header-top .header-search {
  flex: 0 1 340px;
  min-width: 160px;
  margin-left: auto;
}

.header-top .user-chip span {
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 2px solid var(--line-bright);
  background: var(--panel);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-menu-toggle:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--neon-cyan);
  content: '';
  position: relative;
}

.hamburger::before { top: -6px; position: absolute; }
.hamburger::after { top: 6px; position: absolute; }

.nav-cats {
  display: flex;
  gap: 2px;
  flex-wrap: nowrap;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  padding: 0;
  scrollbar-width: none;
}

.nav-cats::-webkit-scrollbar { display: none; }

.nav-cat {
  flex: none;
  font-family: var(--font-head);
  font-size: 13px;
  color: var(--text-dim);
  padding: 9px 13px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.nav-cat:hover,
.nav-cat.active {
  color: var(--neon-cyan);
  border-bottom-color: var(--neon-cyan);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.7);
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(2, 4, 10, 0.78);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s, visibility 0.18s;
}

.drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 9600;
  width: min(320px, 86vw);
  background: var(--bg-2);
  border-right: 2px solid var(--line-bright);
  box-shadow: 8px 0 30px rgba(0, 0, 0, 0.55);
  transform: translateX(-102%);
  transition: transform 0.22s ease;
  display: flex;
  flex-direction: column;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 2px solid var(--line);
  background: var(--panel);
}

.drawer-head .logo-text {
  font-size: 15px;
}

.drawer-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px 30px;
}

.drawer-section {
  margin-bottom: 18px;
}

.drawer-title {
  font-family: var(--font-head);
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--neon-cyan);
  margin-bottom: 10px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.drawer-en {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--text-faint);
}

.drawer-cats,
.drawer-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.drawer-cats a,
.drawer-tools a {
  font-family: var(--font-head);
  font-size: 13px;
  color: var(--text-dim);
  border: 1px solid var(--line);
  background: rgba(13, 19, 38, 0.6);
  padding: 9px 10px;
  text-align: center;
}

.drawer-cats a:hover,
.drawer-tools a:hover {
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
}

.drawer-user {
  border-top: 1px dashed var(--line);
  padding-top: 14px;
}

.drawer-points {
  background: var(--panel);
  border: 1px solid var(--line-bright);
  padding: 10px 12px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dp-label {
  font-size: 12px;
  color: var(--text-faint);
}

.drawer-points b {
  color: var(--neon-yellow);
  font-family: var(--font-pixel);
  font-size: 14px;
}

.dp-streak {
  font-size: 12px;
  color: var(--neon-magenta);
  margin-left: auto;
}

.drawer-user-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.drawer-login-tip {
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 10px;
}

body.drawer-open {
  overflow: hidden;
}

/* ---------- 快捷卡片 ---------- */

.quick-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 22px 0 8px;
}

.quick-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.quick-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.25);
}

.qc-icon {
  flex: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--neon-cyan);
  border: 2px solid var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.3);
  background: rgba(0, 240, 255, 0.06);
}

.qc-body b {
  display: block;
  font-family: var(--font-head);
  font-size: 14px;
  color: var(--text);
}

.qc-body small {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-faint);
}

/* ---------- 首页布局 ---------- */

.home-main {
  min-width: 0;
}

.home-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  margin-bottom: 26px;
}

.home-section {
  margin-bottom: 30px;
}

.hero-carousel {
  position: relative;
  min-height: 300px;
  overflow: hidden;
}

.carousel-viewport,
.carousel-slide {
  position: absolute;
  inset: 0;
}

.carousel-slide {
  background-size: cover;
  background-position: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0.45s;
}

.carousel-slide.active {
  opacity: 1;
  visibility: visible;
}

.carousel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 6, 16, 0.94) 0%, rgba(3, 6, 16, 0.72) 55%, rgba(3, 6, 16, 0.25) 100%);
}

.carousel-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 30px 42px;
}

.carousel-cat {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 11px;
  letter-spacing: 1px;
  border: 1px solid;
  padding: 3px 8px;
  margin-bottom: 12px;
}

.carousel-content h2 {
  font-family: var(--font-head);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 900;
  letter-spacing: 2px;
  text-shadow: 0 0 18px rgba(0, 240, 255, 0.45);
}

.carousel-content p {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--neon-magenta);
  letter-spacing: 2px;
  margin-top: 8px;
}

.carousel-tags {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.carousel-tags span {
  font-size: 12px;
  color: var(--text-dim);
  border: 1px solid var(--line-bright);
  padding: 3px 9px;
}

.carousel-btns {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 34px;
  height: 44px;
  background: rgba(5, 8, 18, 0.78);
  border: 2px solid var(--line-bright);
  color: var(--neon-cyan);
  font-size: 20px;
  cursor: pointer;
}

.carousel-nav:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.35);
}

.carousel-prev { left: 6px; }
.carousel-next { right: 6px; }

.carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  z-index: 4;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.carousel-dot {
  width: 22px;
  height: 6px;
  border: 1px solid var(--line-bright);
  background: rgba(13, 19, 38, 0.7);
  cursor: pointer;
  padding: 0;
}

.carousel-dot.active {
  background: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.6);
}

.signin-widget {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.signin-widget h2 {
  font-family: var(--font-head);
  font-size: 15px;
  letter-spacing: 2px;
  color: var(--neon-yellow);
  display: flex;
  align-items: center;
  gap: 8px;
}

.signin-widget h2::before {
  content: '◈';
  color: var(--neon-cyan);
}

.signin-points {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
}

.signin-points b {
  color: var(--neon-yellow);
  font-family: var(--font-pixel);
  font-size: 13px;
}

.signin-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.signin-days span {
  font-size: 10px;
  color: var(--text-faint);
  border: 1px solid var(--line);
  padding: 5px 2px;
  line-height: 1.4;
}

.signin-days span.done {
  color: var(--neon-green);
  border-color: var(--neon-green);
  background: rgba(57, 255, 136, 0.07);
}

.signin-actions {
  display: flex;
  gap: 8px;
}

.h-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.h-card {
  flex: none;
  width: 250px;
  scroll-snap-align: start;
}

.home-comments {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.home-comment {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: rgba(13, 19, 38, 0.55);
}

.hc-body {
  min-width: 0;
}

.hc-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hc-name {
  font-family: var(--font-head);
  font-size: 13px;
  color: var(--neon-cyan);
}

.hc-time {
  font-size: 11px;
  color: var(--text-faint);
}

.hc-text {
  font-size: 13px;
  color: #c3d3f2;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.hc-game {
  display: inline-block;
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 5px;
}

.hc-game:hover {
  color: var(--neon-magenta);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-link {
  cursor: pointer;
  transition: all 0.15s;
}

.tag-link:hover {
  color: var(--neon-yellow);
  border-color: var(--neon-yellow);
  box-shadow: 0 0 10px rgba(255, 211, 25, 0.3);
}

.recent-search {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.recent-search a {
  font-size: 13px;
  color: var(--text-dim);
  border-bottom: 1px dashed var(--line);
  padding: 4px 0;
}

.recent-search a:hover {
  color: var(--neon-cyan);
}

.panel-loading {
  color: var(--text-faint);
  font-family: var(--font-pixel);
  font-size: 10px;
  padding: 10px 0;
  animation: blink 1s infinite steps(1);
}

/* ---------- 面包屑 / 列表页 ---------- */

.breadcrumb {
  font-size: 13px;
  color: var(--text-faint);
  margin-bottom: 18px;
}

.breadcrumb a {
  color: var(--text-dim);
}

.breadcrumb a:hover {
  color: var(--neon-cyan);
}

.breadcrumb b {
  color: var(--neon-cyan);
  font-weight: 500;
}

.list-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 26px;
  align-items: start;
}

.list-main {
  min-width: 0;
}

.list-side,
.detail-side,
.home-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.sort-tabs {
  overflow-x: auto;
  flex-wrap: nowrap;
  scrollbar-width: none;
}

.sort-tabs::-webkit-scrollbar { display: none; }

.sort-tabs .tab {
  flex: none;
}

/* ---------- 排行榜页 ---------- */

.rank-page {
  padding: 8px 14px;
}

.rank-page-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 8px;
  border-bottom: 1px dashed var(--line);
  transition: background 0.15s;
}

.rank-page-item:hover {
  background: rgba(0, 240, 255, 0.05);
}

.rank-page-item:last-child {
  border-bottom: none;
}

.rank-big {
  font-size: 16px;
  width: 40px;
}

.rank-page-cover {
  width: 110px;
  height: 62px;
  object-fit: cover;
  image-rendering: pixelated;
  border: 1px solid var(--line-bright);
  flex-shrink: 0;
}

.rank-page-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rank-page-body b {
  font-family: var(--font-head);
  font-size: 15px;
  color: var(--text);
}

.rank-page-body small {
  color: var(--text-faint);
  font-size: 12px;
}

.rank-page-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---------- 详情页 ---------- */

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 26px;
  align-items: start;
}

.detail-main {
  min-width: 0;
}

.detail-head {
  display: flex;
  gap: 22px;
  padding: 20px;
  margin-bottom: 16px;
  align-items: flex-start;
}

.detail-cover {
  flex: none;
  width: 380px;
  border: 2px solid var(--line-bright);
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.12);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  image-rendering: pixelated;
}

.detail-info {
  min-width: 0;
  flex: 1;
}

.detail-rating-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 10px;
  flex-wrap: wrap;
}

.detail-score {
  font-family: var(--font-pixel);
  font-size: 16px;
  color: var(--neon-yellow);
  text-shadow: 0 0 10px rgba(255, 211, 25, 0.5);
}

.safe-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.safe-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--neon-green);
  border: 1px solid rgba(57, 255, 136, 0.4);
  background: rgba(57, 255, 136, 0.06);
  padding: 6px 12px;
}

.safe-badge i {
  font-style: normal;
  color: var(--neon-green);
}

.dl-panel {
  background: linear-gradient(180deg, rgba(0, 240, 255, 0.05), transparent);
}

.dl-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.dl-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 2px solid var(--neon-green);
  color: var(--neon-green);
  background: rgba(57, 255, 136, 0.08);
  padding: 13px 14px;
  font-family: var(--font-head);
  font-size: 14px;
  transition: all 0.15s;
}

.dl-item:hover {
  background: var(--neon-green);
  color: #03180b;
  box-shadow: 0 0 18px rgba(57, 255, 136, 0.4);
}

.dl-tag {
  font-size: 10px;
  font-style: normal;
  color: inherit;
  opacity: 0.8;
}

.score-box {
  text-align: center;
  padding: 8px 0;
}

.score-num {
  font-family: var(--font-pixel);
  font-size: 42px;
  color: var(--neon-yellow);
  text-shadow: 0 0 18px rgba(255, 211, 25, 0.55);
  line-height: 1.2;
}

.author-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.author-card .avatar {
  flex: none;
}

.author-body {
  min-width: 0;
}

.author-body b {
  font-family: var(--font-head);
  font-size: 15px;
  color: var(--neon-cyan);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.author-body p {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
}

.author-body small {
  font-size: 11px;
  color: var(--text-faint);
}

/* ---------- 评分星星 / 评论 ---------- */

.stars {
  color: var(--neon-yellow);
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(255, 211, 25, 0.4);
  white-space: nowrap;
}

.stars-xs { font-size: 11px; }
.stars-sm { font-size: 13px; }
.stars-md { font-size: 18px; }

.game-rating {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rating-num {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--text-faint);
}

.rating-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(13, 19, 38, 0.6);
  font-size: 13px;
}

.rating-pick {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-dim);
}

.rating-stars {
  display: inline-flex;
  gap: 2px;
}

.rate-star {
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-faint);
  padding: 0 1px;
  transition: color 0.12s, text-shadow 0.12s;
}

.rate-star:hover,
.rate-star.active {
  color: var(--neon-yellow);
  text-shadow: 0 0 10px rgba(255, 211, 25, 0.6);
}

.comment-stars {
  display: inline-flex;
}

/* ---------- 发布页下载方式编辑 ---------- */

.dl-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.dl-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 36px;
  gap: 8px;
  align-items: center;
}

/* ---------- 页脚 ---------- */

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(120px, 1fr));
  gap: 28px;
  padding: 30px 0;
}

.footer-col h4 {
  font-family: var(--font-head);
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--neon-cyan);
  margin-bottom: 12px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  text-align: center;
}

.footer-col a {
  font-size: 13px;
  color: var(--text-dim);
}

.footer-col a:hover {
  color: var(--neon-yellow);
}

/* ============================================================
   响应式
   ============================================================ */

@media (max-width: 1100px) {
  .header-top {
    gap: 10px;
  }

  .header-top .logo-text {
    font-size: 16px;
  }

  .header-top .main-nav a {
    padding: 7px 9px;
    font-size: 13px;
  }

  .header-top .header-search {
    max-width: 260px;
    min-width: 140px;
  }

  .home-top {
    grid-template-columns: 1fr;
  }

  .home-comments {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-layout,
  .list-layout,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .home-side,
  .list-side,
  .detail-side {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }

  .detail-cover {
    width: 320px;
  }
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .header-top {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
  }

  .header-top .logo {
    min-width: 0;
    justify-self: start;
  }

  .header-top .logo-text {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-top .logo-en {
    display: none;
  }

  .header-top .main-nav {
    display: none;
  }

  .header-top .header-search {
    grid-column: 1 / -1;
    order: 5;
    max-width: none;
    width: 100%;
    min-width: 0;
    display: none;
  }

  .header-top .header-user {
    justify-self: end;
    min-width: 0;
  }

  .header-top .header-user .btn {
    padding: 6px 8px;
    font-size: 12px;
  }

  .header-top .user-chip {
    padding: 3px 6px 3px 3px;
    gap: 5px;
  }

  .header-top .user-chip span {
    max-width: 56px;
  }

  .nav-cats {
    display: none;
  }

  .quick-cards {
    grid-template-columns: 1fr 1fr;
  }

  .home-top {
    grid-template-columns: 1fr;
  }

  .carousel-content {
    padding: 22px 34px;
  }

  .carousel-content h2 {
    font-size: 22px;
  }

  .h-card {
    width: 210px;
  }

  .detail-head {
    flex-direction: column;
    padding: 14px;
  }

  .detail-cover {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 22px;
  }

  .footer-brand .logo-text {
    gap: 7px;
    line-height: 1.55;
  }

  .footer-brand .logo-en {
    margin-top: 2px;
  }

  .footer-col {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 16px;
  }

  .footer-col h4 {
    flex-basis: 100%;
    margin-bottom: 2px;
  }

  .footer-col:last-child {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  .footer-col:last-child h4 {
    grid-column: 1 / -1;
  }

  .footer-col:last-child a {
    justify-self: center;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .rank-page-cover {
    width: 90px;
    height: 52px;
  }

  .rank-page-body b {
    font-size: 13px;
  }

  .dl-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .quick-cards {
    grid-template-columns: 1fr;
  }

  .hero-carousel {
    min-height: 250px;
  }

  .carousel-btns .btn {
    font-size: 12px;
    padding: 8px 12px;
  }

  .h-card {
    width: 170px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-brand {
    grid-column: auto;
  }

  .rank-page-item {
    gap: 10px;
  }
}

/* ---------- 验证码 / 第三方登录 ---------- */

.captcha-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.captcha-row input {
  flex: 1;
  min-width: 120px;
}

.captcha-img {
  width: 130px;
  height: 46px;
  flex: none;
  border: 2px solid var(--line-bright);
  cursor: pointer;
  image-rendering: pixelated;
}

.captcha-img:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
}

.oauth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 10px;
  color: var(--text-faint);
  font-size: 12px;
}

.oauth-divider::before,
.oauth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.oauth-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.oauth-block {
  border: 1px solid var(--line);
  padding: 10px 12px;
  margin-bottom: 12px;
  background: rgba(13, 19, 38, 0.4);
}

.oauth-block .hint {
  word-break: break-all;
}
