/* ==========================================================================
   PLAYGROUND GAMING HUB · 全新成熟游戏平台设计系统
   Inspired by Steam / Epic Games / GOG Galaxy / Xbox Game Pass
   ========================================================================== */

:root, body.theme-slate {
  /* 默认模式：通透科技蓝灰 (Slate & Steel) - 舒适通透、层次分明、告别压抑死黑 */
  --bg-deep: #141c2c;
  --bg-base: #182236;
  --bg-sidebar: #1b273d;
  --bg-surface: #22324e;
  --bg-surface-hover: #2b3e60;
  --bg-card: #202e48;
  --bg-card-hover: #283a5a;
  --bg-dialog: #1a253a;

  /* 线条与边缘 */
  --line-subtle: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);
  --line-highlight: rgba(56, 189, 248, 0.45);

  /* 文字层次 */
  --text-primary: #ffffff;
  --text-secondary: #d3e1f2;
  --text-muted: #95accc;
  --text-dim: #6d85a6;

  /* 主题与强调色 */
  --accent-cyan: #38bdf8;
  --accent-cyan-glow: rgba(56, 189, 248, 0.4);
  --accent-blue: #0284c7;
  --accent-indigo: #818cf8;
  --accent-purple: #c084fc;
  --accent-green: #10b981;
  --accent-green-glow: rgba(16, 185, 129, 0.35);
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-orange: #f97316;

  /* 尺寸与阴影 */
  --sidebar-w: 248px;
  --topbar-h: 74px;
  --radius-xs: 8px;
  --radius-sm: 14px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 30px;
  --radius-pill: 9999px;
  --radius-btn: 9999px;
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.45);
  --shadow-hover: 0 18px 36px -8px rgba(0, 0, 0, 0.55), 0 0 24px rgba(56, 189, 248, 0.22);
  --shadow-dialog: 0 25px 70px -15px rgba(0, 0, 0, 0.75);

  /* 字体家族 */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-deep);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* 白昼明亮主机模式 (Nintendo Switch / Apple Arcade / TapTap 日间风) */
body.theme-light {
  --bg-deep: #ebf1f8;
  --bg-base: #f4f7fb;
  --bg-sidebar: #ffffff;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f1f5fa;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-dialog: #ffffff;

  --line-subtle: #e2e8f0;
  --line-strong: #cbd5e1;
  --line-highlight: rgba(2, 132, 199, 0.35);

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-dim: #94a3b8;

  --shadow-card: 0 4px 18px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 16px 32px rgba(15, 23, 42, 0.12), 0 0 20px rgba(56, 189, 248, 0.25);
  --shadow-dialog: 0 25px 60px rgba(15, 23, 42, 0.2);
}

/* 深邃暗夜模式 (Midnight Cyber Dark) */
body.theme-dark {
  --bg-deep: #080c14;
  --bg-base: #0c101a;
  --bg-sidebar: #0f1422;
  --bg-surface: #141b2d;
  --bg-surface-hover: #1b243b;
  --bg-card: #131929;
  --bg-card-hover: #192238;
  --bg-dialog: #101626;

  --line-subtle: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);
  --line-highlight: rgba(56, 189, 248, 0.35);

  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #8896ab;
  --text-dim: #53627a;
}

/* 全局重置与基础样式 */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 50% 0%, #293d60 0%, var(--bg-deep) 78%);
  color: var(--text-primary);
  overflow-x: hidden;
  transition: background 0.25s ease, color 0.25s ease;
}

