/* ============================================
   任意门攻略 — 主样式表
   Design system & global styles
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Brand */
  --brand-pink: #e91e63;
  --brand-pink-light: #f48fb1;
  --brand-pink-dark: #c2185b;
  --brand-gradient: linear-gradient(135deg, #e91e63 0%, #9c27b0 50%, #7c4dff 100%);
  --brand-gradient-h: linear-gradient(135deg, #f06292 0%, #ba68c8 50%, #9575cd 100%);

  /* Surfaces (light mode) */
  --bg: #faf9f7;
  --bg-card: #ffffff;
  --bg-elevated: #ffffff;
  --bg-input: #f3f0ed;
  --bg-hover: #f5f0f6;

  /* Text */
  --text-primary: #1a1a2e;
  --text-secondary: #5c5c6e;
  --text-muted: #9494a6;
  --text-link: #c2185b;

  /* Borders */
  --border: #e6e3e0;
  --border-light: #f0ece9;

  /* UI */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 2px 8px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.04);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.04);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* Layout */
  --max-width: 1200px;
  --header-h: 64px;
}

/* ---------- Dark Mode ---------- */
[data-theme="dark"] {
  --bg: #0f0f1a;
  --bg-card: #1a1a2e;
  --bg-elevated: #222240;
  --bg-input: #252545;
  --bg-hover: #2a2a4a;
  --text-primary: #e8e6f0;
  --text-secondary: #b0aec0;
  --text-muted: #787890;
  --text-link: #f48fb1;
  --border: #2a2a40;
  --border-light: #222240;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.2);
  --shadow-md: 0 2px 8px rgba(0,0,0,.3), 0 1px 3px rgba(0,0,0,.2);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.3);
}

/* Auto dark mode based on system preference */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0f1a;
    --bg-card: #1a1a2e;
    --bg-elevated: #222240;
    --bg-input: #252545;
    --bg-hover: #2a2a4a;
    --text-primary: #e8e6f0;
    --text-secondary: #b0aec0;
    --text-muted: #787890;
    --text-link: #f48fb1;
    --border: #2a2a40;
    --border-light: #222240;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.2);
    --shadow-md: 0 2px 8px rgba(0,0,0,.3), 0 1px 3px rgba(0,0,0,.2);
    --shadow-lg: 0 8px 32px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.3);
  }
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
}
/* 主题切换过渡仅在手动切换时启用，页面加载不触发 */
body.theme-transitioning {
  transition: background .3s, color .3s;
}

a { color: var(--text-link); text-decoration: none; transition: color .2s; }
a:hover { color: var(--brand-pink); }

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

ul, ol { list-style: none; }

button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; }

input { font-family: inherit; font-size: inherit; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { line-height: 1.3; font-weight: 700; }
h1 { font-size: 2rem; letter-spacing: -.02em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }

/* ---------- Layout ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 48px 0; }
.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title .icon { font-size: 1.3rem; }

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  text-decoration: none;
  flex: 0 0 auto;
  min-width: 140px;
}
.logo:hover { color: var(--text-primary); }
.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--brand-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
  flex-shrink: 0;
}
.logo-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Nav */
.nav-links { flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px; }
.nav-links a {
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  transition: all .2s;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--brand-pink);
  background: var(--bg-hover);
}

/* Header actions */
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.search-trigger {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all .2s;
}
.search-trigger:hover { background: var(--bg-hover); color: var(--brand-pink); }

.theme-toggle {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1rem;
  transition: all .2s;
}
.theme-toggle:hover { background: var(--bg-hover); }

.menu-toggle {
  display: none;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-secondary);
}
.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 1px;
  transition: all .3s;
}

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0; bottom: 0;
  background: var(--bg-card);
  z-index: 99;
  padding: 16px 24px;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}
.mobile-nav.active { display: flex; }
.mobile-nav a {
  display: block;
  padding: 14px 16px;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all .2s;
}
.mobile-nav a:hover,
.mobile-nav a.active {
  background: var(--bg-hover);
  color: var(--brand-pink);
}

/* ---------- Search Bar ---------- */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 6px 6px 6px 20px;
  transition: all .3s;
  max-width: 600px;
  margin: 0 auto;
}
.search-bar:focus-within {
  border-color: var(--brand-pink);
  box-shadow: 0 0 0 3px rgba(233,30,99,.1);
}
.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-primary);
  font-size: .95rem;
  min-width: 0;
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar-btn {
  padding: 10px 24px;
  border-radius: var(--radius-xl);
  background: var(--brand-gradient);
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
  transition: all .2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.search-bar-btn:hover {
  opacity: .9;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(233,30,99,.3);
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 60px 24px 48px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 50% 0%, rgba(233,30,99,.06) 0%, transparent 60%);
  pointer-events: none;
}
.hero-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  background: var(--bg-hover);
  color: var(--brand-pink);
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: 2.4rem;
  margin-bottom: 8px;
  position: relative;
}
.hero h1 .highlight {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto 28px;
}
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 20px;
}
.hero-tag {
  padding: 5px 14px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: .82rem;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
}
.hero-tag:hover {
  border-color: var(--brand-pink);
  color: var(--brand-pink);
  background: var(--bg-hover);
}

/* ---------- Game Cards ---------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
  display: flex;
  flex-direction: column;
}
.game-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-pink-light);
}
.game-card-cover {
  width: 100%;
  aspect-ratio: 460/215;
  object-fit: cover;
  background: var(--bg-hover);
}
.game-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.game-card-body h3 {
  font-size: 1rem;
  font-weight: 700;
}
.game-card-body h3 a {
  color: var(--text-primary);
}
.game-card-body h3 a:hover {
  color: var(--brand-pink);
}
.game-card-genre {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.game-card-genre .tag {
  font-size: .72rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-hover);
  color: var(--text-muted);
}
.game-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: auto;
}
.game-card-meta .difficulty {
  display: flex;
  gap: 2px;
}
.game-card-meta .difficulty .dot { color: var(--brand-pink); }
.game-card-meta .difficulty .dot.empty { color: var(--border); }

/* ---------- Guide Cards (list style) ---------- */
.guide-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  transition: box-shadow .2s, border-color .2s;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  position: relative;
  cursor: pointer;
}
.guide-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--brand-pink-light);
}
/* Stretched link overlay — makes entire card clickable */
.guide-card-link {
  position: absolute; inset: 0; z-index: 1;
  border-radius: var(--radius-md);
}
.guide-card-link:hover ~ .guide-card-content h3 { color: var(--brand-pink); }
.guide-card-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  position: relative; z-index: 2; pointer-events: none;
}
.guide-card-content { flex: 1; min-width: 0; position: relative; z-index: 2; pointer-events: none; }
.guide-card-content h3 {
  font-size: .98rem;
  margin-bottom: 4px;
  pointer-events: none;
}
.guide-card-content p {
  color: var(--text-secondary);
  font-size: .85rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}
