/* ============================================
   OTC黑市兑现 - 社区论坛风格暗色主题
   ============================================ */

/* --- CSS Variables --- */
:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: #1a1f2e;
  --bg-card-hover: #1e2538;
  --bg-input: #0f172a;
  --border-color: #1e293b;
  --border-hover: #334155;
  --accent: #f59e0b;
  --accent-dim: rgba(245, 158, 11, 0.15);
  --accent-hover: #d97706;
  --green: #10b981;
  --green-dim: rgba(16, 185, 129, 0.15);
  --red: #ef4444;
  --red-dim: rgba(239, 68, 68, 0.15);
  --blue: #3b82f6;
  --blue-dim: rgba(59, 130, 246, 0.15);
  --purple: #8b5cf6;
  --purple-dim: rgba(139, 92, 246, 0.15);
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.6);
  --radius-card: 8px;
  --radius-tag: 12px;
  --radius-btn: 6px;
  --max-width: 1200px;
  --nav-height: 60px;
  --font-sans: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-hover);
}

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

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 24px;
}

.navbar-inner {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text-primary);
  flex-shrink: 0;
}

.navbar-brand .brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.navbar-links a {
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.navbar-links a:hover,
.navbar-links a.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

.navbar-search {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 6px 14px;
  gap: 8px;
  flex: 0 1 260px;
  transition: border-color 0.2s;
}

.navbar-search:focus-within {
  border-color: var(--accent);
}

.navbar-search input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 13px;
  width: 100%;
  font-family: var(--font-sans);
}

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

.navbar-search .search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

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

.navbar-user .lang-toggle-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  transition: all 0.2s;
}

.navbar-user .lang-toggle-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.navbar-user .notification-btn {
  position: relative;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  transition: all 0.2s;
}

.navbar-user .notification-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--green));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--bg-primary);
  cursor: pointer;
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* ============================================
   Main Content
   ============================================ */
.main-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--nav-height) + 24px) 24px 48px;
}

/* ============================================
   Hero / Video Section
   ============================================ */
.hero-section {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 32px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
}

.hero-video-wrapper {
  position: relative;
  overflow: hidden;
}

.hero-video {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}

/* Video Subtitles */
.hero-video::cue {
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  padding: 4px 12px;
  border-radius: 4px;
}

.hero-info {
  padding: 24px 28px 28px;
}

.hero-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.hero-desc {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 640px;
  margin-bottom: 20px;
  line-height: 1.7;
}

.video-sound-btn {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s;
  backdrop-filter: blur(8px);
  z-index: 2;
}

.video-sound-btn:hover {
  background: rgba(0, 0, 0, 0.7);
  color: var(--text-primary);
}

.video-sound-btn.unmuted {
  background: rgba(245, 158, 11, 0.3);
  border-color: var(--accent);
  color: var(--accent);
}

.hero-stats {
  display: flex;
  gap: 28px;
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-mono);
}

.hero-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================
   Section Headers
   ============================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title .icon {
  font-size: 22px;
}

.section-more {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}

.section-more:hover {
  color: var(--accent);
}

/* ============================================
   Forum Tabs
   ============================================ */
.forum-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0;
}

.forum-tab {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
  font-family: var(--font-sans);
}

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

.forum-tab.active {
  color: var(--accent);
}

.forum-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}

/* Tab filter count badge */
.forum-tab .tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  background: var(--bg-input);
  color: var(--text-muted);
  margin-left: 6px;
}

.forum-tab.active .tab-count {
  background: var(--accent-dim);
  color: var(--accent);
}

/* ============================================
   Post Cards (Forum Style)
   ============================================ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: all 0.25s;
  cursor: pointer;
}

.post-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.post-card-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.post-card-body {
  padding: 16px;
}

.post-card-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-tag);
  font-size: 11px;
  font-weight: 600;
}

.tag-otc {
  background: var(--accent-dim);
  color: var(--accent);
}

.tag-security {
  background: var(--green-dim);
  color: var(--green);
}

.tag-risk {
  background: var(--red-dim);
  color: var(--red);
}

.tag-guide {
  background: var(--blue-dim);
  color: var(--blue);
}

.tag-discussion {
  background: var(--purple-dim);
  color: var(--purple);
}

.post-card-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-excerpt {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.post-card-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.author-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--bg-primary);
  object-fit: cover;
}

.author-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-amber {
  background: linear-gradient(135deg, #f59e0b, #f97316);
}

.avatar-green {
  background: linear-gradient(135deg, #10b981, #06b6d4);
}

.avatar-blue {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

.avatar-red {
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.post-card-stats {
  display: flex;
  gap: 12px;
}

.post-stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
}

.empty-state-icon {
  font-size: 40px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.empty-state-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-state-desc {
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================================
   Pinned / Sticky Post
   ============================================ */