body.theme-light {
  background: radial-gradient(circle at 50% 0%, #dbe7f5 0%, #ebf1f8 75%);
}

body.theme-dark {
  background: radial-gradient(circle at 50% 0%, #151e36 0%, #080c14 65%);
}

/* 白昼明亮模式专属适配 */
body.theme-light .topbar {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid #e2e8f0;
}
body.theme-light .search {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #64748b;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
body.theme-light .search:focus-within {
  background: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.22);
  color: #0284c7;
}
body.theme-light .search input {
  color: #0f172a;
}
body.theme-light .search kbd {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #64748b;
}
body.theme-light .sidebar {
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
}
body.theme-light .sidebar-system-card {
  background: #f8fafc;
  border-color: #e2e8f0;
}
body.theme-light .nav-item {
  color: #475569;
}
body.theme-light .nav-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}
body.theme-light .nav-item.active {
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.15), rgba(56, 189, 248, 0.03));
  color: #0284c7;
}
body.theme-light .game-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}
body.theme-light .game-card:hover {
  border-color: #38bdf8;
  background: #ffffff;
}
body.theme-light .card-art {
  background: #f1f5f9;
}
body.theme-light .stat-pill {
  background: #ffffff;
  border-color: #e2e8f0;
}
body.theme-light .filter-chip {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #475569;
}
body.theme-light .filter-chip:hover {
  background: #f8fafc;
  color: #0f172a;
}
body.theme-light .list-row {
  background: #ffffff;
  border-color: #e2e8f0;
}
body.theme-light .list-row:hover {
  background: #f8fafc;
  border-color: #38bdf8;
}
body.theme-light .empty-state {
  background: #ffffff;
  border-color: #cbd5e1;
}
body.theme-light .planned-card {
  background: #ffffff;
  border-color: #e2e8f0;
}
body.theme-light .platform-footer {
  border-top-color: #e2e8f0;
}
body.theme-light .dialog-controls-box {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #334155;
}
body.theme-light .spec-cell {
  background: #f8fafc;
  border-color: #e2e8f0;
}
body.theme-light .spec-cell strong {
  color: #0f172a;
}
body.theme-light .hero {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}
body.theme-light .welcome h1 {
  color: #0f172a;
}
body.theme-light .welcome h1 span {
  color: #64748b;
}
body.theme-light .welcome p {
  color: #475569;
}
body.theme-light .heading-left h2 {
  color: #0f172a;
}
body.theme-light .heading-left p {
  color: #64748b;
}
body.theme-light .breadcrumb strong {
  color: #0f172a;
}
body.theme-light .breadcrumb-root {
  color: #64748b;
}
body.theme-light .card-title-row h3 {
  color: #0f172a;
}
body.theme-light .card-description {
  color: #475569;
}
body.theme-light .stat-num strong {
  color: #0f172a;
}
body.theme-light .resume-card {
  background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
  border: 1px solid #bae6fd;
  border-left: 4px solid #0284c7;
  box-shadow: 0 8px 24px -4px rgba(2, 132, 199, 0.12), 0 2px 6px rgba(15, 23, 42, 0.04);
}
body.theme-light .resume-card strong {
  color: #0f172a;
}
body.theme-light .resume-card p {
  color: #475569;
}
body.theme-light .secondary-button {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #1e293b;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05), inset 0 1px 0 #ffffff;
}
body.theme-light .secondary-button:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}
body.theme-light .launch-button {
  background: #e0f2fe;
  color: #0284c7;
  border-color: #7dd3fc;
}
body.theme-light .launch-button:hover {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}
body.theme-light .sort-label {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #475569;
}
body.theme-light .sort-label select {
  color: #0f172a;
}
body.theme-light .sort-label select option {
  background: #ffffff;
  color: #0f172a;
}
body.theme-light .icon-action-btn {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #475569;
}
body.theme-light .icon-action-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}
body.theme-light .view-mode-group {
  background: #ffffff;
  border-color: #cbd5e1;
}
body.theme-light .feature-chip {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #475569;
}
body.theme-light .feature-chip.active {
  background: #e0f2fe;
  color: #0284c7;
  border-color: #7dd3fc;
}
body.theme-light .planned-card strong {
  color: #0f172a;
}
body.theme-light .planned-card small {
  color: #64748b;
}
body.theme-light .planned-icon {
  background: #e0f2fe;
}
body.theme-light .tags span {
  background: #f1f5f9;
  color: #64748b;
  border-color: #e2e8f0;
}
body.theme-light .meta-chip {
  background: #f1f5f9;
  color: #475569;
  border-color: #e2e8f0;
}
body.theme-light .list-title {
  color: #0f172a;
}
body.theme-light .list-subtitle {
  color: #64748b;
}
body.theme-light .card-duration {
  color: #64748b;
}

/* 现代滚动条 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: #25314a;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #364668;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button, a, select {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
  background: transparent;
  padding: 0;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
}

svg {
  width: 19px;
  height: 19px;
  vertical-align: middle;
  flex-shrink: 0;
}

[hidden] {
  display: none !important;
}

/* ==========================================================================
   页面框架布局 (LAYOUT)
   ========================================================================== */

.layout {
  display: flex;
  min-height: 100vh;
}

/* 侧边导航栏 */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  padding: 24px 16px 20px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--line-subtle);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 20;
  backdrop-filter: blur(20px);
}

/* 平台品牌 Logo */
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 6px 10px 20px;
  margin-bottom: 8px;
}

.brand-icon {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  border-radius: 12px;
  box-shadow: 0 4px 18px var(--accent-cyan-glow);
  flex-shrink: 0;
}

.brand-icon img {
  width: 26px;
  height: 26px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.brand-pulse {
  position: absolute;
  inset: -3px;
  border-radius: 15px;
  border: 1px solid var(--accent-cyan);
  opacity: 0.35;
  animation: pulse-ring 3s infinite ease-out;
}

@keyframes pulse-ring {
  0% { transform: scale(0.96); opacity: 0.5; }
  50% { transform: scale(1.04); opacity: 0.15; }
  100% { transform: scale(0.96); opacity: 0.5; }
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 1.5px;
  background: linear-gradient(135deg, #fff, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.brand-sub small {
  font-size: 8px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #fff;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

/* 玩家信息卡片 (侧边栏) */
.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-user-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(56, 189, 248, 0.25);
}

.user-avatar-wrap {
  position: relative;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.status-indicator.online {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-green);
  border: 2px solid var(--bg-sidebar);
}

.user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-level {
  font-size: 10px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
}

.badge-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border-radius: var(--radius-pill);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

/* 导航项 */
.nav-caption {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--text-dim);
  margin: 0 10px 10px;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  margin: 2px 0;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  transition: all 0.18s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  transform: translateX(2px);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.16), rgba(56, 189, 248, 0.04));
  color: var(--accent-cyan);
  font-weight: 600;
  border-left: 3px solid var(--accent-cyan);
  padding-left: 14px;
}

.nav-dot {
  display: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  margin-left: auto;
  box-shadow: 0 0 8px var(--accent-cyan);
}

.nav-item.active .nav-dot {
  display: block;
}

.nav-number {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
}

.nav-item.active .nav-number {
  background: rgba(56, 189, 248, 0.2);
  color: var(--accent-cyan);
}

.nav-tag {
  margin-left: auto;
  font-size: 9px;
  font-weight: 800;
  background: linear-gradient(135deg, #f43f5e, #fb7185);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 2px 7px;
  letter-spacing: 0.5px;
}

.sidebar-line {
  height: 1px;
  background: var(--line-subtle);
  margin: 18px 8px;
}

/* 侧边栏底部状态 */
.sidebar-bottom {
  margin-top: auto;
  padding-top: 18px;
}

.sidebar-system-card {
  padding: 12px 14px;
  background: rgba(16, 22, 38, 0.8);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
}

.sys-header {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--text-secondary);
}