.guide-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: .78rem;
  color: var(--text-muted);
  align-items: center;
}
.guide-card-meta .game-badge {
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-hover);
  color: var(--brand-pink);
  font-weight: 500;
  font-size: .75rem;
}

/* ---------- Category Grid ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}
.cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 12px;
  text-align: center;
  transition: all .2s;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-primary);
}
.cat-card:hover {
  border-color: var(--brand-pink);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.cat-card .cat-icon { font-size: 1.8rem; margin-bottom: 6px; }
.cat-card .cat-name { font-size: .85rem; font-weight: 600; }

/* ---------- Article Page ---------- */
.article-layout { display: grid; grid-template-columns: 1fr 280px; gap: 32px; max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

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

.article-header { margin-bottom: 28px; }
.article-header .breadcrumb {
  display: flex; gap: 6px; align-items: center;
  font-size: .82rem; color: var(--text-muted);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.article-header .breadcrumb a { color: var(--text-muted); }
.article-header .breadcrumb a:hover { color: var(--brand-pink); }
.article-header .breadcrumb .sep { color: var(--text-muted); }
.article-header h1 { margin-bottom: 12px; }
.article-meta {
  display: flex; flex-wrap: wrap; gap: 14px;
  font-size: .85rem; color: var(--text-muted);
  align-items: center;
}
.article-meta .tag {
  padding: 3px 10px; border-radius: 4px;
  background: var(--bg-hover); color: var(--brand-pink); font-weight: 500;
}

.article-body {
  font-size: .95rem;
  line-height: 1.85;
}
.article-body h2 {
  font-size: 1.3rem;
  margin: 32px 0 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}
.article-body h3 { font-size: 1.1rem; margin: 24px 0 8px; }
.article-body p { margin-bottom: 14px; }
.article-body strong { color: var(--text-primary); }
.article-body ul, .article-body ol {
  margin: 8px 0 14px 20px;
}
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: 6px; }
.article-body table {
  width: 100%; border-collapse: collapse;
  margin: 16px 0; font-size: .85rem;
}
.article-body th {
  background: var(--bg-hover); padding: 10px 14px;
  text-align: left; font-weight: 600; border-bottom: 2px solid var(--border);
}
.article-body td {
  padding: 8px 14px; border-bottom: 1px solid var(--border-light);
}
.article-body tr:hover td { background: var(--bg-hover); }

/* TOC */
.toc {
  background: transparent;
  padding: 0;
  margin: 0;
}
.toc .toc-title { font-weight: 800; font-size: .92rem; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; color: var(--text-primary); }
.toc ul { list-style: none; margin: 0; }
.toc li { margin-bottom: 2px; }
.toc a { color: var(--text-secondary); font-size: .8rem; transition: color .15s; display: block; padding: 3px 0; }
.toc a:hover { color: var(--brand-pink); }
.sidebar-toc {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-left: 3px solid var(--brand-pink);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  max-height: 50vh;
  overflow-y: auto;
}
.toc-title { font-weight: 700; font-size: .9rem; margin-bottom: 10px; }
.toc ul { list-style: none; margin: 0; }
.toc li { margin-bottom: 4px; }
.toc a { color: var(--text-secondary); font-size: .85rem; transition: color .2s; }
.toc a:hover { color: var(--brand-pink); }

/* Sidebar */
.article-sidebar { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
}
.sidebar-widget h4 { font-size: .9rem; margin-bottom: 12px; }
.sidebar-widget .game-info { display: flex; gap: 12px; align-items: center; }
.sidebar-widget .game-info img {
  width: 60px; height: 60px; border-radius: var(--radius-sm); object-fit: cover;
}
.sidebar-widget .related-guide {
  display: block; padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: .85rem; color: var(--text-secondary);
}
.sidebar-widget .related-guide:last-child { border-bottom: none; }
.sidebar-widget .related-guide:hover { color: var(--brand-pink); }

/* ---------- Ad Slot ---------- */
.ad-slot {
  background: var(--bg-card);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
  color: var(--text-muted);
  font-size: .82rem;
}
.ad-slot .ad-label { font-weight: 600; text-transform: uppercase; letter-spacing: .05em; font-size: .7rem; margin-bottom: 4px; }
.ad-slot-inline { margin: 24px 0; }

/* ---------- Newsletter ---------- */
.newsletter {
  text-align: center;
  padding: 48px 24px;
  position: relative;
}
.newsletter::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--brand-gradient);
  opacity: .03;
  border-radius: var(--radius-xl);
  margin: 0 24px;
  pointer-events: none;
}
.newsletter h3 { font-size: 1.3rem; margin-bottom: 6px; }
.newsletter p { color: var(--text-secondary); margin-bottom: 20px; }
.newsletter-form {
  display: flex; gap: 8px; max-width: 420px; margin: 0 auto;
}
.newsletter-form input {
  flex: 1; padding: 12px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
  outline: none;
  transition: border-color .2s;
}
.newsletter-form input:focus { border-color: var(--brand-pink); }
.newsletter-form button {
  padding: 12px 24px;
  border-radius: var(--radius-md);
  background: var(--brand-gradient);
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  transition: all .2s;
}
.newsletter-form button:hover { opacity: .9; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px 24px;
  background: var(--bg-card);
}
.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto 32px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-col h4 { font-size: .9rem; margin-bottom: 12px; }
.footer-col p { color: var(--text-secondary); font-size: .85rem; line-height: 1.6; }
.footer-col a {
  display: block; color: var(--text-secondary);
  font-size: .85rem; padding: 4px 0; transition: color .2s;
}
.footer-col a:hover { color: var(--brand-pink); }
.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .8rem;
  color: var(--text-muted);
}
.footer-bottom .disclaimer { max-width: 600px; line-height: 1.6; }

/* ---------- Page Header (for sub-pages) ---------- */
.page-header {
  text-align: center;
  padding: 36px 24px 28px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-card);
}
.page-header h1 { font-size: 1.6rem; }
.page-header p { color: var(--text-secondary); margin-top: 6px; }

/* ---------- Filter Bar ---------- */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 16px 0;
}
.filter-chip {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  font-size: .82rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  cursor: pointer;
  transition: all .2s;
  font-weight: 500;
}
.filter-chip:hover,
.filter-chip.active {
  border-color: var(--brand-pink);
  color: var(--brand-pink);
  background: var(--bg-hover);
}

/* ---------- Search Results ---------- */
.search-header {
  padding: 32px 24px;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
}
.search-header h1 { font-size: 1.3rem; }
.search-header p { color: var(--text-muted); margin-top: 4px; }
.no-results {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
}
.no-results .icon { font-size: 3rem; margin-bottom: 12px; }