.pinned-post {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-card);
  padding: 16px 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s;
  cursor: pointer;
}

.pinned-post:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  border-left-color: var(--accent);
}

.pinned-badge {
  background: var(--accent-dim);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: var(--radius-tag);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.pinned-content {
  flex: 1;
  min-width: 0;
}

.pinned-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pinned-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
}

/* ============================================
   Flow Steps Section
   ============================================ */
.flow-section {
  margin-bottom: 40px;
}

.flow-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  position: relative;
}

.flow-step {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 24px 20px;
  text-align: center;
  position: relative;
  transition: all 0.25s;
}

.flow-step:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.flow-step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  border: 2px solid rgba(245, 158, 11, 0.3);
}

.flow-step-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.flow-step-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.flow-step-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.flow-step-text {
  flex: 1;
  min-width: 0;
}

.flow-arrow {
  position: absolute;
  top: 50%;
  right: -14px;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 18px;
  z-index: 1;
}

/* ============================================
   Risk Warning Section
   ============================================ */
.risk-section {
  margin-bottom: 40px;
}

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

.risk-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 20px;
  transition: all 0.25s;
}

.risk-card:hover {
  border-color: var(--red);
  box-shadow: 0 4px 24px rgba(239, 68, 68, 0.1);
}

.risk-card-icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.risk-card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--red);
}

.risk-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================
   Discussion / FAQ Section
   ============================================ */
.discussion-section {
  margin-bottom: 40px;
}

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

.discussion-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s;
  cursor: pointer;
}

.discussion-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.discussion-votes {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 48px;
  flex-shrink: 0;
}

.vote-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  font-size: 14px;
  transition: color 0.2s;
}

.vote-btn:hover {
  color: var(--accent);
}

.vote-count {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-mono);
}

.discussion-content {
  flex: 1;
  min-width: 0;
}

.discussion-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.4;
}

.discussion-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.discussion-replies {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 6px 14px;
  background: var(--bg-input);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ============================================
   Sidebar Layout (Content + Sidebar)
   ============================================ */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  margin-bottom: 40px;
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 18px;
}

.sidebar-card-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.hot-topic-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s;
}

.hot-topic-item:hover {
  color: var(--text-primary);
}

.hot-topic-rank {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  min-width: 20px;
}

.hot-topic-rank.top {
  color: var(--accent);
}

.online-stats {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.online-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.online-row .label {
  color: var(--text-muted);
}

.online-row .value {
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--green);
}

.active-users {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.active-user-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--bg-primary);
  cursor: pointer;
  transition: transform 0.2s;
  overflow: hidden;
}

.active-user-dot img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.active-user-dot:hover {
  transform: scale(1.15);
}

/* ============================================
   Disclaimer Banner
   ============================================ */
.disclaimer-banner {
  background: var(--red-dim);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-card);
  padding: 16px 20px;
  margin-bottom: 32px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.disclaimer-banner .icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.disclaimer-banner .text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.disclaimer-banner .text strong {
  color: var(--red);
}

/* ============================================
   Footer
   ============================================ */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 32px 24px;
  text-align: center;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

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

.footer-links a:hover {
  color: var(--text-secondary);
}

.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ============================================
   Hamburger Button (Mobile)
   ============================================ */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-btn);
  cursor: pointer;
  padding: 8px;
  transition: all 0.2s;
}

.hamburger-btn:hover {
  border-color: var(--border-hover);
  background: var(--bg-card);
}

.hamburger-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 1px;
  transition: all 0.3s;
}

/* ============================================
   Mobile Nav Overlay & Drawer
   ============================================ */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.mobile-nav-overlay.active {
  display: block;
}

.mobile-nav-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(320px, 85vw);
  height: 100%;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.mobile-nav-close {
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.mobile-nav-close:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.mobile-nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 20px;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-muted);
}

.mobile-nav-search input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 14px;
  width: 100%;
  font-family: var(--font-sans);
}

.mobile-nav-search input::placeholder {
  color: var(--text-muted);
}