.sys-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green);
}

.sys-desc {
  font-size: 10px;
  color: var(--text-dim);
  margin: 4px 0 8px;
}

.sys-stats {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 9px;
  color: var(--text-muted);
}

.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.about-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 12px;
  transition: all 0.16s ease;
}

.about-button:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.about-button .arrow {
  margin-left: auto;
  font-size: 11px;
  opacity: 0.6;
}

/* ==========================================================================
   主工作区 & 顶栏 (TOPBAR)
   ========================================================================== */

.main-wrap {
  width: calc(100% - var(--sidebar-w));
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 36px;
  background: rgba(12, 16, 26, 0.85);
  border-bottom: 1px solid var(--line-subtle);
  position: sticky;
  top: 0;
  z-index: 15;
  backdrop-filter: blur(20px);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

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

.breadcrumb strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* 全局搜索框 */
.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-pill);
  padding: 9px 18px;
  width: 320px;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: var(--text-muted);
}

.search:focus-within {
  border-color: var(--accent-cyan);
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.2);
  width: 360px;
  color: var(--accent-cyan);
}

.search input {
  border: 0;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 12px;
  color: var(--text-primary);
}

.search input::placeholder {
  color: var(--text-dim);
}

.search-clear-btn {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: all 0.16s ease;
}

.search-clear-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.12);
}

.search kbd {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  font-size: 10px;
  padding: 2px 8px;
  color: var(--text-muted);
  font-family: inherit;
}

/* 顶栏操作区 */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.view-mode-group {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-pill);
  padding: 3px;
}

.view-toggle-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 30px;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  transition: all 0.16s ease;
}

.view-toggle-btn.active {
  background: rgba(56, 189, 248, 0.2);
  color: var(--accent-cyan);
}

.icon-action-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-subtle);
  color: var(--text-secondary);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.icon-action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px) scale(1.05);
}

.icon-action-btn:active {
  transform: scale(0.92);
}

.local-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-green);
  white-space: nowrap;
}

.live-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.header-avatar {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-avatar:hover {
  transform: scale(1.06);
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.5);
}

/* ==========================================================================
   页面主内容区 (MAIN CONTENT)
   ========================================================================== */

main {
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  padding: 30px 36px 60px;
  flex: 1;
}

/* 欢迎横幅 */
.welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--accent-cyan);
  text-transform: uppercase;
}

.eyebrow svg {
  width: 14px;
  height: 14px;
}

.welcome h1 {
  font-size: 26px;
  font-weight: 800;
  margin: 8px 0 6px;
  letter-spacing: 0.5px;
}

.welcome h1 span {
  font-size: 18px;
  color: var(--text-muted);
  font-weight: 600;
}

.welcome p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.welcome-stats {
  display: flex;
  gap: 14px;
}

.stat-pill {
  background: var(--bg-surface);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  text-align: right;
  min-width: 130px;
}

.stat-num strong {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-num span {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 6px;
}

.stat-pill small {
  display: block;
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 3px;
}

/* ==========================================================================
   快速回归条 (RESUME STRIP) - STEAM 风格
   ========================================================================== */

.resume-strip {
  margin-bottom: 24px;
}

.resume-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(90deg, #131b2e, #18223a);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-left: 4px solid var(--accent-cyan);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.resume-card strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  margin: 6px 0 4px;
  color: var(--text-primary);
}

.resume-card p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.resume-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

/* ==========================================================================
   精选焦点大展台 (HERO SPOTLIGHT CAROUSEL)
   Steam & Epic Games 焦点展位风格
   ========================================================================== */

.hero {
  position: relative;
  min-height: 380px;
  background: linear-gradient(135deg, #22324e 0%, #2b3e5f 60%, #1c293f 100%);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-card);
  margin-bottom: 32px;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  filter: blur(20px);
  pointer-events: none;
}

.hero-spotlight-glow {
  position: absolute;
  top: -50%;
  left: 30%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.14) 0%, transparent 60%);
  pointer-events: none;
}

.hero-copy {
  padding: 36px 44px;
  position: relative;
  z-index: 2;
  max-width: 620px;
}

.hero-top-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
}

.hero-rating {
  font-size: 11px;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 4px 9px;
  border-radius: 20px;
}

.hero-tag-chip {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-indigo);
  background: rgba(129, 140, 248, 0.12);
  border: 1px solid rgba(129, 140, 248, 0.3);
  padding: 4px 9px;
  border-radius: 20px;
}

.hero h2 {
  font-size: 36px;
  line-height: 1.25;
  font-weight: 850;
  letter-spacing: 0.5px;
  margin: 0 0 12px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0 0 18px;
}

.hero-tags-row {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.hero-tags-row span {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  border-radius: 5px;
  padding: 3px 8px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.hero-cta-btn {
  font-size: 13px;
  font-weight: 750;
  padding: 13px 28px;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 18px rgba(2, 132, 199, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -2px 0 rgba(0, 0, 0, 0.15);
  letter-spacing: 0.3px;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, background 0.2s ease;
}

.hero-cta-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.hero-cta-btn:active {
  transform: translateY(1px) scale(0.97);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-sub-btn {
  font-size: 13px;
  font-weight: 650;
  padding: 13px 24px;
  border-radius: var(--radius-pill);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, background 0.2s ease;
}

.hero-sub-btn:hover {
  transform: translateY(-2px);
}

.hero-sub-btn:active {
  transform: translateY(1px) scale(0.97);
}

.icon-glass-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text-secondary);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.18s ease, color 0.18s ease;
}

.icon-glass-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  transform: translateY(-1px) scale(1.05);
}

.icon-glass-btn:active {
  transform: scale(0.92);
}

.hero-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.hero-foot-spark {
  color: var(--accent-cyan);
}

.hero-visual {
  position: absolute;
  right: 28px;
  top: 15px;
  bottom: 15px;
  width: 52%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.hero-art {
  max-width: 95%;
  max-height: 330px;
  object-fit: contain;
  filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.7));
  transition: transform 0.5s ease;
}