/* ---------- Utility ---------- */
.btn-more {
  display: block; margin: 24px auto 0;
  padding: 10px 32px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: .9rem;
  transition: all .2s;
  background: var(--bg-card);
}
.btn-more:hover {
  border-color: var(--brand-pink);
  color: var(--brand-pink);
  background: var(--bg-hover);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state .icon { font-size: 2.5rem; margin-bottom: 8px; }

/* ---------- Ad Slot Hidden by Default ---------- */
.ad-slot { display: none; }
.ad-slot.ad-visible { display: block; }

/* ---------- Genre Tags (Homepage) ---------- */
.genre-tags {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  padding: 20px 0 0;
}
.genre-tag {
  padding: 8px 18px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.genre-tag:hover {
  border-color: var(--brand-pink);
  color: var(--brand-pink);
  background: var(--bg-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* ---------- Guide Path Timeline (A) ---------- */
.guide-path {
  margin: 12px 0 24px;
  position: relative;
}
.guide-path-title {
  font-weight: 700; font-size: .95rem; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.path-list { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.path-step {
  flex: 1; min-width: 160px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 16px;
  position: relative; transition: all .2s;
}
.path-step:hover { border-color: var(--brand-pink-light); box-shadow: var(--shadow-md); }
.path-step-clickable { cursor: pointer; }
/* Overlay link for clickable path steps */
.path-step-link {
  position: absolute; inset: 0; z-index: 1;
  border-radius: var(--radius-md);
}
.path-step-link:hover ~ h4 { color: var(--brand-pink); }
.path-step-num { font-size: .7rem; color: var(--brand-pink); font-weight: 700; margin-bottom: 4px; position: relative; z-index: 2; pointer-events: none; }
.path-step h4 { font-size: .9rem; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; position: relative; z-index: 2; pointer-events: none; }
.path-step .phase-level { font-size: .72rem; color: var(--text-muted); margin-bottom: 6px; position: relative; z-index: 2; pointer-events: none; }
.path-step p { font-size: .78rem; color: var(--text-secondary); margin-bottom: 8px; line-height: 1.5; position: relative; z-index: 2; pointer-events: none; }
.path-step .path-links { display: flex; flex-wrap: wrap; gap: 4px; position: relative; z-index: 2; }
.path-step .path-link {
  font-size: .72rem; padding: 3px 8px; border-radius: 4px;
  background: var(--bg-hover); color: var(--brand-pink);
  text-decoration: none; transition: all .15s; white-space: nowrap;
  position: relative; z-index: 3; pointer-events: auto;
}
.path-step .path-link:hover { background: var(--brand-pink); color: #fff; }
.path-step .path-empty { font-size: .72rem; color: var(--text-muted); font-style: italic; }

/* Path connector arrow between steps */
@media (min-width: 768px) {
  .path-step::after {
    content: '→'; position: absolute; right: -18px; top: 50%;
    transform: translateY(-50%); color: var(--brand-pink); font-size: 1.1rem; font-weight: 700;
    z-index: 1;
  }
  .path-step:last-child::after { content: none; }
}

/* ---------- Quick Card (B) ---------- */
.quick-card {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-hover) 100%);
  border: 1.5px solid var(--brand-pink-light);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin-bottom: 24px;
}
.quick-card-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.quick-card-header .qc-icon {
  font-size: 1.5rem; flex-shrink: 0;
}
.quick-card-header h3 { font-size: 1rem; margin: 0; }
.quick-card-header .qc-boss { color: var(--brand-pink); }
.quick-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.quick-card-item {
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--bg-card); border: 1px solid var(--border-light);
}
.quick-card-item .qc-label {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-muted); margin-bottom: 3px; font-weight: 600;
}
.quick-card-item .qc-value { font-size: .85rem; color: var(--text-primary); font-weight: 500; }
.quick-card-item .qc-value.weakness { color: #e91e63; }
.quick-card-item .qc-value.resist { color: #7c4dff; }
.quick-card-tip {
  margin-top: 12px; padding: 10px 14px;
  background: rgba(233,30,99,.06); border-radius: var(--radius-sm);
  border-left: 3px solid var(--brand-pink);
  font-size: .82rem; color: var(--text-secondary); line-height: 1.5;
}
.quick-card-tip strong { color: var(--brand-pink); }

/* ---------- Strategy Compare (C) ---------- */
.strategies-section { margin: 28px 0; }
.strategies-section .strat-title {
  font-weight: 700; font-size: 1rem; margin-bottom: 14px;
}
.strat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.strat-card {
  background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden;
  transition: all .2s;
}
.strat-card:hover { border-color: var(--brand-pink-light); box-shadow: var(--shadow-md); }
.strat-card-header {
  padding: 14px 16px; border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between;
}
.strat-card-header h4 { font-size: .9rem; }
.strat-difficulty {
  padding: 3px 10px; border-radius: 12px;
  font-size: .7rem; font-weight: 600; white-space: nowrap;
}
.strat-difficulty.easy { background: #e8f5e9; color: #2e7d32; }
.strat-difficulty.medium { background: #fff3e0; color: #f57c00; }
.strat-difficulty.hard { background: #fce4ec; color: #c62828; }
[data-theme="dark"] .strat-difficulty.easy { background: #1b3a1e; color: #81c784; }
[data-theme="dark"] .strat-difficulty.medium { background: #3e2d14; color: #ffb74d; }
[data-theme="dark"] .strat-difficulty.hard { background: #3e1524; color: #ef9a9a; }
.strat-card-body { padding: 14px 16px; }
.strat-card-body p { font-size: .82rem; color: var(--text-secondary); margin-bottom: 10px; line-height: 1.5; }
.strat-card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.strat-card-tags .stag {
  font-size: .68rem; padding: 2px 8px; border-radius: 4px;
  background: var(--bg-hover); color: var(--text-muted);
}
.strat-steps { list-style: decimal; margin: 0 0 0 18px; font-size: .8rem; color: var(--text-secondary); }
.strat-steps li { margin-bottom: 4px; line-height: 1.5; }

/* ---------- Level Selector ---------- */
.level-selector { margin: 20px 0; }
.level-selector-title { font-weight: 700; font-size: .9rem; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.level-area-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.level-area-btn {
  padding: 7px 14px; border-radius: 16px;
  border: 1.5px solid var(--border); background: var(--bg-card);
  color: var(--text-secondary); font-size: .8rem; cursor: pointer;
  transition: all .15s; font-weight: 500;
}
.level-area-btn:hover, .level-area-btn.active {
  border-color: var(--brand-pink); color: var(--brand-pink);
  background: var(--bg-hover);
}
.level-sub-grid { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 4px; padding-left: 4px; }
.level-sub-btn {
  padding: 4px 10px; border-radius: 12px;
  border: 1px solid var(--border-light); background: var(--bg-card);
  color: var(--text-muted); font-size: .75rem; cursor: pointer;
  transition: all .15s;
}
.level-sub-btn:hover, .level-sub-btn.active {
  border-color: var(--brand-pink-light); color: var(--brand-pink);
  background: var(--bg-hover);
}
.level-sub-btn.no-guide { opacity: .5; cursor: not-allowed; }
.level-sub-btn.no-guide:hover { border-color: var(--border-light); color: var(--text-muted); background: var(--bg-card); }

/* ---------- Official Badge ---------- */
.official-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 4px;
  background: var(--brand-gradient); color: #fff;
  font-size: .68rem; font-weight: 700; white-space: nowrap;
}
.user-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 4px;
  background: var(--bg-hover); color: var(--text-muted);
  font-size: .68rem; font-weight: 500; white-space: nowrap;
}
/* User author badge with avatar */
.user-badge-author {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px 2px 3px; border-radius: 14px;
  background: var(--bg-hover);
  font-size: .75rem; font-weight: 500; white-space: nowrap;
}
.user-badge-emoji {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand-gradient); display: inline-flex;
  align-items: center; justify-content: center;
  font-size: .65rem; flex-shrink: 0;
}
.user-badge-avatar {
  width: 20px; height: 20px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
}
.user-badge-name {
  color: var(--text-primary); font-weight: 600;
}
.guide-card-official {
  border-left: 3px solid var(--brand-pink);
}
.guide-section-divider {
  margin: 16px 0;
  padding: 8px 14px;
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  font-size: .78rem; color: var(--text-muted);
  font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}

/* 官方攻略可折叠合集入口 */
.official-collapse-toggle {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all .2s;
  user-select: none;
  margin-bottom: 4px;
}
.official-collapse-toggle:hover {
  border-color: var(--brand-pink);
  box-shadow: 0 4px 16px rgba(233,30,99,.06);
}
.official-collapse-toggle .oc-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}
.official-collapse-toggle .oc-info { flex: 1; min-width: 0; }
.official-collapse-toggle .oc-title {
  font-size: .92rem; font-weight: 700; color: var(--text-primary); margin-bottom: 3px;
}
.official-collapse-toggle .oc-subtitle {
  font-size: .76rem; color: var(--text-muted);
}
.official-collapse-toggle .oc-arrow {
  font-size: 1.1rem; color: var(--text-muted);
  transition: transform .25s;
  flex-shrink: 0;
}
.official-collapse-toggle.open .oc-arrow {
  transform: rotate(180deg);
}
.official-collapse-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}
.official-collapse-panel .guide-list {
  padding-top: 8px;
}

/* ============================================
   User Auth & Profile System
   ============================================ */

/* ---------- Login Button (Header) ---------- */
.btn-login {
  padding: 7px 18px;
  border-radius: var(--radius-xl);
  background: var(--brand-gradient);
  color: #fff !important;
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s;
  white-space: nowrap;
}
.btn-login:hover {
  opacity: .9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(233,30,99,.3);
}

/* ---------- User Avatar + Dropdown ---------- */
.user-menu { display: flex; align-items: center; gap: 6px; }

.user-avatar-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 10px 5px 5px;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
}
.user-avatar-btn:hover { border-color: var(--brand-pink-light); background: var(--bg-hover); color: var(--text-primary); }
.user-avatar-icon {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--brand-gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem; flex-shrink: 0;
}
.user-avatar-name { max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.user-logout-btn {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1.5px solid var(--border); background: var(--bg-card);
  color: var(--text-muted); font-size: .85rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s; flex-shrink: 0;
}
.user-logout-btn:hover { border-color: #e91e63; color: #e91e63; background: rgba(233,30,99,.05); }

/* Report button */
.report-btn {
  padding: 5px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: transparent;
  color: var(--text-muted); font-size: .75rem; cursor: pointer;
  transition: all .15s;
}
.report-btn:hover { border-color: #e91e63; color: #e91e63; background: rgba(233,30,99,.05); }

/* Back button */
.back-btn {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--bg-card);
  color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s; flex-shrink: 0; margin-right: 6px;
}
.back-btn:hover { border-color: var(--brand-pink); color: var(--brand-pink); background: var(--bg-hover); }

/* ---------- Like & Favorite Buttons ---------- */
.like-btn, .fav-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 12px;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: .8rem;
  cursor: pointer;
  transition: all .2s;
  font-weight: 500;
}
.like-btn:hover { border-color: #e91e63; color: #e91e63; background: rgba(233,30,99,.05); }
.like-btn.liked { border-color: #e91e63; background: rgba(233,30,99,.1); color: #e91e63; }
.like-btn .like-icon { transition: transform .2s; }
.like-btn.liked .like-icon { animation: heartBeat .4s ease; }

.fav-btn:hover { border-color: #f59e0b; color: #f59e0b; background: rgba(245,158,11,.05); }
.fav-btn.favorited { border-color: #f59e0b; background: rgba(245,158,11,.1); color: #f59e0b; }

@keyframes heartBeat {
  0% { transform: scale(1); }
  25% { transform: scale(1.3); }
  50% { transform: scale(.95); }
  100% { transform: scale(1); }
}

/* ---------- Guide Action Bar ---------- */
.guide-actions {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-top: 16px; padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

/* ---------- Toast Notification ---------- */
.toast-container {
  position: fixed; top: 80px; right: 24px; z-index: 200;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  padding: 12px 20px; border-radius: var(--radius-md);
  background: var(--bg-elevated); border: 1px solid var(--border);
  box-shadow: var(--shadow-lg); font-size: .85rem;
  color: var(--text-primary); font-weight: 500;
  animation: toastIn .3s ease, toastOut .3s ease 2.2s forwards;
  max-width: 320px;
}
.toast.success { border-left: 3px solid #4caf50; }
.toast.error { border-left: 3px solid #e91e63; }
.toast.info { border-left: 3px solid var(--brand-pink); }

@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-10px); } }

/* ---------- Login / Register Page ---------- */
.auth-page {
  min-height: calc(100vh - var(--header-h) - 160px);
  display: flex; align-items: center; justify-content: center;
  padding: 48px 24px;
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-md);
}
.auth-card-header { text-align: center; margin-bottom: 28px; }
.auth-card-header .auth-logo { font-size: 2.5rem; margin-bottom: 8px; }
.auth-card-header h1 { font-size: 1.4rem; margin-bottom: 4px; }
.auth-card-header p { color: var(--text-muted); font-size: .85rem; }

.auth-tabs { display: flex; gap: 0; margin-bottom: 24px; border-bottom: 2px solid var(--border-light); }
.auth-tab {
  flex: 1; padding: 10px; text-align: center;
  font-size: .9rem; font-weight: 600;
  color: var(--text-muted); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: all .2s; background: none;
}
.auth-tab.active { color: var(--brand-pink); border-bottom-color: var(--brand-pink); }
.auth-tab:hover { color: var(--text-primary); }

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form .form-group {}
.auth-form label {
  display: block; font-size: .82rem; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 5px;
}
.auth-form input {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: .9rem;
  outline: none; transition: border-color .2s;
}
.auth-form input:focus { border-color: var(--brand-pink); box-shadow: 0 0 0 3px rgba(233,30,99,.08); }
.auth-form .btn-submit {
  width: 100%; padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--brand-gradient);
  color: #fff; font-weight: 700; font-size: .95rem;
  cursor: pointer; transition: all .2s; margin-top: 6px;
}
.auth-form .btn-submit:hover { opacity: .9; box-shadow: 0 4px 16px rgba(233,30,99,.25); }
.auth-form .form-error {
  color: #e91e63; font-size: .8rem; text-align: center;
  padding: 8px; border-radius: var(--radius-sm);
  background: rgba(233,30,99,.06); display: none;
}
.auth-form .form-error.show { display: block; }
.auth-form .form-hint {
  font-size: .78rem; color: var(--text-muted); text-align: center;
}

/* ---------- Profile Page ---------- */
.profile-page {}
.profile-hero {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 36px 0;
}
.profile-hero-inner {
  display: flex; gap: 24px; align-items: center; flex-wrap: wrap;
}
.profile-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--brand-gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; flex-shrink: 0; color: #fff;
}
.profile-info { flex: 1; min-width: 200px; }
.profile-info h1 { font-size: 1.5rem; margin-bottom: 2px; }
.profile-info .profile-email { font-size: .85rem; color: var(--text-muted); margin-bottom: 4px; }
.profile-info .profile-bio { font-size: .88rem; color: var(--text-secondary); margin-bottom: 8px; line-height: 1.5; }
.profile-info .profile-join { font-size: .78rem; color: var(--text-muted); }
.profile-edit-btn {
  padding: 8px 18px; border-radius: var(--radius-xl);
  border: 1.5px solid var(--border); background: var(--bg-card);
  color: var(--text-secondary); font-size: .82rem; cursor: pointer;
  font-weight: 500; transition: all .2s;
}
.profile-edit-btn:hover { border-color: var(--brand-pink); color: var(--brand-pink); }

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px; margin: 28px 0;
}
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 18px; text-align: center;
  transition: all .2s;
}
.stat-card:hover { border-color: var(--brand-pink-light); box-shadow: var(--shadow-md); }
.stat-card .stat-value { font-size: 1.6rem; font-weight: 800; color: var(--brand-pink); }
.stat-card .stat-label { font-size: .78rem; color: var(--text-muted); margin-top: 4px; }

/* Profile Tabs */
.profile-tabs {
  display: flex; gap: 4px; border-bottom: 2px solid var(--border-light);
  margin: 24px 0 20px;
}
.profile-tab {
  padding: 10px 20px; font-size: .88rem; font-weight: 600;
  color: var(--text-muted); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: all .2s; background: none;
}
.profile-tab.active { color: var(--brand-pink); border-bottom-color: var(--brand-pink); }
.profile-tab:hover { color: var(--text-primary); }
.profile-tab .tab-count {
  display: inline-block; margin-left: 4px; padding: 1px 7px;
  border-radius: 10px; background: var(--bg-hover);
  font-size: .72rem; font-weight: 700;
}

/* History List */
.history-list { display: flex; flex-direction: column; gap: 6px; }
.history-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius-md);
  background: var(--bg-card); border: 1px solid var(--border);
  transition: all .15s; text-decoration: none; color: inherit;
}
.history-item:hover { border-color: var(--brand-pink-light); box-shadow: var(--shadow-sm); }
.history-item .history-thumb {
  width: 52px; height: 38px; border-radius: var(--radius-sm);
  overflow: hidden; flex-shrink: 0; position: relative;
  background: var(--bg-hover);
}
.history-cover {
  width: 100%; height: 100%; object-fit: cover;
}
.history-icon {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  background: var(--bg-hover); display: flex;
  align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.history-icon-fallback {
  position: absolute; top: 0; left: 0;
  width: 52px; height: 38px;
}
.history-item .history-info { flex: 1; min-width: 0; }
.history-item .history-title { font-size: .88rem; font-weight: 600; }
.history-item .history-meta { font-size: .75rem; color: var(--text-muted); }
.history-item .history-arrow { color: var(--text-muted); font-size: .9rem; flex-shrink: 0; }
.history-actions { display: flex; gap: 4px; flex-shrink: 0; align-items: center; }
.history-action-btn {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg-card);
  font-size: .75rem; cursor: pointer; transition: all .15s;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
}
.history-action-btn:hover { border-color: var(--brand-pink); color: var(--brand-pink); background: var(--bg-hover); }
.history-action-btn.delete-btn:hover { border-color: #e91e63; color: #e91e63; }

/* Published Guide Card (Profile) */
.profile-guide-card {
  display: flex; gap: 14px; align-items: center;
  padding: 14px 16px; border-radius: var(--radius-md);
  background: var(--bg-card); border: 1px solid var(--border);
  transition: all .15s; text-decoration: none; color: inherit;
}
.profile-guide-card:hover { border-color: var(--brand-pink-light); box-shadow: var(--shadow-sm); }
.profile-guide-card .pg-icon {
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  background: var(--bg-hover); display: flex;
  align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.profile-guide-card .pg-info { flex: 1; min-width: 0; }
.profile-guide-card .pg-title { font-size: .9rem; font-weight: 600; }
.profile-guide-card .pg-meta { font-size: .75rem; color: var(--text-muted); display: flex; gap: 10px; flex-wrap: wrap; }
.profile-guide-card .pg-stats { display: flex; gap: 12px; flex-shrink: 0; font-size: .78rem; color: var(--text-muted); }
.profile-guide-card .pg-stat { text-align: center; }
.profile-guide-card .pg-stat-val { font-weight: 700; color: var(--text-primary); }

/* Empty state for profile sections */
.profile-empty {
  text-align: center; padding: 32px; color: var(--text-muted);
}
.profile-empty .icon { font-size: 2rem; margin-bottom: 8px; }
.profile-empty p { font-size: .85rem; }

/* Edit Profile Modal */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 150;
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-card {
  background: var(--bg-card); border-radius: var(--radius-lg);
  padding: 28px; max-width: 420px; width: 90%;
  box-shadow: var(--shadow-lg);
}
.modal-card h3 { margin-bottom: 16px; }
.modal-card .form-group { margin-bottom: 14px; }
.modal-card label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: 4px; color: var(--text-secondary); }
.modal-card input, .modal-card textarea {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-input); color: var(--text-primary); font-size: .9rem;
  font-family: inherit; outline: none; resize: vertical;
  transition: border-color .2s;
}
.modal-card input:focus, .modal-card textarea:focus { border-color: var(--brand-pink); }
.modal-card .modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.modal-card .btn-cancel {
  padding: 9px 20px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--bg-card);
  color: var(--text-secondary); font-size: .85rem; cursor: pointer; font-weight: 500;
}
.modal-card .btn-save {
  padding: 9px 24px; border-radius: var(--radius-sm);
  background: var(--brand-gradient); color: #fff;
  font-size: .85rem; cursor: pointer; font-weight: 600;
}

/* ---------- Sticky Toolbar (Game Detail) ---------- */
.sticky-toolbar {
  position: sticky; top: var(--header-h); z-index: 50;
  background: var(--bg); padding: 12px 0 8px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 8px;
}
.toolbar-row {
  display: flex; flex-wrap: wrap; gap: 10px;
  align-items: center; justify-content: space-between;
}
.sort-toggle { display: flex; gap: 4px; flex-shrink: 0; }
.sort-btn {
  padding: 5px 12px; border-radius: 16px;
  border: 1.5px solid var(--border); background: var(--bg-card);
  color: var(--text-secondary); font-size: .78rem; cursor: pointer;
  font-weight: 500; transition: all .2s; white-space: nowrap;
}
.sort-btn:hover, .sort-btn.active {
  border-color: var(--brand-pink); color: var(--brand-pink);
  background: var(--bg-hover);
}

/* Chip count badge */
.chip-count {
  display: inline-block; margin-left: 2px;
  font-size: .68rem; font-weight: 700;
  opacity: .6; min-width: 16px; text-align: center;
}
.filter-chip.active .chip-count { opacity: 1; }

/* Toolbar info line */
.toolbar-info {
  font-size: .75rem; color: var(--text-muted);
  padding: 6px 0 0;
}

/* Guide card actions row — sits above card overlay */
.guide-card-actions {
  margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  position: relative; z-index: 3; pointer-events: auto;
}
.view-count-badge {
  font-size: .73rem; color: var(--text-muted);
  display: flex; align-items: center;
}

/* Heat badge */
.heat-badge {
  font-size: .7rem; padding: 2px 8px; border-radius: 10px;
  font-weight: 600; white-space: nowrap;
  background: rgba(233,30,99,.08); color: var(--brand-pink);
  margin-left: auto;
}

/* ---------- Avatar Upload ---------- */
.avatar-upload-row { display: flex; gap: 14px; align-items: center; }
.avatar-preview { flex-shrink: 0; }
.avatar-upload-options { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.avatar-emoji-input { width: 100%; }
.avatar-upload-btn {
  display: inline-block; padding: 6px 14px;
  border-radius: var(--radius-sm); border: 1.5px solid var(--border);
  background: var(--bg-card); color: var(--text-secondary);
  font-size: .82rem; cursor: pointer; font-weight: 500;
  transition: all .2s; text-align: center;
}
.avatar-upload-btn:hover { border-color: var(--brand-pink); color: var(--brand-pink); }
.avatar-hint { font-size: .7rem; color: var(--text-muted); }
.avatar-agreement { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--text-muted); cursor: pointer; margin-top: 4px; }
.avatar-agreement input { width: auto; }

/* Image avatar */
.user-avatar-img {
  width: 30px; height: 30px; border-radius: 50%;
  object-fit: cover; border: 1.5px solid var(--border);
}
.profile-avatar-img {
  width: 80px; height: 80px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--brand-pink-light);
}

/* ---------- Game Search (Publish Page) ---------- */
.game-search-results { display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 50;
  background: var(--bg-card); border: 1.5px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); max-height: 360px; overflow-y: auto; margin-top: 4px; }
.game-search-results.show { display: block; }
.search-result-group { padding: 8px 14px; font-size: .72rem; color: var(--text-muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--border-light); }
.search-loading, .search-no-result { padding: 16px; text-align: center; font-size: .85rem; color: var(--text-muted); }
.search-result-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer;
  transition: background .15s; border-bottom: 1px solid var(--border-light); }