.mobile-nav-links {
  list-style: none;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mobile-nav-links a {
  display: block;
  padding: 14px 16px;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

.mobile-nav-links a.active {
  color: var(--accent);
  background: var(--accent-dim);
}

.mobile-nav-footer {
  padding: 16px 20px;
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.mobile-lang-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  transition: all 0.2s;
}

.mobile-lang-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ============================================
   Guide Modal (新手必读弹窗)
   ============================================ */

.guide-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.guide-modal.active {
  opacity: 1;
  visibility: visible;
}

.guide-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
}

.guide-modal-container {
  position: relative;
  width: 90%;
  max-width: 720px;
  max-height: 85vh;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.guide-modal.active .guide-modal-container {
  transform: translateY(0) scale(1);
}

.guide-modal-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.guide-modal-header-inner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.guide-modal-icon {
  font-size: 28px;
  flex-shrink: 0;
  line-height: 1;
}

.guide-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 6px 0;
  line-height: 1.4;
}

.guide-modal-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.guide-modal-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.guide-modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.guide-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  scroll-behavior: smooth;
}

.guide-modal-body::-webkit-scrollbar {
  width: 6px;
}

.guide-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.guide-modal-body::-webkit-scrollbar-thumb {
  background: var(--border-hover);
  border-radius: 3px;
}

.guide-modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Intro */
.guide-intro {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 24px;
}

.guide-intro p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin: 0;
}

.guide-intro p + p {
  margin-top: 8px;
}

.guide-intro strong {
  color: var(--accent);
}

/* Sections */
.guide-section {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin-bottom: 16px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.guide-section:hover {
  border-color: var(--border-hover);
}

.guide-section.danger-section {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.03);
}

.guide-section.danger-section:hover {
  border-color: rgba(239, 68, 68, 0.5);
}

.guide-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.guide-section-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.guide-section-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.4;
}

.guide-section-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 2px 8px;
  margin-left: 8px;
  vertical-align: middle;
}

.guide-section-tag.danger-tag {
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.1);
}

.guide-section-body {
  padding: 16px 20px;
}

.guide-section-body p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin: 0 0 10px 0;
}

.guide-section-body p:last-child {
  margin-bottom: 0;
}

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

.guide-section-body ul {
  list-style: none;
  padding: 0;
  margin: 8px 0;
}

.guide-section-body ul li {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  padding: 3px 0 3px 20px;
  position: relative;
}

.guide-section-body ul li::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* Flow diagram */
.guide-flow {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--accent);
  text-align: center;
  margin: 12px 0;
  letter-spacing: 0.5px;
  overflow-x: auto;
  white-space: nowrap;
}

/* Code block */
.guide-code {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin: 12px 0;
}

/* Highlight box */
.guide-highlight {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--accent);
  line-height: 1.6;
  margin: 12px 0;
}

.guide-highlight.danger {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

.guide-highlight strong {
  color: inherit;
}

/* Footer note */
.guide-footer-note {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px 20px;
  margin-top: 24px;
}

.guide-footer-note p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.8;
  margin: 0;
}

.guide-footer-note p + p {
  margin-top: 6px;
}

/* ============================================
   Responsive - Tablet (max-width: 1024px)
   ============================================ */
@media (max-width: 1024px) {
  .content-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .sidebar-card {
    min-width: 0;
  }
}