/* 焦点轮播缩略图选择器 (右下角切换) */
.hero-carousel-nav {
  position: absolute;
  bottom: 18px;
  right: 24px;
  display: flex;
  gap: 8px;
  z-index: 5;
}

.hero-nav-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  transition: all 0.2s ease;
}

.hero-nav-dot.active {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  transform: scale(1.3);
  box-shadow: 0 0 10px var(--accent-cyan);
}

/* ==========================================================================
   按钮通用规范 (BUTTON STYLES)
   ========================================================================== */

.primary-button {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 10px 22px;
  font-size: 12px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -2px 0 rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s ease, background 0.18s ease;
}

.primary-button:hover {
  background: linear-gradient(135deg, #0369a1, #0284c7);
  box-shadow: 0 7px 22px rgba(2, 132, 199, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transform: translateY(-2px);
}

.primary-button:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.secondary-button {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  padding: 10px 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.secondary-button:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.secondary-button:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   游戏库列表与筛选 (LIBRARY SECTION)
   ========================================================================== */

.library-section {
  margin-top: 24px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.heading-left h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
}

.heading-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-cyan);
}

.heading-left p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.heading-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* 特色快捷标签 */
.quick-feature-tags {
  display: flex;
  gap: 6px;
}

.feature-chip {
  font-size: 11px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-subtle);
  color: var(--text-muted);
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.16s ease, color 0.16s ease;
}

.feature-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.feature-chip:active {
  transform: scale(0.95);
}

.feature-chip.active {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border-color: rgba(56, 189, 248, 0.35);
  font-weight: 600;
}

/* 排序下拉框 */
.sort-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 11px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  transition: border-color 0.16s ease;
}

.sort-label:hover {
  border-color: rgba(56, 189, 248, 0.35);
}

.sort-label svg {
  width: 14px;
  height: 14px;
}

.sort-label select {
  font-size: 11px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  outline: none;
}

.sort-label select option {
  background: var(--bg-surface);
  color: var(--text-primary);
}

/* 类型筛选药丸条 */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.filter-chip {
  font-size: 12px;
  padding: 8px 18px;
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.filter-chip span {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  padding: 1px 7px;
  color: var(--text-muted);
}

.filter-chip:hover {
  background: var(--bg-surface-hover);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: translateY(-1px);
}

.filter-chip:active {
  transform: scale(0.96);
}

.filter-chip.active {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #fff;
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 4px 14px var(--accent-cyan-glow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.filter-chip.active span {
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
}

/* ==========================================================================
   游戏卡片 (STEAM CAPSULE POSTER CARDS)
   ========================================================================== */

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.game-card {
  border: 1px solid var(--line-subtle);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.game-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: var(--shadow-hover);
  background: var(--bg-card-hover);
}

/* 封面区 (16:10 胶囊比例) */
.card-art {
  height: 180px;
  position: relative;
  overflow: hidden;
  background: #111827;
}

.card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.3s ease;
}

.game-card:hover .card-art img {
  transform: scale(1.06);
}

/* 悬停快速启动浮层 (Steam 快捷游玩体验) */
.card-hover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12, 16, 26, 0.9) 0%, rgba(12, 16, 26, 0.2) 60%, transparent 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.game-card:hover .card-hover-overlay {
  opacity: 1;
  pointer-events: auto;
}

.quick-launch-cta {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 11px 24px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 20px var(--accent-cyan-glow), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transform: translateY(10px);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.game-card:hover .quick-launch-cta {
  transform: translateY(0);
}

.quick-launch-cta:active {
  transform: scale(0.96);
}

/* 角标与收藏按钮 */
.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  color: #fff;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 600;
  z-index: 2;
}

.card-rating-badge {
  position: absolute;
  bottom: 10px;
  left: 12px;
  color: #fbbf24;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-pill);
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  z-index: 2;
}

.favorite-button {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  backdrop-filter: blur(8px);
  z-index: 3;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.18s ease, color 0.18s ease;
}

.favorite-button:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: scale(1.1);
}

.favorite-button:active {
  transform: scale(0.92);
}

.favorite-button.selected {
  background: rgba(244, 63, 94, 0.2);
  border-color: rgba(244, 63, 94, 0.5);
  color: var(--accent-rose);
}

.favorite-button.selected svg {
  fill: var(--accent-rose);
}

/* 卡片信息区 */
.card-info {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.card-title-row h3 {
  font-size: 15px;
  font-weight: 750;
  letter-spacing: 0.3px;
  margin: 0;
  color: var(--text-primary);
}

.detail-button {
  color: var(--text-muted);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.detail-button:hover {
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.12);
  transform: scale(1.08);
}

.detail-button:active {
  transform: scale(0.92);
}

.card-description {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0 0 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 元数据与芯片 */
.meta-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.meta-chip {
  font-size: 9px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--line-subtle);
}

.meta-chip.ok {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-green);
  border-color: rgba(16, 185, 129, 0.25);
}

.meta-chip.warn {
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-amber);
  border-color: rgba(245, 158, 11, 0.25);
}

.tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tags span {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
  border-radius: var(--radius-pill);
  font-size: 9px;
  padding: 2px 8px;
}