.search-result-item:hover { background: var(--bg-hover); }
.search-result-item img { width: 40px; height: 40px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; background: var(--bg-hover); }
.search-result-item span { font-size: .85rem; font-weight: 500; }
.search-result-item small { color: var(--text-muted); font-weight: 400; font-size: .75rem; }

.selected-game { display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: var(--bg-hover); border-radius: var(--radius-sm); margin-top: 8px; }
.selected-game img { width: 40px; height: 40px; border-radius: var(--radius-sm); object-fit: cover; }
.selected-game strong { font-size: .88rem; }
.selected-game small { font-size: .75rem; color: var(--text-muted); }
.change-game-btn { margin-left: auto; padding: 4px 10px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--bg-card); color: var(--text-muted);
  font-size: .75rem; cursor: pointer; transition: all .15s; }
.change-game-btn:hover { border-color: #e91e63; color: #e91e63; }

/* ---------- Image Upload (Publish Page) ---------- */
.image-upload-area { }
.image-upload-grid { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.image-thumb { position: relative; width: 120px; border-radius: var(--radius-sm);
  overflow: hidden; border: 1px solid var(--border); }
.image-thumb img { width: 100%; height: 80px; object-fit: cover; display: block; }
.image-thumb-actions { display: flex; }
.image-remove-btn { flex: 1; padding: 4px; background: rgba(0,0,0,.5); color: #fff; border: none;
  font-size: .65rem; cursor: pointer; text-align: center; }
.image-insert-btn { flex: 2; padding: 4px; background: rgba(233,30,99,.7); color: #fff; border: none;
  font-size: .7rem; cursor: pointer; font-weight: 600; }
.image-insert-btn:hover { background: rgba(233,30,99,.9); }
.image-remove-btn:hover { background: rgba(0,0,0,.7); }
.image-add-btn { display: inline-flex; align-items: center; justify-content: center;
  width: 120px; height: 80px; border-radius: var(--radius-sm); border: 2px dashed var(--border);
  color: var(--text-muted); font-size: .8rem; cursor: pointer; transition: all .2s; }
.image-add-btn:hover { border-color: var(--brand-pink); color: var(--brand-pink); }

/* ---------- Pagination ---------- */
.pagination {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  padding: 28px 0 12px; flex-wrap: wrap;
}
.page-btn {
  padding: 7px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--bg-card);
  color: var(--text-secondary); font-size: .82rem; cursor: pointer;
  font-weight: 500; transition: all .15s; white-space: nowrap;
}
.page-btn:hover:not(:disabled) { border-color: var(--brand-pink); color: var(--brand-pink); }
.page-btn.active { background: var(--brand-gradient); color: #fff; border-color: transparent; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }
.page-num { min-width: 36px; text-align: center; }
.page-ellipsis { padding: 0 4px; color: var(--text-muted); }
.page-jump { font-size: .78rem; color: var(--text-muted); margin-left: 12px; display: flex; align-items: center; gap: 4px; }
.page-jump input {
  width: 48px; padding: 5px 8px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--bg-input);
  color: var(--text-primary); font-size: .78rem; text-align: center; outline: none;
}
.page-jump input:focus { border-color: var(--brand-pink); }

/* ---------- Rich Editor ---------- */
.rich-editor {
  min-height: 240px; max-height: 600px; overflow-y: auto;
  padding: 12px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); background: var(--bg-input);
  color: var(--text-primary); font-size: .9rem; line-height: 1.8;
  outline: none; transition: border-color .2s;
}
.rich-editor:focus { border-color: var(--brand-pink); box-shadow: 0 0 0 3px rgba(233,30,99,.08); }
.rich-editor:empty::before {
  content: attr(placeholder); color: var(--text-muted);
}
.rich-editor img { max-width: 100%; border-radius: 8px; margin: 8px 0; }
.rich-editor h2 { font-size: 1.2rem; margin: 16px 0 8px; }
.rich-editor h3 { font-size: 1rem; margin: 12px 0 6px; }