/* ============================================
   Responsive - Mobile (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
  /* --- Show hamburger, hide desktop nav --- */
  .hamburger-btn {
    display: flex;
  }

  .navbar-links,
  .navbar-search {
    display: none;
  }

  .navbar {
    padding: 0 16px;
  }

  .navbar-inner {
    gap: 8px;
  }

  .navbar-brand {
    font-size: 16px;
  }

  .navbar-brand .brand-logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
  }

  /* --- Main content padding --- */
  .main-content {
    padding: calc(var(--nav-height) + 16px) 16px 32px;
  }

  /* --- Disclaimer banner --- */
  .disclaimer-banner {
    padding: 12px 14px;
    gap: 10px;
    margin-bottom: 20px;
  }

  .disclaimer-banner .icon {
    font-size: 16px;
  }

  .disclaimer-banner .text {
    font-size: 12px;
    line-height: 1.6;
  }

  /* --- Hero section --- */
  .hero-section {
    margin-bottom: 24px;
    border-radius: 10px;
  }

  .hero-video {
    height: 300px;
  }

  .hero-info {
    padding: 20px 16px 24px;
  }

  .hero-title {
    font-size: 22px;
    margin-bottom: 8px;
  }

  .hero-desc {
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.6;
  }

  .video-sound-btn {
    font-size: 12px;
    padding: 6px 12px;
    bottom: 12px;
    right: 12px;
  }

  .hero-stats {
    gap: 20px;
  }

  .hero-stat-value {
    font-size: 18px;
  }

  .hero-stat-label {
    font-size: 11px;
  }

  /* --- Forum tabs (horizontal scroll) --- */
  .forum-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-bottom: 16px;
    gap: 0;
    padding-bottom: 0;
  }

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

  .forum-tab {
    white-space: nowrap;
    padding: 10px 14px;
    font-size: 13px;
    flex-shrink: 0;
  }

  /* --- Pinned post --- */
  .pinned-post {
    padding: 12px 14px;
    gap: 10px;
    margin-bottom: 14px;
  }

  .pinned-badge {
    font-size: 10px;
    padding: 3px 8px;
  }

  .pinned-title {
    font-size: 14px;
  }

  .pinned-meta {
    font-size: 11px;
    gap: 8px;
  }

  /* --- Section headers --- */
  .section-header {
    margin-bottom: 16px;
    padding-bottom: 10px;
  }

  .section-title {
    font-size: 17px;
    gap: 8px;
  }

  .section-title .icon {
    font-size: 18px;
  }

  .section-more {
    font-size: 12px;
  }

  /* --- Posts grid --- */
  .posts-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 28px;
  }

  .post-card-thumb {
    height: 160px;
  }

  .post-card-body {
    padding: 14px;
  }

  .post-card-title {
    font-size: 15px;
    margin-bottom: 6px;
  }

  .post-card-excerpt {
    font-size: 12px;
    margin-bottom: 12px;
  }

  .post-card-meta {
    flex-wrap: wrap;
    gap: 8px;
  }

  .post-card-stats {
    gap: 10px;
    font-size: 11px;
  }

  /* --- Flow steps --- */
  .flow-steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .flow-step {
    padding: 18px 14px;
  }

  .flow-step-number {
    width: 34px;
    height: 34px;
    font-size: 16px;
    margin-bottom: 10px;
  }

  .flow-step-icon {
    font-size: 26px;
    margin-bottom: 8px;
  }

  .flow-step-title {
    font-size: 14px;
    margin-bottom: 6px;
  }

  .flow-step-desc {
    font-size: 12px;
  }

  .flow-arrow {
    display: none;
  }

  .flow-section {
    margin-bottom: 28px;
  }

  /* --- Risk grid --- */
  .risk-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .risk-card {
    padding: 16px;
  }

  .risk-card-icon {
    font-size: 24px;
    margin-bottom: 10px;
  }

  .risk-card-title {
    font-size: 14px;
    margin-bottom: 6px;
  }

  .risk-card-desc {
    font-size: 12px;
  }

  .risk-section {
    margin-bottom: 28px;
  }

  /* --- Discussion section --- */
  .discussion-section {
    margin-bottom: 28px;
  }

  .discussion-list {
    gap: 8px;
  }

  .discussion-item {
    padding: 14px;
    gap: 12px;
  }

  .discussion-votes {
    min-width: 40px;
    flex-direction: row;
    gap: 6px;
  }

  .discussion-title {
    font-size: 14px;
  }

  .discussion-meta {
    font-size: 11px;
    gap: 8px;
  }

  .discussion-replies {
    width: 100%;
    justify-content: center;
    font-size: 12px;
    padding: 6px 12px;
  }

  /* --- Sidebar --- */
  .sidebar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .sidebar-card {
    padding: 16px;
  }

  .sidebar-card-title {
    font-size: 13px;
    margin-bottom: 12px;
  }

  .hot-topic-item {
    font-size: 12px;
  }

  /* --- Footer --- */
  .footer {
    padding: 24px 16px;
  }

  .footer-links {
    gap: 10px 16px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 14px;
  }

  .footer-links a {
    font-size: 12px;
  }

  .footer-copy {
    font-size: 11px;
  }

  /* Guide Modal Mobile */
  .guide-modal-container {
    width: 95%;
    max-height: 90vh;
  }

  .guide-modal-header {
    padding: 16px;
  }

  .guide-modal-title {
    font-size: 16px;
  }

  .guide-modal-subtitle {
    font-size: 12px;
  }

  .guide-modal-body {
    padding: 16px;
  }

  .guide-section-header {
    padding: 12px 16px;
  }

  .guide-section-header h3 {
    font-size: 14px;
  }

  .guide-section-body {
    padding: 12px 16px;
  }

  .guide-flow {
    font-size: 11px;
    padding: 10px 12px;
  }

  .guide-code {
    font-size: 11px;
    padding: 10px 12px;
  }
}