.card-bottom {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-duration {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--text-dim);
}

.card-duration svg {
  width: 13px;
  height: 13px;
}

.launch-button {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.launch-button:hover {
  background: var(--accent-cyan);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px var(--accent-cyan-glow);
  transform: translateY(-1px);
}

.launch-button:active {
  transform: scale(0.95);
}

/* ==========================================================================
   详细列表视图 (LIST VIEW) - STEAM LIBRARY 模式
   ========================================================================== */

.game-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.list-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  background: var(--bg-card);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.list-row:hover {
  background: var(--bg-card-hover);
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateX(4px);
}

.list-thumb {
  width: 68px;
  height: 44px;
  border-radius: 6px;
  overflow: hidden;
  background: #111;
  flex-shrink: 0;
}

.list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.list-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.list-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.list-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

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

/* ==========================================================================
   空状态 (EMPTY STATE)
   ========================================================================== */

.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-card);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  margin: 20px 0;
}

.empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
}

.empty-icon svg {
  width: 26px;
  height: 26px;
}

.empty-state h3 {
  font-size: 16px;
  margin: 0 0 8px;
}

.empty-state p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 20px;
}

/* ==========================================================================
   新游筹备路线图 (UPCOMING RELEASES)
   ========================================================================== */

.planned-section {
  margin-top: 48px;
}

.outline-label {
  font-size: 10px;
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.08);
  border-radius: 12px;
  padding: 2px 8px;
  font-weight: 600;
}

.planned-note {
  font-size: 11px;
  color: var(--text-muted);
}

.planned-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.planned-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: left;
  width: 100%;
  transition: all 0.2s ease;
}

.planned-card:hover {
  background: var(--bg-card);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
}

.planned-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.planned-card strong {
  font-size: 13px;
  display: block;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.planned-card small {
  font-size: 10px;
  color: var(--text-muted);
}

.planned-tag {
  font-size: 10px;
  color: var(--text-dim);
  margin-left: auto;
  white-space: nowrap;
}

/* ==========================================================================
   页脚 (FOOTER)
   ========================================================================== */

.platform-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 36px 0 20px;
  margin-top: 48px;
  border-top: 1px solid var(--line-subtle);
  flex-wrap: wrap;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-logo {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  display: grid;
  place-items: center;
  font-size: 11px;
  color: #fff;
  font-weight: 800;
}

.footer-brand small {
  font-size: 9px;
  color: var(--accent-cyan);
  margin-left: 4px;
}

.footer-left p {
  font-size: 11px;
  color: var(--text-dim);
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: var(--text-muted);
}

.footer-credit {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text-dim);
}

/* ==========================================================================
   全屏游戏游玩控制台 (IN-GAME OVERLAY PLAYER)
   Steam Big Picture & Steam Deck 顶栏风格
   ========================================================================== */

.player {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 50;
  display: flex;
  flex-direction: column;
}

.player-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 64px;
  padding: 0 24px;
  background: rgba(15, 20, 32, 0.95);
  border-bottom: 1px solid var(--line-strong);
  flex-shrink: 0;
  backdrop-filter: blur(16px);
  z-index: 10;
}

.player-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.18s ease, border-color 0.18s ease;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateX(-2px);
}

.back-btn:active {
  transform: scale(0.95);
}

.back-btn kbd {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-pill);
  padding: 1px 7px;
  font-size: 9px;
  color: var(--text-muted);
}

.player-title-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-title-box strong {
  font-size: 15px;
  font-weight: 750;
  color: #fff;
}

.player-genre-badge {
  font-size: 10px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

/* 游戏内 HUD 状态栏 */
.player-status-hud {
  display: flex;
  align-items: center;
  gap: 18px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-pill);
  padding: 6px 18px;
}

.hud-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.hud-active {
  color: var(--accent-green);
  font-weight: 600;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulse 1.5s infinite;
}

.hud-timer {
  font-family: monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.hud-save small {
  color: var(--text-dim);
}

/* 游戏内右侧控制 */
.player-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-subtle);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.player-tool-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.player-tool-btn:active {
  transform: scale(0.95);
}

.player-body {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #000;
}

#frame-host {
  width: 100%;
  height: 100%;
}

#frame-host iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* 游戏启动加载动画 (Cyber Loader) */
.player-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #080c14;
  z-index: 5;
}

.cyber-spinner {
  position: relative;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}

.spinner-ring {
  position: absolute;
  inset: 0;
  border: 3px solid rgba(56, 189, 248, 0.15);
  border-top-color: var(--accent-cyan);
  border-right-color: var(--accent-indigo);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner-core {
  font-size: 26px;
  filter: drop-shadow(0 0 10px var(--accent-cyan));
}

.loader-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.loader-sub {
  font-size: 11px;
  color: var(--text-dim);
}

/* 错误状态恢复卡片 */
.player-error-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-dialog);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  text-align: center;
  box-shadow: var(--shadow-dialog);
  max-width: 440px;
  z-index: 6;
}

.error-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.player-error-card h3 {
  font-size: 18px;
  margin: 0 0 8px;
}

.player-error-card p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 20px;
}

.error-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ==========================================================================
   弹窗对话框 (DIALOGS) - STEAM STORE 页面风格
   ========================================================================== */

dialog {
  border: 1px solid var(--line-strong);
  background: var(--bg-dialog);
  border-radius: var(--radius-xl);
  color: var(--text-primary);
  box-shadow: var(--shadow-dialog);
  padding: 0;
  overflow: hidden;
}

dialog::backdrop {
  background: rgba(5, 8, 15, 0.82);
  backdrop-filter: blur(12px);
}