.editor-toolbar { display: flex; gap: 3px; padding: 6px 0; flex-wrap: wrap; }
.editor-btn {
  padding: 4px 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text-secondary); font-size: .75rem; cursor: pointer;
  font-weight: 500; transition: all .15s;
}
.editor-btn:hover { border-color: var(--brand-pink); color: var(--brand-pink); background: var(--bg-hover); }

/* Inline image in editor */
.inline-image-wrapper { transition: transform .15s; }
.inline-image-wrapper:hover { transform: scale(1.03); }
.inline-image-wrapper:hover .img-zoom-badge { opacity: 1; }
.img-zoom-badge {
  position: absolute; bottom: 2px; right: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff;
  font-size: .5rem; display: flex; align-items: center; justify-content: center;
  opacity: .6; transition: opacity .15s; pointer-events: none;
}

/* Image lightbox */
.img-lightbox {
  display: none; position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,.85); align-items: center; justify-content: center;
  flex-direction: column; gap: 12px; padding: 24px;
}
.img-lightbox.show { display: flex; }
.img-lightbox img { max-width: 90vw; max-height: 85vh; border-radius: var(--radius-md); object-fit: contain; }
.img-lightbox-close {
  color: #fff; font-size: .9rem; cursor: pointer; padding: 8px 18px;
  border-radius: var(--radius-sm); background: rgba(255,255,255,.1);
  transition: background .15s;
}
.img-lightbox-close:hover { background: rgba(255,255,255,.2); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  .hero h1 { font-size: 1.8rem; }
  .game-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .menu-toggle { display: flex; }

  .hero { padding: 36px 16px 32px; }
  .hero h1 { font-size: 1.5rem; }
  .hero p { font-size: .9rem; }

  .game-grid { grid-template-columns: 1fr; gap: 12px; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }

  .section { padding: 32px 0; }
  .container { padding: 0 16px; }
  .section-title { font-size: 1.1rem; }

  .newsletter-form { flex-direction: column; }
  .search-bar { padding: 4px 4px 4px 14px; }
  .search-bar-btn { padding: 10px 16px; font-size: .82rem; }

  .guide-card { padding: 14px; flex-direction: column; gap: 10px; }

  .article-body { font-size: .9rem; }
  .article-body h2 { font-size: 1.15rem; }
}