/* ============================================
   Responsive - Small Mobile (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
  :root {
    --nav-height: 52px;
  }

  .main-content {
    padding: calc(var(--nav-height) + 12px) 12px 24px;
  }

  .navbar {
    padding: 0 12px;
  }

  .navbar-brand span {
    font-size: 14px;
  }

  .navbar-brand .brand-logo {
    width: 26px;
    height: 26px;
  }

  .user-avatar {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .hamburger-btn {
    width: 32px;
    height: 32px;
    padding: 6px;
    gap: 4px;
  }

  .hamburger-btn span {
    width: 16px;
  }

  /* Hero */
  .hero-video {
    height: 220px;
  }

  .hero-info {
    padding: 16px 12px 20px;
  }

  .hero-title {
    font-size: 18px;
  }

  .hero-desc {
    font-size: 12px;
    margin-bottom: 14px;
  }

  .video-sound-btn {
    font-size: 11px;
    padding: 5px 10px;
    gap: 4px;
    bottom: 10px;
    right: 10px;
  }

  .hero-stats {
    gap: 14px;
  }

  .hero-stat-value {
    font-size: 16px;
  }

  .hero-stat-label {
    font-size: 10px;
  }

  /* Disclaimer */
  .disclaimer-banner {
    padding: 10px 12px;
    gap: 8px;
    margin-bottom: 16px;
    border-radius: 6px;
  }

  .disclaimer-banner .icon {
    font-size: 14px;
  }

  .disclaimer-banner .text {
    font-size: 11px;
  }

  /* Posts */
  .post-card-thumb {
    height: 140px;
  }

  .post-card-body {
    padding: 12px;
  }

  .post-card-title {
    font-size: 14px;
  }

  .post-card-excerpt {
    display: none;
  }

  .post-card-meta {
    gap: 6px;
  }

  .post-card-author {
    gap: 6px;
    font-size: 12px;
  }

  .author-avatar {
    width: 20px;
    height: 20px;
    font-size: 10px;
  }

  /* Flow steps - single column horizontal layout */
  .flow-steps {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .flow-step {
    padding: 14px;
    display: flex;
    flex-direction: row;
    text-align: left;
    gap: 14px;
    align-items: center;
  }

  .flow-step-number {
    margin: 0;
    flex-shrink: 0;
  }

  .flow-step-icon {
    display: none;
  }

  .flow-step-text {
    flex: 1;
    min-width: 0;
  }

  .flow-step-title {
    margin-bottom: 4px;
  }

  /* Pinned */
  .pinned-post {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* Discussion */
  .discussion-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .discussion-votes {
    flex-direction: row;
    min-width: auto;
  }

  .discussion-replies {
    width: 100%;
    justify-content: center;
  }

  /* Tags */
  .tag {
    font-size: 10px;
    padding: 2px 8px;
  }

  /* Forum tabs */
  .forum-tab {
    padding: 8px 12px;
    font-size: 12px;
  }

  /* Sidebar */
  .sidebar-card {
    padding: 14px;
  }

  /* Footer */
  .footer {
    padding: 20px 12px;
  }

  .footer-links {
    gap: 8px 14px;
  }

  .footer-links a {
    font-size: 11px;
  }
}

/* ============================================
   Responsive - Ultra Small (max-width: 360px)
   ============================================ */
@media (max-width: 360px) {
  .hero-title {
    font-size: 16px;
  }

  .hero-desc {
    font-size: 11px;
  }

  .hero-stats {
    gap: 12px;
  }

  .hero-stat-value {
    font-size: 14px;
  }

  .post-card-stats {
    gap: 6px;
    font-size: 10px;
  }

  .navbar-brand span {
    font-size: 13px;
  }
}

/* ============================================
   Safe Areas (iPhone notch etc.)
   ============================================ */
@supports (padding: env(safe-area-inset-top)) {
  .navbar {
    padding-top: env(safe-area-inset-top);
    height: calc(var(--nav-height) + env(safe-area-inset-top));
  }

  .mobile-nav-drawer {
    padding-top: env(safe-area-inset-top);
  }

  .footer {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
}

/* ============================================
   Touch Optimization
   ============================================ */
@media (hover: none) and (pointer: coarse) {
  /* Remove hover effects on touch devices */
  .post-card:hover {
    transform: none;
    box-shadow: none;
  }

  .flow-step:hover {
    transform: none;
  }

  /* Ensure minimum touch target size */
  .forum-tab {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .vote-btn {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
  }

  .mobile-nav-links a {
    min-height: 48px;
  }

  .navbar-links a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .hamburger-btn {
    min-width: 44px;
    min-height: 44px;
  }

  .video-sound-btn {
    min-width: 56px;
    min-height: 44px;
  }
}