.game-store-dialog {
  width: min(720px, calc(100% - 32px));
  max-height: 88vh;
}

.dialog-close-btn {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  font-size: 18px;
  color: var(--text-muted);
  z-index: 10;
  transition: all 0.16s ease;
}

.dialog-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: rotate(90deg);
}

.dialog-body {
  padding: 32px 36px 36px;
  overflow-y: auto;
  max-height: calc(88vh - 40px);
}

/* 详情弹窗结构 */
.dialog-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--accent-cyan);
  text-transform: uppercase;
  display: block;
}

.dialog-title {
  font-size: 26px;
  font-weight: 850;
  letter-spacing: 0.5px;
  margin: 8px 0 14px;
}

.dialog-store-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.dialog-copy {
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin: 0 0 20px;
}

.dialog-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
  margin: 22px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 按键指南 (KBD 键位高亮) */
.dialog-controls-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 12px;
  line-height: 1.9;
  color: var(--text-secondary);
}

.dialog-controls-box kbd {
  background: linear-gradient(to bottom, #2b354c, #1a2233);
  border: 1px solid #4a597a;
  box-shadow: 0 2px 0 #0d121c;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 11px;
  font-family: inherit;
  font-weight: 700;
  color: #fff;
  margin: 0 3px;
  display: inline-block;
}

/* 系统配置与存档说明箱 */
.dialog-spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.spec-cell {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.spec-cell span {
  font-size: 10px;
  color: var(--text-dim);
  display: block;
}

.spec-cell strong {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  display: block;
}

.dialog-actions-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line-subtle);
}

/* 更新日志列表 */
.update-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.update-item {
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

/* 玩家资料弹窗 */
.profile-dialog {
  width: min(540px, calc(100% - 32px));
}

.profile-dialog-content {
  padding: 32px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.profile-big-avatar {
  width: 58px;
  height: 58px;
  font-size: 20px;
}

.profile-header h2 {
  font-size: 20px;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-header p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}

.pstat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  text-align: center;
}

.pstat-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent-cyan);
  display: block;
}

.pstat-lbl {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 4px;
  display: block;
}

.profile-tips {
  background: rgba(56, 189, 248, 0.06);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}

.profile-tips h4 {
  font-size: 12px;
  color: var(--accent-cyan);
  margin: 0 0 6px;
}

.profile-tips p {
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

.account-panel {
  margin: 0 0 22px;
  padding: 18px;
  border: 1px solid var(--line-highlight);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08), rgba(129, 140, 248, 0.04));
}

.account-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.account-panel-heading h3 {
  margin: 0 0 4px;
  color: var(--text-primary);
  font-size: 15px;
}

.account-panel-heading p,
.account-signed-in p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.55;
}

.account-shield {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.12);
  font-size: 18px;
}

.account-form {
  display: grid;
  gap: 12px;
}

.account-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line-subtle);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.08);
}

.account-mode-switch button {
  min-height: 36px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  cursor: pointer;
}

.account-mode-switch button.active {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.account-field {
  display: grid;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.account-field input {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: none;
  background: var(--bg-base);
  color: var(--text-primary);
  font: inherit;
}

.account-field input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px var(--accent-cyan-glow);
}

.account-import-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
  cursor: pointer;
}

.account-import-row input {
  margin: 2px 0 0;
  accent-color: var(--accent-cyan);
}

.account-submit {
  width: 100%;
  justify-content: center;
}

.account-form button:disabled,
.account-signed-in button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.account-security-note {
  margin: -2px 0 0;
  color: var(--text-dim);
  font-size: 10px;
  line-height: 1.6;
}

.account-signed-in {
  display: grid;
  gap: 12px;
}

.account-signed-in .secondary-button {
  justify-content: center;
}

.mobile-brand {
  display: none;
}

@media (max-width: 600px) {
  .profile-dialog-content {
    padding: 22px 18px;
  }

  .account-panel {
    padding: 14px;
  }
}

/* ==========================================================================
   全局通知浮条 (TOAST NOTIFICATIONS)
   ========================================================================== */

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%, 20px);
  z-index: 100;
  padding: 12px 24px;
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #fff;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 18px rgba(56, 189, 248, 0.2);
  font-size: 12px;
  font-weight: 550;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 90vw;
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ==========================================================================
   响应式断点适配 (RESPONSIVE MEDIA QUERIES)
   ========================================================================== */

/* 超大宽屏 (4K / 2K 显示器) */
@media (min-width: 1550px) {
  .game-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .hero {
    min-height: 420px;
  }
  .hero h2 {
    font-size: 42px;
  }
  .hero-art {
    max-height: 380px;
  }
}

/* 中等桌面端屏幕 (1200px - 1400px) */
@media (max-width: 1280px) {
  :root {
    --sidebar-w: 220px;
  }
  main {
    padding: 24px 28px 48px;
  }
  .topbar {
    padding: 0 28px;
  }
  .search {
    width: 260px;
  }
  .search:focus-within {
    width: 290px;
  }
  .hero {
    min-height: 350px;
  }
  .hero-copy {
    padding: 28px 32px;
  }
  .hero h2 {
    font-size: 32px;
  }
}

/* 平板横屏 / 紧凑笔记本 (980px - 1199px) */
@media (max-width: 1024px) {
  :root {
    --sidebar-w: 200px;
  }
  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero-visual {
    width: 48%;
    opacity: 0.8;
  }
  .planned-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .welcome-stats {
    display: none;
  }
}