/* ============================================
   首页折扣入口卡片 (Homepage Deals Entry Cards)
   ============================================ */
.deals-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.deals-entry-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  min-height: 160px;
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
}

.deals-entry-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.08);
}

.deals-entry-card:active {
  transform: scale(.98);
}

.deals-entry-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: .12;
  transition: opacity .2s;
}

.deals-entry-card:hover .deals-entry-bg {
  opacity: .2;
}

.steam-entry .deals-entry-bg {
  background: linear-gradient(135deg, #1a3a5c 0%, #0d253d 40%, #533afd 100%);
}

.epic-entry .deals-entry-bg {
  background: linear-gradient(135deg, #2d1a3c 0%, #1a1030 40%, #7c3aed 100%);
}

.deals-entry-content {
  position: relative;
  z-index: 1;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
}

.deals-entry-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.deals-entry-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--text-primary);
}

.deals-entry-desc {
  font-size: .8rem;
  color: var(--text-muted);
  margin: 0 0 12px;
  line-height: 1.4;
}

.deals-entry-cta {
  display: inline-block;
  font-size: .82rem;
  font-weight: 600;
  color: #533afd;
  transition: gap .2s;
}

.deals-entry-card:hover .deals-entry-cta {
  color: #4434d4;
}

@media (max-width: 768px) {
  .deals-entry-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .deals-entry-card {
    min-height: 120px;
  }
  .deals-entry-content {
    padding: 18px 20px;
  }
  .deals-entry-title {
    font-size: 1rem;
  }
}