/* 平板竖屏及小屏幕 (700px - 979px) */
@media (max-width: 768px) {
  :root {
    --sidebar-w: 0px;
    --topbar-h: 64px;
  }

  .layout {
    display: block;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 14px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line-subtle);
  }

  .sidebar-user-card,
  .nav-caption,
  .sidebar-line,
  #category-nav,
  .sidebar-bottom {
    display: none;
  }

  #main-nav {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  #main-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    padding: 8px 12px;
    white-space: nowrap;
    width: auto;
    font-size: 12px;
    flex-shrink: 0;
  }

  .nav-item.active {
    border-left: 0;
    border-bottom: 2px solid var(--accent-cyan);
  }

  .main-wrap {
    width: 100%;
    margin-left: 0;
  }

  .topbar {
    padding: 0 16px;
    gap: 10px;
  }

  .breadcrumb {
    display: none;
  }

  .view-mode-group {
    display: none;
  }

  .local-badge .badge-text {
    display: none;
  }

  .local-badge {
    padding: 6px 8px;
  }

  .search {
    width: 100%;
    margin: 0;
    padding: 7px 12px;
  }

  .search:focus-within {
    width: 100%;
  }

  main {
    padding: 20px 16px 40px;
  }

  .hero {
    flex-direction: column;
    min-height: auto;
    padding-bottom: 20px;
  }

  .hero-copy {
    padding: 22px 18px;
    max-width: 100%;
  }

  .hero h2 {
    font-size: 24px;
  }

  .hero-cta-group {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
  }

  .hero-cta-btn {
    padding: 10px 16px;
    font-size: 12px;
    white-space: nowrap;
  }

  .hero-sub-btn {
    padding: 10px 14px;
    font-size: 12px;
    white-space: nowrap;
  }

  .icon-glass-btn {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
  }

  .hero-visual {
    position: static;
    width: 100%;
    height: 170px;
    opacity: 0.75;
  }

  .hero-art {
    max-height: 160px;
  }

  .hero-carousel-nav {
    bottom: 12px;
    right: 18px;
  }

  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .card-art {
    height: 150px;
  }

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

  .player-toolbar {
    padding: 0 12px;
    gap: 8px;
    height: 58px;
  }

  .player-status-hud .hud-save {
    display: none;
  }

  .player-tool-btn .btn-text {
    display: none;
  }
}

/* 手机竖屏尺寸 (< 480px) */
@media (max-width: 480px) {
  .game-grid {
    grid-template-columns: 1fr;
  }

  .welcome h1 {
    font-size: 20px;
  }

  .welcome p {
    font-size: 11px;
  }

  .heading-controls {
    width: 100%;
    justify-content: space-between;
  }

  .quick-feature-tags {
    display: none;
  }

  .card-art {
    height: 180px;
  }

  .dialog-body {
    padding: 24px 18px;
  }

  .dialog-spec-grid {
    grid-template-columns: 1fr;
  }

  .profile-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 动效降级偏好支持 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 手机优先：应用式导航、紧凑推荐位和可直接点击的游戏卡片。 */
@media (max-width: 768px) {
  :root { --topbar-h: auto; }
  body { min-height: 100dvh; }

  .sidebar {
    position: fixed;
    inset: auto 0 0;
    width: 100%;
    height: calc(66px + env(safe-area-inset-bottom));
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    overflow: visible;
    border: 0;
    border-top: 1px solid var(--line-subtle);
    background: color-mix(in srgb, var(--bg-sidebar) 94%, transparent);
    backdrop-filter: blur(18px);
    z-index: 60;
  }

  .sidebar > .brand,
  .sidebar-user-card,
  .nav-caption,
  .sidebar-line,
  #category-nav,
  .sidebar-bottom { display: none !important; }

  #main-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
    width: 100%;
    height: 100%;
    padding: 0;
    overflow: visible;
  }

  .nav-item,
  .nav-item.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    margin: 0;
    padding: 4px 2px;
    border: 0;
    border-radius: 13px;
    background: transparent;
    font-size: 10px;
    line-height: 1.15;
    transform: none;
  }

  .nav-item [data-icon] svg { width: 19px; height: 19px; }
  .nav-item .nav-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-item.active { color: var(--accent-blue); background: rgba(56, 189, 248, 0.13); font-weight: 750; }
  .nav-dot,
  .nav-number,
  .nav-tag { display: none !important; }

  .main-wrap { width: 100%; margin: 0; padding: 0; }
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    height: auto;
    min-height: 0;
    gap: 9px 10px;
    padding: calc(8px + env(safe-area-inset-top)) 14px 10px;
    background: color-mix(in srgb, var(--bg-base) 94%, transparent);
  }

  .mobile-brand {
    grid-column: 1;
    grid-row: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.8px;
  }

  .mobile-brand img { width: 29px; height: 29px; }
  .breadcrumb { display: none; }
  .topbar-actions { grid-column: 2; grid-row: 1; display: flex; align-items: center; gap: 7px; }
  .view-mode-group,
  #sound-toggle,
  #platform-fullscreen,
  .local-badge { display: none !important; }
  .topbar-actions .icon-action-btn { width: 36px; height: 36px; flex: 0 0 36px; }
  .header-avatar { width: 36px; height: 36px; flex: 0 0 36px; }
  .search,
  .search:focus-within {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-width: 0;
    height: 42px;
    margin: 0;
    padding: 0 13px;
    box-shadow: none;
  }
  .search kbd { display: none; }

  main { padding: 15px 13px calc(92px + env(safe-area-inset-bottom)); }
  .welcome { margin-bottom: 12px; gap: 6px; }
  .welcome .eyebrow { font-size: 9px; letter-spacing: 1.1px; }
  .welcome h1 { margin: 4px 0; font-size: clamp(19px, 5.5vw, 23px); line-height: 1.25; }
  .welcome p { font-size: 11px; line-height: 1.5; }

  .hero { position: relative; min-height: 275px; flex-direction: row; padding: 0; border-radius: 20px; }
  .hero-copy { position: relative; z-index: 2; width: 100%; max-width: none; padding: 18px 16px 20px; }
  .hero-top-badges { gap: 6px; }
  .hero-rating,
  .hero-tags-row,
  .hero-foot { display: none; }
  .hero h2 { max-width: 78%; margin: 14px 0 9px; font-size: clamp(22px, 6vw, 26px); line-height: 1.28; }
  .hero h2 small { font-size: 13px !important; line-height: 1.45; }
  .hero-copy > p { max-width: 76%; margin-bottom: 15px; font-size: 11px; line-height: 1.55; }
  .hero-cta-group { gap: 8px; flex-wrap: wrap; }
  .hero-cta-btn,
  .hero-sub-btn { min-height: 42px; padding: 9px 12px; font-size: 11px; }
  .icon-glass-btn { width: 42px; height: 42px; }
  .hero-visual { position: absolute; inset: 0 -14px 0 auto; width: 56%; height: 100%; opacity: 0.2; pointer-events: none; }
  .hero-art { max-width: 100%; max-height: 230px; object-fit: contain; }
  .hero-carousel-nav { z-index: 3; right: 14px; bottom: 10px; }

  .section-heading { align-items: flex-start; flex-direction: column; gap: 10px; margin-bottom: 12px; }
  .section-heading .heading-left p { max-width: 38ch; font-size: 11px; line-height: 1.5; }
  .heading-controls { width: 100%; justify-content: flex-end; }
  .filter-bar {
    flex-wrap: nowrap;
    gap: 7px;
    margin: 0 -13px 14px;
    padding: 2px 13px 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .filter-bar::-webkit-scrollbar { display: none; }
  .filter-chip { flex: 0 0 auto; min-height: 38px; padding: 8px 13px; font-size: 11px; }

  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .game-card { border-radius: 17px; }
  .game-card:hover { transform: none; box-shadow: var(--shadow-card); }
  .card-art { height: auto; aspect-ratio: 1.45; }
  .card-badge { top: 8px; left: 8px; max-width: calc(100% - 48px); overflow: hidden; padding: 3px 7px; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
  .card-rating-badge { bottom: 7px; left: 8px; padding: 2px 6px; font-size: 9px; }
  .favorite-button { top: 7px; right: 7px; width: 32px; height: 32px; }
  .card-info { padding: 10px 10px 11px; }
  .card-title-row { gap: 4px; margin-bottom: 5px; }
  .card-title-row h3 { display: -webkit-box; min-width: 0; overflow: hidden; font-size: 13px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .detail-button { width: 27px; height: 27px; flex: 0 0 27px; }
  .card-description { display: -webkit-box; margin-bottom: 7px; overflow: hidden; white-space: normal; font-size: 10px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .meta-row { gap: 4px; margin-bottom: 7px; }
  .meta-chip { padding: 3px 6px; font-size: 8px; }
  .tags { display: none; }
  .card-bottom { padding-top: 8px; }
  .card-duration { display: none; }
  .launch-button { justify-content: center; width: 100%; min-height: 40px; padding: 8px; font-size: 11px; }
  .card-hover-overlay { display: none; }

  .player-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 4px 7px;
    width: 100%;
    height: auto;
    min-height: 70px;
    padding: calc(7px + env(safe-area-inset-top)) 9px 7px;
  }
  .player-left { grid-column: 1; grid-row: 1; min-width: 0; gap: 7px; }
  .back-btn { gap: 5px; flex: 0 0 auto; padding: 8px 10px; font-size: 11px; }
  .back-btn kbd { display: none; }
  .player-title-box { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
  .player-title-box strong { max-width: 26vw; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
  .player-genre-badge { max-width: 26vw; overflow: hidden; padding: 2px 6px; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
  .player-status-hud { grid-column: 1; grid-row: 2; justify-self: start; gap: 10px; margin-left: 8px; padding: 0; border: 0; background: transparent; }
  .hud-item { font-size: 10px; }
  .player-actions { grid-column: 2; grid-row: 1; gap: 4px; }
  .player-tool-btn { display: grid; place-items: center; width: 34px; height: 36px; padding: 6px; }
  .player-tool-btn .btn-text { display: none; }
  .player-tool-btn svg { width: 17px; height: 17px; }
  .toast { bottom: calc(78px + env(safe-area-inset-bottom)); width: min(92vw, 480px); justify-content: center; padding: 11px 14px; text-align: center; }
  .profile-dialog,
  .game-store-dialog { width: calc(100% - 20px); max-width: 560px; max-height: calc(100dvh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); border-radius: 20px; }
}

@media (max-width: 420px) {
  .hero { min-height: 258px; }
  .hero-copy { padding: 16px 14px 18px; }
  .hero h2 { max-width: 82%; font-size: 22px; }
  .hero-copy > p { max-width: 82%; }
  .hero-sub-btn { display: none; }
  .game-grid { gap: 8px; }
  .card-info { padding: 9px 8px 10px; }
  .player-title-box strong,
  .player-genre-badge { max-width: 23vw; }
  .player-tool-btn { width: 32px; }
}

@media (max-width: 340px) {
  .game-grid { grid-template-columns: 1fr; }
  .card-art { aspect-ratio: 1.8; }
}

@media (hover: none) and (max-width: 768px) {
  .game-card:hover .card-art img { transform: none; }
  .feature-chip:hover,
  .filter-chip:hover,
  .player-tool-btn:hover { transform: none; }
}