/* ============================================
   折扣排行榜浮窗 (Rankings Modal) — 紧凑版
   ============================================ */
.rankings-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.rankings-overlay.open { display: flex; }

.rankings-modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: 0 16px 48px rgba(0,0,0,.2), 0 4px 12px rgba(0,0,0,.12);
  max-width: 650px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.rankings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.rankings-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}
.rankings-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: .9rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
  flex-shrink: 0;
}
.rankings-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.rankings-tabs {
  display: flex; gap: 0;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.rankings-tab {
  padding: 8px 16px;
  font-size: .78rem; font-weight: 600;
  border: none; background: none;
  color: var(--text-muted); cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all .2s;
  font-family: inherit;
}
.rankings-tab:hover { color: var(--text-primary); }
.rankings-tab.active {
  color: #533afd;
  border-bottom-color: #533afd;
}

.rankings-source {
  padding: 8px 20px 0;
  font-size: .7rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.rankings-body {
  padding: 12px 20px 20px;
  overflow-y: auto;
  flex: 1;
}

.rankings-loading {
  text-align: center; color: var(--text-muted);
  padding: 40px 24px; font-size: .85rem;
}

/* ---- Steam 紧凑型两列网格 ---- */
.rankings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.rank-card-link {
  text-decoration: none; color: inherit;
}

.rank-card {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: transform .12s, box-shadow .12s;
  height: 54px;
}
.rank-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
}

.rank-card-img {
  width: 94px; height: 54px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-hover);
}

.rank-card-body {
  flex: 1; min-width: 0;
  padding: 6px 8px 6px 0;
  display: flex; flex-direction: column; justify-content: center;
}

.rank-card-name {
  font-size: .72rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--text-primary);
  margin-bottom: 3px;
  line-height: 1.2;
}

.rank-card-price-row {
  display: flex; align-items: center; gap: 4px;
}

.rank-card-discount {
  background: linear-gradient(135deg, #533afd, #7c4dff);
  color: #fff;
  font-size: .62rem; font-weight: 700;
  padding: 2px 6px; border-radius: 9999px;
  flex-shrink: 0;
}

.rank-card-original {
  font-size: .62rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.rank-card-price {
  font-size: .74rem; font-weight: 700;
  color: #4caf50;
}

.rankings-load-more {
  font-size: .74rem; padding: 6px 18px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer; transition: all .2s;
  font-family: inherit;
}
.rankings-load-more:hover { border-color: #533afd; color: #533afd; }

/* ---- Epic 紧凑型 ---- */
.rankings-epic-grid {
  display: grid; gap: 6px;
}

.epic-card-link {
  text-decoration: none; color: inherit;
}

.epic-card-modal {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: transform .12s, box-shadow .12s;
  height: 54px;
}
.epic-card-modal:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
}

.epic-card-img {
  width: 94px; height: 54px;
  object-fit: cover; flex-shrink: 0;
  background: var(--bg-hover);
}

.epic-card-info {
  flex: 1; min-width: 0;
  padding: 6px 8px 6px 0;
  display: flex; flex-direction: column; justify-content: center;
}

.epic-card-name {
  font-size: .74rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--text-primary);
  margin-bottom: 3px; line-height: 1.2;
}

.epic-card-meta {
  display: flex; align-items: center; gap: 5px;
}

.epic-free-badge {
  background: #4caf50; color: #fff;
  font-size: .64rem; font-weight: 700;
  padding: 2px 7px; border-radius: 9999px;
}

.epic-original-price {
  font-size: .64rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.epic-days-left {
  font-size: .66rem; color: #f0a030;
  margin-left: auto;
}

/* Upcoming free */
.rankings-upcoming-grid {
  display: grid; gap: 6px;
}

.upcoming-card {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}
.upcoming-img {
  width: 70px; height: 42px;
  object-fit: cover; border-radius: 4px;
  flex-shrink: 0; background: var(--bg-hover);
}

.epic-store-link {
  font-size: .76rem; color: var(--brand-pink);
  text-decoration: none;
}
.epic-store-link:hover { text-decoration: underline; }

/* Mobile: full-width single column */
@media (max-width: 640px) {
  .rankings-overlay { padding: 0; align-items: flex-end; }
  .rankings-modal {
    max-width: 100%; max-height: 92vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }
  .rankings-header { padding: 14px 16px 10px; }
  .rankings-title { font-size: .95rem; }
  .rankings-tabs { padding: 0 16px; }
  .rankings-tab { padding: 7px 12px; font-size: .73rem; }
  .rankings-source { padding: 6px 16px 0; }
  .rankings-body { padding: 10px 16px 16px; }
  .rankings-grid { grid-template-columns: 1fr; }
  .epic-card-img { width: 80px; height: 48px; }
  .rank-card-img { width: 80px; height: 48px; }
  .epic-card-modal { height: 48px; }
  .rank-card { height: 48px; }
  .rank-card-name { font-size: .7rem; }
  .epic-card-name { font-size: .7rem; }
}

/* ============================================
   UX Enhancements
   ============================================ */

/* ---------- SPA loading bar ---------- */
.spa-loading-bar {
  position: fixed; top: 0; left: 0; height: 3px;
  background: var(--brand-gradient); z-index: 99999;
  width: 0; transition: width .3s ease;
}
.spa-loading-bar.active { width: 70%; }
.spa-loading-bar.done { width: 100%; opacity: 0; transition: width .2s, opacity .3s; }

/* ---------- Back to top button (enhanced) ---------- */
#backToTop {
  position: fixed; bottom: 32px; right: 32px;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--brand-gradient); color: #fff;
  border: none; box-shadow: 0 4px 16px rgba(233,30,99,.25);
  display: none; align-items: center; justify-content: center;
  cursor: pointer; z-index: 50; font-size: 1.3rem;
  transition: all .2s; opacity: .85;
}
#backToTop:hover { opacity: 1; transform: translateY(-3px); box-shadow: 0 6px 24px rgba(233,30,99,.35); }
#backToTop.visible { display: flex; animation: bttPulse 2s ease-in-out infinite; }
@keyframes bttPulse { 0%,100%{box-shadow:0 4px 16px rgba(233,30,99,.25)}50%{box-shadow:0 4px 24px rgba(233,30,99,.5)} }

/* ---------- Mobile: game card description truncation ---------- */
@media (max-width: 768px) {
  .game-card-desc, .game-card p.description {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; text-overflow: ellipsis;
  }
  /* Mobile genre filter: horizontal scroll with fade */
  .filter-bar {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; -ms-overflow-style: none;
    padding-bottom: 4px; mask-image: linear-gradient(to right, #000 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, #000 85%, transparent 100%);
  }
  .filter-bar::-webkit-scrollbar { display: none; }
  .filter-chip { flex-shrink: 0; white-space: nowrap; }

  /* Mobile: smaller game card padding */
  .game-card { padding: 14px 16px; }
  .game-card h3 { font-size: .9rem; }
}

/* ---------- Font size control ---------- */
.article-body { font-size: var(--guide-font-size, .92rem); }
.article-body.font-sm { --guide-font-size: .82rem; }
.article-body.font-md { --guide-font-size: .92rem; }
.article-body.font-lg { --guide-font-size: 1.05rem; }
.article-body.font-xl { --guide-font-size: 1.18rem; }
.font-size-control {
  display: inline-flex; gap: 2px; align-items: center;
  background: var(--bg-hover); border-radius: 8px; padding: 3px;
}
.font-size-btn {
  padding: 5px 10px; border: none; background: transparent;
  color: var(--text-muted); cursor: pointer; border-radius: 6px;
  font-size: .8rem; transition: all .15s;
}
.font-size-btn:hover { color: var(--text-primary); }
.font-size-btn.active { background: var(--bg-card); color: var(--brand-pink); font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,.08); }

/* ---------- Guide card game cover thumbnail ---------- */
.guide-card-cover {
  width: 48px; height: 48px; border-radius: 8px; object-fit: cover;
  flex-shrink: 0; margin-right: 4px;
}
@media (max-width: 768px) {
  .guide-card-cover { width: 36px; height: 36px; }
}

/* ---------- Newsletter feedback ---------- */
.newsletter-thanks {
  text-align: center; font-size: .85rem; color: #4caf50;
  padding: 10px; animation: fadeInUp .4s ease;
}
@keyframes fadeInUp { from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)} }

/* ---------- Toast container ---------- */
.toast-container {
  position: fixed; top: 80px; right: 20px; z-index: 10000;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  padding: 10px 18px; border-radius: 8px; font-size: .82rem;
  color: #fff; animation: toastIn .3s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,.15); max-width: 320px;
}
.toast.success { background: #4caf50; }
.toast.error { background: #e91e63; }
@keyframes toastIn { from{opacity:0;transform:translateX(20px)}to{opacity:1;transform:translateX(0)} }
