/*
Theme Name: Game Resource (RX Game Library)
Theme URI: https://example.com/game-resource
Author: Kilo Code
Author URI: https://example.com
Description: A modern game resource library theme based on RX Game Library design.
Version: 5.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: game-resource
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --nav-height: 72px;
}

/* Dark Mode Variables */
:root[data-theme="dark"] {
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --bg-body: #0f172a;
  --bg-surface: #1e293b;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #334155;
  --glass-bg: rgba(30, 41, 59, 0.85);
  --glass-border: rgba(255, 255, 255, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden;
}

body {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden;
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* 确保 WordPress admin bar 不影响布局 */
html.wp-toolbar {
  padding-top: 0 !important;
}

/* 前台登录状态下：管理员顶部栏默认收起，鼠标靠近/悬停时展开（仅桌面端） */
body.admin-bar #wpadminbar {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  transform: translateY(calc(-100% + 8px));
  opacity: 0.35;
  transition: transform 0.25s ease, opacity 0.25s ease;
  z-index: 10000;
}

/* 鼠标靠近顶部（命中可见的 8px 区域）或栏内交互时展开 */
body.admin-bar #wpadminbar:hover,
body.admin-bar #wpadminbar:focus-within {
  transform: translateY(0);
  opacity: 1;
}

/* 管理后台与移动端保持默认显示逻辑，避免触屏设备无法悬停 */
body.wp-admin #wpadminbar {
  transform: none;
  opacity: 1;
}

@media (max-width: 782px) {
  body.admin-bar #wpadminbar {
    transform: none;
    opacity: 1;
  }
}

/* Background Decoration */
.bg-decoration {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -1;
  background: radial-gradient(circle at 50% 0%, #eff6ff, transparent 40%);
  pointer-events: none;
}

/* Hero Banner with Background Image */
.hero-banner-wrapper {
  position: relative;
  width: 100%;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  width: 100vw;
  overflow: hidden;
}

.hero-banner-wrapper.has-bg {
  margin-top: -2rem;
  padding-top: 2rem;
  padding-bottom: 8rem;
}

/* Header Overlay Styles (All Pages) */
body .site-header-nav {
    position: fixed;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    width: 100vw !important;
    max-width: 100vw !important;
    left: 0;
    right: 0;
    top: 0;
    z-index: 1000;
}

/* Homepage specific transparent header */
body.home .site-header-nav,
body.blog .site-header-nav {
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

/* Default Header Text Styles (Light Mode) */
body .site-header-nav .logo-text,
body .site-header-nav .main-navigation a,
body .site-header-nav .mobile-menu-toggle {
    color: var(--text-main);
    font-weight: 600;
    text-shadow: none;
}

body .site-header-nav .main-navigation a:hover {
    color: var(--primary);
}

body .site-header-nav .main-navigation a::after {
    background: var(--primary);
}

/* Homepage Header Text Styles (White) */
body.home .site-header-nav:not(.scrolled) .logo-text,
body.home .site-header-nav:not(.scrolled) .main-navigation a,
body.home .site-header-nav:not(.scrolled) .mobile-menu-toggle,
body.blog .site-header-nav:not(.scrolled) .logo-text,
body.blog .site-header-nav:not(.scrolled) .main-navigation a,
body.blog .site-header-nav:not(.scrolled) .mobile-menu-toggle {
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

body.home .site-header-nav:not(.scrolled) .main-navigation a:hover,
body.blog .site-header-nav:not(.scrolled) .main-navigation a:hover {
    color: rgba(255, 255, 255, 0.9);
}

body.home .site-header-nav:not(.scrolled) .main-navigation a::after,
body.blog .site-header-nav:not(.scrolled) .main-navigation a::after {
    background: #fff;
}

/* Scrolled state for all pages */
body .site-header-nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

/* Adjust page layout for fixed header on home */
body.home .page,
body.blog .page {
    padding-top: 0;
}

/* Pull hero up to top and add padding for header */
body.home .hero-banner-wrapper.has-bg,
body.blog .hero-banner-wrapper.has-bg {
    margin-top: 0;
}

body.home .hero-banner-wrapper.has-bg .hero,
body.blog .hero-banner-wrapper.has-bg .hero {
    padding-top: 6rem;
}

/* Dark Mode Component Overrides */
[data-theme="dark"] .bg-decoration {
  background: radial-gradient(circle at 50% 0%, #172554, transparent 40%);
}

[data-theme="dark"] .site-header-nav:not(.scrolled) {
  background: rgba(15, 23, 42, 0.8);
  border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .site-header-nav.scrolled {
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .hero-title {
  background: linear-gradient(135deg, #f8fafc 30%, #60a5fa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: #f8fafc;
  text-shadow: none;
}

[data-theme="dark"] .hero-subtitle {
  color: var(--text-muted);
  text-shadow: none;
}

[data-theme="dark"] .hero-banner-wrapper.has-bg .stats-container,
[data-theme="dark"] .hero-banner-wrapper.has-bg .search-input-wrapper {
  background: rgba(30, 41, 59, 0.9);
  border-color: var(--glass-border);
}

[data-theme="dark"] .search-input-wrapper {
  background: var(--bg-surface);
  border-color: var(--border);
}

[data-theme="dark"] .search-input-wrapper:focus-within {
  background: var(--bg-surface);
}

[data-theme="dark"] #search-input {
  color: var(--text-main);
}

[data-theme="dark"] .widget-card {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-color: rgba(148, 163, 184, 0.28);
}

[data-theme="dark"] .resource-card {
  background: var(--bg-surface);
  border-color: var(--border);
}

[data-theme="dark"] .brand-pill {
  background: rgba(30, 41, 59, 0.8);
  border-color: var(--border);
  color: var(--text-main);
}

[data-theme="dark"] .stats-container {
  background: var(--bg-surface);
  border-color: var(--border);
}

[data-theme="dark"] .single-post-container {
  background: var(--bg-surface);
  border-color: var(--border);
}

[data-theme="dark"] .sidebar-area {
  background: linear-gradient(to bottom, #1e293b, #0f172a);
  border-color: var(--border);
}

[data-theme="dark"] .download-modal-content,
[data-theme="dark"] .modal-content {
  background: var(--bg-surface);
}

[data-theme="dark"] .download-modal-header,
[data-theme="dark"] .modal-header {
  background: #151e32;
  border-color: var(--border);
}

[data-theme="dark"] .download-option {
  background: transparent;
}

[data-theme="dark"] .download-option:hover {
  background: rgba(59, 130, 246, 0.1);
}

[data-theme="dark"] .option-logo {
  background: #fff;
  padding: 2px;
}

[data-theme="dark"] .pwd-text {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-color: var(--border);
}

[data-theme="dark"] .qrcode-expand-area {
  background: #151e32;
}

[data-theme="dark"] .page-btn,
[data-theme="dark"] .page-num {
  background: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border);
}

[data-theme="dark"] .page-btn:hover:not(.disabled),
[data-theme="dark"] .page-num:hover:not(.current) {
  background: rgba(59, 130, 246, 0.1);
}

[data-theme="dark"] .guestbook-hero {
  background: radial-gradient(circle at center, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
}

[data-theme="dark"] .stat-pill {
  background: var(--bg-surface);
  border-color: var(--border);
  color: var(--text-muted);
}

[data-theme="dark"] .stat-text strong {
  color: var(--text-main);
}

[data-theme="dark"] .guestbook-form-card,
[data-theme="dark"] .guestbook-card {
  background: var(--bg-surface);
  border-color: var(--border);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .guestbook-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .nickname-input,
[data-theme="dark"] .message-input-line {
  background: #151e32;
  color: var(--text-main);
  border-color: var(--border);
}

[data-theme="dark"] .nickname-input::placeholder,
[data-theme="dark"] .message-input-line::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

[data-theme="dark"] .nickname-input:focus,
[data-theme="dark"] .message-input-line:focus {
  background: #0f172a;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .emoji-picker {
  background: var(--bg-surface);
  border-color: var(--border);
}

[data-theme="dark"] .emoji-item:hover {
  background: #334155;
}

[data-theme="dark"] .admin-reply-section {
  background: rgba(59, 130, 246, 0.1);
}

[data-theme="dark"] .steam-media-section {
  background: var(--bg-surface);
  border-color: var(--border);
}

[data-theme="dark"] .gallery-top,
[data-theme="dark"] .media-thumb-item,
[data-theme="dark"] .media-item {
  background: #020617;
}

[data-theme="dark"] .more-link {
  background: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border);
}

[data-theme="dark"] .more-link:hover {
  background: rgba(59, 130, 246, 0.1);
}

[data-theme="dark"] .disclaimer-container {
  background: var(--bg-surface);
  border-color: var(--border);
}

[data-theme="dark"] .disclaimer-container::before {
  border-color: var(--border);
}

[data-theme="dark"] .single-post .entry-content pre {
  background: #020617;
  border-color: var(--border);
}

[data-theme="dark"] .single-post .entry-content blockquote {
  background: #1e293b;
  color: var(--text-muted);
}

[data-theme="dark"] .nav-previous a,
[data-theme="dark"] .nav-next a {
  border-color: var(--border);
}

[data-theme="dark"] .nav-previous a:hover,
[data-theme="dark"] .nav-next a:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--primary);
}

[data-theme="dark"] .mobile-menu-toggle {
  color: var(--text-main);
}

[data-theme="dark"] .mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 640px) {
  [data-theme="dark"] .main-navigation {
    background: rgba(30, 41, 59, 0.98);
    border-bottom-color: var(--border);
  }
}

/* Theme Toggle Button */
.theme-toggle {
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  margin-left: 0.5rem;
}

.theme-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--primary);
}

[data-theme="dark"] .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-toggle .moon-icon {
  display: block;
}

.theme-toggle .sun-icon {
  display: none;
}

[data-theme="dark"] .theme-toggle .moon-icon {
  display: none;
}

[data-theme="dark"] .theme-toggle .sun-icon {
  display: block;
}

/* Logo switching logic */
/* Default (Light Mode): Header is white -> Show Black Logo (.logo-light) */
.logo-light {
  display: block;
}
.logo-dark {
  display: none;
}

/* Homepage (Top): Header is transparent/dark -> Show White Logo (.logo-dark) */
body.home .site-header-nav:not(.scrolled) .logo-light,
body.blog .site-header-nav:not(.scrolled) .logo-light {
  display: none;
}
body.home .site-header-nav:not(.scrolled) .logo-dark,
body.blog .site-header-nav:not(.scrolled) .logo-dark {
  display: block;
}

/* Scrolled (All Pages Light Mode): Header is white -> Show Black Logo */
.site-header-nav.scrolled .logo-light {
  display: block;
}
.site-header-nav.scrolled .logo-dark {
  display: none;
}

/* Dark Mode: Always dark header -> Always White Logo */
[data-theme="dark"] .logo-light,
[data-theme="dark"] .site-header-nav.scrolled .logo-light {
  display: none;
}
[data-theme="dark"] .logo-dark,
[data-theme="dark"] .site-header-nav.scrolled .logo-dark {
  display: block;
}

/* Mobile adjustments for overlay header */
@media (max-width: 640px) {
    body .site-header-nav {
        position: fixed;
    }
    
    body.home .hero-banner-wrapper.has-bg .hero,
    body.blog .hero-banner-wrapper.has-bg .hero {
        padding-top: 6rem;
    }

    .hero-title {
        font-size: 2.75rem;
        line-height: 1.1;
        margin-bottom: 0.75rem;
        text-shadow: none;
    }
    
    .hero-subtitle {
        font-size: 1.1rem !important;
        line-height: 1.4;
        padding: 0 1rem;
        font-weight: 700;
        text-shadow: 0 2px 8px rgba(0,0,0,0.9);
    }
}

.hero-banner-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.hero-banner-bg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: translateZ(0);
  will-change: auto;
}

.hero-banner-content {
  position: relative;
  z-index: 1;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero-banner-wrapper.has-bg .hero {
  padding-top: 4rem;
}

.hero-banner-wrapper.has-bg .hero-title {
  background: none;
  -webkit-text-fill-color: #ffffff;
  color: #ffffff;
  text-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), 0 4px 12px rgba(0, 0, 0, 0.9), 0 0 4px rgba(0,0,0,1);
  letter-spacing: -0.03em;
}

.hero-banner-wrapper.has-bg .hero-subtitle {
  color: #ffffff;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.9), 0 2px 6px rgba(0, 0, 0, 0.95);
  font-weight: 800;
  letter-spacing: 0.03em;
  opacity: 1;
}

.hero-banner-wrapper.has-bg .stats-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
}

.hero-banner-wrapper.has-bg .search-input-wrapper {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
}

@media (max-width: 640px) {
  .hero-banner-wrapper.has-bg {
    margin-top: -1rem;
    padding-top: 1rem;
    padding-bottom: 3.5rem;
  }
  
  .hero-banner-wrapper.has-bg .hero {
    padding-top: 2rem;
  }
}

/* Navigation Bar Base Styles - Now handled above for overlay/fixed logic */
.site-header-nav {
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0;
  padding-right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.nav-container {
  width: 100%;
  max-width: 1600px;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 auto;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  height: 100%;
}

.logo-image {
  height: 52px;
  width: auto;
  object-fit: contain;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Header Search Box */
.header-search-form {
  margin-right: 0.5rem;
}

.header-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 99px;
  padding: 0.4rem 0.75rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  width: 180px;
  color: inherit;
}

.header-search-wrapper:hover {
  background: rgba(0, 0, 0, 0.08);
}

.header-search-wrapper:focus-within {
  width: 260px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  color: var(--text-main);
  border-color: var(--primary);
}

.header-search-input {
  border: none;
  background: transparent;
  font-size: 0.9rem;
  color: inherit;
  width: 100%;
  padding: 0 0.5rem;
  outline: none;
  font-family: inherit;
}

.header-search-input::placeholder {
  color: inherit;
  opacity: 0.6;
}

.header-search-submit {
  background: none;
  border: none;
  color: inherit;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.header-search-submit:hover {
  opacity: 1;
}

/* Homepage & Dark Mode Adjustments */
body.home .site-header-nav:not(.scrolled) .header-search-wrapper,
body.blog .site-header-nav:not(.scrolled) .header-search-wrapper,
[data-theme="dark"] .header-search-wrapper {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.1);
}

body.home .site-header-nav:not(.scrolled) .header-search-wrapper:hover,
body.blog .site-header-nav:not(.scrolled) .header-search-wrapper:hover,
[data-theme="dark"] .header-search-wrapper:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Dark Mode Focus State */
[data-theme="dark"] .header-search-wrapper:focus-within {
  background: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

@media (max-width: 1024px) {
  .header-search-wrapper {
    width: 40px;
    padding: 0.4rem;
    background: transparent;
  }
  
  .header-search-input {
    display: none;
  }
  
  .header-search-wrapper:focus-within {
    width: 200px;
    background: #fff;
  }
  
  .header-search-wrapper:focus-within .header-search-input {
    display: block;
  }
  
  /* Dark mode mobile focus */
  [data-theme="dark"] .header-search-wrapper:focus-within {
    background: var(--bg-surface);
  }
}

@media (max-width: 768px) {
  .header-search-form {
    display: block;
  }
  
  /* Mobile search adjustments */
  .header-search-wrapper {
    margin-right: 0.25rem;
  }
  
  /* Ensure it doesn't overflow on very small screens when expanded */
  .header-search-wrapper:focus-within {
    width: 180px;
    max-width: calc(100vw - 120px); /* Leave space for logo and other icons */
  }
}

.logo-text {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text-main);
}

.main-navigation {
  display: flex;
  justify-content: flex-start;
}

.main-navigation ul {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-navigation a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
  padding: 0.5rem 0;
  position: relative;
}

.main-navigation a:hover {
  color: var(--primary);
}

.main-navigation a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.2s;
  border-radius: 2px;
}

.main-navigation a:hover::after {
  width: 100%;
}

.page {
  max-width: 1600px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  padding-top: calc(var(--nav-height) + 2rem); /* Add padding for fixed header on non-home pages */
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  flex-direction: column;
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: 1.5rem;
  padding-top: 2rem;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  color: var(--primary);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.1), 0 2px 4px -1px rgba(37, 99, 235, 0.06);
  transition: all 0.3s ease;
}

.brand-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.15), 0 4px 6px -2px rgba(37, 99, 235, 0.1);
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(37, 99, 235, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.hero-title {
  font-size: 4rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #0f172a 30%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: #0f172a;
  line-height: 1.1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05));
}

.hero-subtitle {
  color: #0f172a;
  font-size: 1.5rem;
  font-weight: 700;
  max-width: 800px;
  margin: 0 auto 2rem;
  line-height: 1.4;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9);
  letter-spacing: -0.01em;
}

.stats-container {
  display: inline-flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  padding: 1.5rem 3rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
  transition: all 0.3s ease;
}

.stats-container:hover {
  transform: translateY(-2px);
  box-shadow: 0 25px 30px -5px rgba(0, 0, 0, 0.08), 0 10px 15px -6px rgba(0, 0, 0, 0.04);
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 120px;
  position: relative;
}

.stat-card:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 30px;
  background-color: var(--border);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
  font-weight: 500;
}

.stat-card.highlight .stat-value {
  color: var(--primary);
}

/* Search Section */
.search-section {
  margin-bottom: 2rem;
  position: sticky;
  top: calc(var(--nav-height) + 1rem); /* Stick below header */
  z-index: 50;
}

.search-container {
  max-width: 600px;
  margin: 0 auto;
}

.search-input-wrapper {
  position: relative;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-radius: 24px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 5px 10px -5px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-input-wrapper:focus-within {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.15), 0 8px 10px -6px rgba(37, 99, 235, 0.1);
  transform: scale(1.02);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

#search-input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  font-size: 1rem;
  border: none;
  background: transparent;
  outline: none;
  color: var(--text-main);
}

.clear-btn {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.clear-btn:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

.search-status {
  text-align: center;
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(4px);
  padding: 0.5rem;
  border-radius: 99px;
  display: inline-block;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

/* Homepage Widgets Section */
.widgets-section {
  max-width: 1600px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
  position: relative;
  z-index: 10;
}

.hero-banner-wrapper.has-bg + .widgets-section {
  margin-top: -3.5rem;
}

.widgets-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.widget-card {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 16px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow: 0 10px 26px -10px rgba(15, 23, 42, 0.28);
  position: relative;
  overflow: hidden;
}

.widget-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.36);
  box-shadow: 0 16px 34px -10px rgba(15, 23, 42, 0.34);
  border-color: rgba(255, 255, 255, 0.58);
}

.widget-icon-box {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  flex-shrink: 0;
  font-size: 1.75rem;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.widget-content {
  flex: 1;
  min-width: 0;
}

.widget-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.widget-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.widget-go-btn {
  background: #3b82f6;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  opacity: 0.9;
}

.widget-go-btn svg {
  width: 10px;
  height: 10px;
}

.widget-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

@media (max-width: 1024px) {
  .widgets-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .widgets-section,
  .hero-banner-wrapper.has-bg + .widgets-section {
    margin-top: -2rem;
  }

  .widgets-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .widget-card {
    padding: 0.75rem;
    flex-direction: row;
    text-align: left;
    align-items: center;
    height: 100%;
  }
  
  .widget-icon-box {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
    margin-right: 0.75rem;
    margin-bottom: 0;
    border-radius: 10px;
  }
  
  .widget-content {
    flex: 1;
    min-width: 0;
  }
  
  .widget-header {
    justify-content: flex-start;
    margin-bottom: 0.15rem;
    flex-wrap: nowrap;
    gap: 0.25rem;
  }
  
  .widget-title {
    font-size: 0.9rem;
  }
  
  .widget-go-btn {
    display: none !important;
  }

  .widget-desc {
    font-size: 0.7rem;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    line-height: 1.3;
    opacity: 0.8;
    display: block;
  }
}

/* Results Section */
.results-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 1400px) {
  .results-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .results-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.resource-card {
  background: var(--bg-surface);
  border: 1px solid rgba(226, 232, 240, 0.6);
  border-radius: 16px;
  padding: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
}

.resource-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  border-color: rgba(37, 99, 235, 0.3);
}

/* 置顶文章样式 */
.resource-card.sticky-post {
  border: 2px solid var(--primary);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.02) 0%, rgba(37, 99, 235, 0.05) 100%);
}

.resource-card.sticky-post:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.2);
}

.sticky-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  z-index: 3;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
  letter-spacing: 0.5px;
}

.card-content {
  display: flex;
  flex-direction: column;
  padding: 1rem;
}

.card-meta-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.resource-category-pill {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(37, 99, 235, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 8px;
  display: inline-block;
  transition: all 0.2s;
}

.resource-card:hover .resource-category-pill {
  background: var(--primary);
  color: #fff;
}

.resource-date {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.resource-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0;
  line-height: 1.5;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-file-info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
}

.file-size,
.file-format {
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 4px 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    line-height: 1;
}

.file-size {
    color: #0f766e;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.16), rgba(45, 212, 191, 0.08));
    border-color: rgba(20, 184, 166, 0.35);
}

.file-format {
    color: #1d4ed8;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.16), rgba(96, 165, 250, 0.08));
    border-color: rgba(59, 130, 246, 0.35);
}

.file-size svg,
.file-format svg {
    opacity: 0.95;
    stroke-width: 2.2;
}

[data-theme="dark"] .file-size {
    color: #5eead4;
    background: rgba(20, 184, 166, 0.16);
    border-color: rgba(45, 212, 191, 0.45);
}

[data-theme="dark"] .file-format {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.16);
    border-color: rgba(96, 165, 250, 0.45);
}

/* Card Thumbnail */
.card-thumbnail {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 0;
  margin-bottom: 0;
  background: #f1f5f9;
  position: relative;
}

.card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.resource-card:hover .card-thumbnail img {
  transform: scale(1.08);
}

/* View Count Badge */
.view-count-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.view-count-badge svg {
  width: 12px;
  height: 12px;
  opacity: 0.9;
}

/* Single Page Styles */
.single-post-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.single-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.5rem;
}

.single-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.single-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.single-preview {
    margin-bottom: 2rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.single-preview img {
    width: 100%;
    height: auto;
    display: block;
}

.single-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    grid-template-areas:
        "main side"
        "bottom side";
    column-gap: 2rem;
    row-gap: 1.75rem;
    --side-panel-offset: 120px;
}

.content-area {
    grid-area: main;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-main);
}

.bottom-area {
    grid-area: bottom;
    width: 100% !important;
}

.single-content-grid > .bottom-area[style] {
    grid-column: auto !important;
}

.content-area p {
    margin-bottom: 1.5rem;
}

.content-area img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 1rem 0;
}

.content-area-title {
    margin-top: 0;
    font-size: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.6rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.entry-content.js-article-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.content-module {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    padding: 1.15rem 1.2rem;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.content-module:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.content-module h2 {
    margin: 0 0 0.9rem;
    font-size: 1.3rem;
    line-height: 1.35;
    color: var(--text-main);
    font-weight: 800;
    scroll-margin-top: calc(var(--nav-height) + 20px);
}

.content-module h2.segmented-heading {
    position: relative;
    padding-left: 1.25rem;
}

.content-module h3 {
    scroll-margin-top: calc(var(--nav-height) + 20px);
}

.content-module h2.segmented-heading::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.08em;
    width: 6px;
    height: 1.15em;
    border-radius: 0;
    background: linear-gradient(180deg, var(--primary), #60a5fa);
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.28);
}

[data-theme="dark"] .content-module h2.segmented-heading::before {
    background: linear-gradient(180deg, #60a5fa, #3b82f6);
    box-shadow: 0 2px 12px rgba(59, 130, 246, 0.45);
}

.content-module p:last-child {
    margin-bottom: 0;
}

.content-module h3 {
    margin: 0.25rem 0 0.75rem;
    font-size: 1.06rem;
    color: var(--text-main);
    opacity: 0.9;
    padding-left: 0.7rem;
    border-left: 3px solid rgba(37, 99, 235, 0.35);
}

.content-module .auto-subheading {
    font-size: 1.22rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.article-toc-card {
    margin-top: 1.25rem;
    padding-top: 1.1rem;
    border-top: 1px dashed var(--border);
}

.article-toc-title {
    margin: 0 0 0.65rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.toc-link {
    display: block;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.4;
    padding: 0.45rem 0.55rem;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.toc-link:hover {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
}

.toc-link.active {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.12);
    font-weight: 600;
}

.toc-link.is-sub {
    padding-left: 1.15rem;
    font-size: 0.84rem;
}

[data-theme="dark"] .content-module {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(148, 163, 184, 0.24);
    box-shadow: 0 10px 20px rgba(2, 6, 23, 0.28);
}

[data-theme="dark"] .content-area-title {
    border-bottom-color: rgba(148, 163, 184, 0.25);
}

[data-theme="dark"] .content-module h3 {
    border-left-color: rgba(96, 165, 250, 0.45);
}

[data-theme="dark"] .article-toc-card {
    border-top-color: rgba(148, 163, 184, 0.3);
}

.sidebar-area {
    grid-area: side;
    background: linear-gradient(to bottom, #f8fafc, #fff);
    padding: 1.5rem;
    border-radius: 20px;
    height: fit-content;
    justify-self: stretch;
    width: 100%;
    position: sticky;
    top: calc(var(--nav-height) + 1rem + var(--side-panel-offset));
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.resource-side-panel {
    align-self: start;
    position: sticky !important;
    top: calc(var(--nav-height) + 1rem + var(--side-panel-offset)) !important;
    inset: auto !important;
    will-change: auto;
}

/* 详情页：有截图/视频模块时，让右侧下载模块顶部对齐到“截图与视频”标题下方分割线 */
.single-content-grid.has-steam-media {
    --side-panel-align-to-media-title-line: 58px;
}

.single-content-grid.has-steam-media .resource-side-panel {
    margin-top: var(--side-panel-align-to-media-title-line);
}

.content-area .steam-media-section {
    margin-bottom: 1.15rem;
}

.content-area-title {
    margin-top: 0.2rem;
}

.download-btn {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #fff;
    text-align: center;
    padding: 1rem;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3), 0 2px 4px -1px rgba(37, 99, 235, 0.15);
    border: none;
    font-family: inherit;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.4), 0 4px 6px -2px rgba(37, 99, 235, 0.2);
    filter: brightness(1.1);
}

/* Steam 配置需求卡片 */
.steam-requirements-card {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 16px;
    padding: 1rem 1.1rem;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
}

.steam-requirements-title {
    margin: 0 0 0.9rem;
    font-size: 1.3rem;
    line-height: 1.35;
    font-weight: 800;
    color: var(--text-main);
    position: relative;
    padding-left: 1.25rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border);
}

.steam-requirements-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.08em;
    width: 6px;
    height: 1.15em;
    border-radius: 0;
    background: linear-gradient(180deg, var(--primary), #60a5fa);
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.28);
}

[data-theme="dark"] .steam-requirements-title::before {
    background: linear-gradient(180deg, #60a5fa, #3b82f6);
    box-shadow: 0 2px 12px rgba(59, 130, 246, 0.45);
}

.steam-requirements-block + .steam-requirements-block {
    margin-top: 0.9rem;
    padding-top: 0.85rem;
    border-top: 1px dashed var(--border);
}

.steam-requirements-block h4 {
    margin: 0 0 0.15rem;
    font-size: 0.96rem;
    color: var(--text-main);
    line-height: 1.35;
}

.steam-requirements-content {
    color: var(--text-main);
    font-size: 0.94rem;
    line-height: 1.65;
    margin-top: 0;
}

.steam-requirements-content ul,
.steam-requirements-content ol {
    margin: 0.4rem 0 0.2rem 1.1rem;
    padding: 0;
}

.steam-requirements-content p {
    margin: 0.25rem 0;
}

.steam-requirements-content > :first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

[data-theme="dark"] .steam-requirements-card {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(148, 163, 184, 0.28);
    box-shadow: 0 10px 20px rgba(2, 6, 23, 0.3);
}

.steam-buy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    background: linear-gradient(135deg, #171a21 0%, #1b2838 100%);
    color: #fff;
    text-align: center;
    padding: 0.875rem;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.steam-buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #1b2838 0%, #2a475e 100%);
    border-color: #66c0f4;
    color: #66c0f4;
}

.steam-buy-btn .steam-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.info-row:last-of-type {
    border-bottom: none;
}

.info-label {
    color: var(--text-muted);
}

.info-value {
    font-weight: 500;
    color: var(--text-main);
}

.tag-pill {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 99px;
    display: inline-block;
    transition: all 0.2s;
    padding: 0.35rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.tag-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .single-content-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "main"
            "side"
            "bottom";
        gap: 0;
        --side-panel-offset: 0px;
        direction: ltr;
    }

    .content-area {
        grid-area: main;
    }
    .sidebar-area {
        grid-area: side;
        margin-top: 2rem;
        margin-bottom: 0;
        position: static;
        top: auto;
        box-shadow: none;
    }
    .resource-side-panel {
        position: static !important;
        top: auto !important;
        margin-top: 0;
    }
    .single-content-grid.has-steam-media .resource-side-panel {
        margin-top: 0;
    }

    .content-module {
        padding: 1rem;
        border-radius: 14px;
    }

    .article-toc-card {
        margin-top: 1rem;
    }

    .bottom-area {
        grid-area: bottom;
    }
}

/* Post Navigation */
.post-navigation {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.nav-previous, .nav-next {
    width: 100%;
}

.nav-previous a, .nav-next a {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.2s;
}

.nav-previous a:hover, .nav-next a:hover {
    border-color: var(--primary);
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.nav-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.nav-title {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.4;
}

@media (max-width: 640px) {
    .nav-links {
        grid-template-columns: 1fr;
    }
}

/* Download Modal */
.download-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.download-modal.hidden {
    display: none;
}

.download-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.download-modal-content {
    position: relative;
    background: #fff;
    width: 90%;
    max-width: 450px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 2001;
    overflow: hidden;
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.download-modal-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}

.download-modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 0.5rem;
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--text-main);
}

.download-options {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.download-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.download-option:hover {
    border-color: var(--primary);
    background: #f0f9ff;
}

.option-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.option-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: contain;
    flex-shrink: 0;
    background: #f8fafc;
    padding: 2px;
}

.quark-icon {
    background: linear-gradient(135deg, #0084ff, #0056b3);
}

.baidu-icon {
    background: linear-gradient(135deg, #06a7ff, #0681ff);
}

.xunlei-icon {
    background: linear-gradient(135deg, #00a4ff, #0066cc);
}

.option-info {
    flex: 1;
}

.option-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.pwd-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: #fff;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.option-btn {
    padding: 0.5rem 1rem;
    background: #fff;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 99px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.option-btn:hover {
    background: var(--primary);
    color: #fff;
}

.no-download {
    text-align: center;
    color: var(--text-muted);
    padding: 1rem;
}

/* Utilities */
.hidden { display: none !important; }
.text-center { text-align: center; }

/* Pagination */
.pagination {
  margin-top: 3rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.load-more-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 0.875rem 2.5rem;
  border-radius: 99px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.load-more-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
}

/* Footer */
.footer {
  margin-top: auto;
  padding-top: 3rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
}
.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-main);
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.mobile-menu-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

.mobile-menu-toggle .close-icon {
    display: none;
}

.mobile-menu-toggle.active .menu-icon {
    display: none;
}

.mobile-menu-toggle.active .close-icon {
    display: block;
}

@media (max-width: 640px) {
    /* Mobile Header Layout - Logo left, Menu button right */
    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0 1rem;
    }
    
    .site-header-nav {
        height: var(--nav-height);
        position: sticky;
    }
    
    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Hide navigation by default on mobile */
    .main-navigation {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--border);
        padding: 1rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
        z-index: 999;
        box-shadow: var(--shadow-md);
    }
    
    .main-navigation.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }
    
    .main-navigation li {
        border-bottom: 1px solid var(--border);
    }
    
    .main-navigation li:last-child {
        border-bottom: none;
    }
    
    .main-navigation a {
        display: block;
        padding: 1rem;
        font-size: 1rem;
        text-align: center;
        color: var(--text-main) !important;
        text-shadow: none !important;
    }
    
    .main-navigation a::after {
        display: none;
    }
    
    /* Hide header-actions content except toggle on mobile */
    .header-actions {
        order: 2;
    }
    
    .hero-title { font-size: 3.5rem; }
    .page { padding: 1rem; } /* Reduced padding */
    .stats-container { width: 100%; justify-content: space-around; padding: 1rem; }
    
    /* Mobile Grid - 2 Columns */
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    /* Mobile Card Optimizations */
        .resource-card {
            padding: 0;
            border-radius: 12px; /* Consistent modern radius */
            box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* Lighter shadow for mobile performance */
        }
        
        .resource-card:hover {
            transform: none; /* Disable lift on touch devices to prevent jumpiness */
        }
    
    .card-thumbnail {
        height: 120px; /* 移动端固定高度 */
        border-radius: 0;
        margin-bottom: 0;
    }

    .card-content {
        padding: 0.75rem;
    }
    
    .card-thumbnail img {
        object-fit: cover;
        object-position: center;
    }
    
    .resource-title {
        font-size: 0.95rem; /* Smaller title */
        line-height: 1.35;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .resource-category-pill {
        font-size: 0.65rem;
        padding: 0.15rem 0.4rem;
    }
    
    .resource-date {
        font-size: 0.65rem;
    }
    
    .card-meta-top {
        margin-bottom: 0.35rem;
    }
    
    .view-count-badge {
        font-size: 0.6rem;
        padding: 2px 6px;
        top: 6px;
        right: 6px;
    }
    
    .view-count-badge svg {
        width: 10px;
        height: 10px;
    }

    /* 手机端：压缩大小/版本标签，尽量保持同一行 */
    .card-file-info {
        margin-top: 6px;
        padding-top: 6px;
        gap: 4px;
        flex-wrap: nowrap;
        align-items: center;
        overflow: hidden;
    }

    .file-size,
    .file-format {
        font-size: 0.66rem;
        padding: 2px 6px;
        gap: 3px;
        line-height: 1;
        min-width: 0;
        white-space: nowrap;
        border-radius: 999px;
    }

    .file-size {
        flex: 0 0 auto;
    }

    .file-format {
        flex: 1 1 auto;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .file-size svg,
    .file-format svg {
        width: 10px;
        height: 10px;
    }
}
/* Post Navigation */
.post-navigation {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.nav-links {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.nav-previous, .nav-next {
    width: 48%;
}

.nav-previous a, .nav-next a {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.2s;
    height: 100%;
}

.nav-previous a:hover, .nav-next a:hover {
    border-color: var(--primary);
    background: #f8fafc;
}

.nav-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-title {
    font-weight: 600;
    color: var(--text-main);
    font-size: 1rem;
}

/* Download Modal */
.download-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.download-modal.hidden {
    display: none;
}

.download-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.download-modal-content {
    position: relative;
    background: #fff;
    width: 90%;
    max-width: 450px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 2001;
    overflow: hidden;
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.download-modal-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}

.download-modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 0.5rem;
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--text-main);
}

.download-options {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.download-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.download-option:hover {
    border-color: var(--primary);
    background: #f0f9ff;
}

.option-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.quark-icon {
    background: linear-gradient(135deg, #0084ff, #0056b3);
}

.baidu-icon {
    background: linear-gradient(135deg, #06a7ff, #0681ff);
}

.option-info {
    flex: 1;
}

.option-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.pwd-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: #fff;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.option-btn {
    padding: 0.5rem 1rem;
    background: #fff;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 99px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.option-btn:hover {
    background: var(--primary);
    color: #fff;
}

.no-download {
    text-align: center;
    color: var(--text-muted);
    padding: 1rem;
}

/* Download Modal QR Code Styles */
.download-tip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-bottom: 1px solid #fcd34d;
    color: #92400e;
    font-size: 0.875rem;
    line-height: 1.5;
}

.download-tip svg {
    flex-shrink: 0;
    color: #d97706;
}

/* Show QR Code Button */
.show-qrcode-btn {
    cursor: pointer;
    font-family: inherit;
}

.show-qrcode-btn.active {
    background: var(--primary);
    color: #fff;
}

/* QR Code Expand Area */
.qrcode-expand-area {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: var(--radius-md);
    border: 1px dashed var(--border);
    margin-top: -0.5rem;
    animation: slideDown 0.3s ease;
}

.qrcode-expand-area.hidden {
    display: none !important;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.qrcode-container {
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 12px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.qrcode-container canvas,
.qrcode-container img {
    max-width: 100%;
    max-height: 100%;
}

.qrcode-hint {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
    font-weight: 500;
}

/* Desktop/Mobile visibility classes */
.desktop-only {
    display: flex;
}

.mobile-only {
    display: none;
}

@media (max-width: 640px) {
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: flex !important;
    }
}

/* Announcement Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--bg-surface);
  width: 90%;
  max-width: 500px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 2001;
  overflow: hidden;
  animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-body);
}

.modal-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-main);
}

.modal-body {
  padding: 1.5rem;
  color: var(--text-main);
  line-height: 1.6;
}

.modal-body p {
  margin-bottom: 1rem;
}

.modal-body p:last-child {
  margin-bottom: 0;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--bg-body);
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.modal-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}

.modal-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Adjust for when announcement is not present */
/* body .site-header-nav {
    top: 0;
} */

body .search-section {
    top: calc(var(--nav-height) + 1rem);
}


/* Guestbook Section */
.guestbook-page-wrapper {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.guestbook-hero {
    text-align: center;
    padding: 3rem 0 2rem;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
    margin-bottom: 1rem;
}

/* Top Area: Form + Stats */
.guestbook-top-area {
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.guestbook-form-card {
    background: var(--bg-surface);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.form-header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1rem;
}

.guestbook-form-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.form-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

.form-row {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nickname-group {
    width: 200px;
    flex-shrink: 0;
}

.message-group {
    flex: 1;
    position: relative;
}

.nickname-input, .message-input-line {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    font-family: inherit;
    font-size: 0.95rem;
    background: #f8fafc;
    color: var(--text-main);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.message-input-line {
    padding-right: 48px; /* Space for emoji trigger */
}

.nickname-input:focus, .message-input-line:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1), 0 4px 6px -1px rgba(37, 99, 235, 0.1);
    background: #fff;
    transform: translateY(-1px);
}

.emoji-trigger {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-trigger:hover {
    background: rgba(0,0,0,0.05);
    color: var(--primary);
}

.emoji-picker {
    position: absolute;
    top: 100%;
    right: 0;
    width: 280px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.75rem;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    margin-top: 8px;
    z-index: 10;
}

.emoji-picker.hidden {
    display: none;
}

.emoji-item {
    cursor: pointer;
    font-size: 1.25rem;
    text-align: center;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s;
    user-select: none;
}

.emoji-item:hover {
    background: var(--bg-body);
    transform: scale(1.2);
}

.submit-btn {
    padding: 0.75rem 2rem;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-md);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    white-space: nowrap;
}

.submit-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Mini Stats */
.guestbook-stats-mini {
    display: flex;
    justify-content: center;
}

.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 99px;
    font-size: 0.875rem;
    color: var(--text-muted);
    box-shadow: var(--shadow-sm);
}

.stat-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.stat-text strong {
    color: var(--text-main);
    font-weight: 600;
}

/* Grid Layout - 4 columns */
.guestbook-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    align-items: start;
}

/* Legacy masonry class for compatibility */
.guestbook-masonry {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.guestbook-card {
    background: var(--bg-surface);
    border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    padding: 1.25rem; /* Base padding for mobile */
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    break-inside: avoid;
    overflow: hidden;
    min-width: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.guestbook-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    border-color: rgba(37, 99, 235, 0.2);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.delete-message-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-left: auto;
    flex-shrink: 0;
    opacity: 0;
}

.guestbook-card:hover .delete-message-btn {
    opacity: 1;
}

.delete-message-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.delete-message-btn svg {
    width: 14px;
    height: 14px;
}

.message-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
    text-transform: uppercase;
}

.header-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.message-author {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-date {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.card-body {
    color: var(--text-main);
    line-height: 1.5;
    font-size: 0.9rem;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Admin Reply Section */
.admin-reply-section {
    margin-top: 1rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(37, 99, 235, 0.1) 100%);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
    overflow: hidden;
}

.admin-reply-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 0.5rem;
}

.admin-avatar {
    width: 20px;
    height: 20px;
    min-width: 20px;
    background: var(--primary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.admin-avatar svg {
    width: 12px;
    height: 12px;
}

.admin-label {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.8rem;
    white-space: nowrap;
}

.reply-date {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.delete-reply-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-left: auto;
    flex-shrink: 0;
}

.delete-reply-btn svg {
    width: 12px;
    height: 12px;
}

.delete-reply-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.admin-reply-content {
    color: var(--text-main);
    font-size: 0.85rem;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Admin Reply Form */
.admin-reply-form-wrapper {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border);
}

.admin-reply-form-wrapper.hidden {
    display: none;
}

.toggle-reply-form-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-reply-form-btn:hover {
    background: rgba(37, 99, 235, 0.15);
    border-color: var(--primary);
}

.admin-reply-form {
    margin-top: 0.75rem;
}

.admin-reply-form.hidden {
    display: none;
}

.admin-reply-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 60px;
    background: var(--bg-surface);
    color: var(--text-main);
    transition: all 0.2s;
}

.admin-reply-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.reply-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.cancel-reply-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-body);
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.cancel-reply-btn:hover {
    background: var(--bg-surface);
    color: var(--text-main);
}

.submit-reply-btn {
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.submit-reply-btn:hover {
    background: var(--primary-hover);
}

.submit-reply-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Card with reply indicator */
.guestbook-card.has-reply {
    border-color: rgba(37, 99, 235, 0.3);
}

.empty-guestbook-wide {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border);
    color: var(--text-muted);
}

/* Guestbook Pagination */
.guestbook-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.page-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--bg-surface);
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.page-btn:hover:not(.disabled) {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    background: var(--bg-surface);
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.page-num:hover:not(.current) {
    border-color: var(--primary);
    color: var(--primary);
}

.page-num.current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.page-dots {
    color: var(--text-muted);
    padding: 0 0.25rem;
}

/* Responsive breakpoints for guestbook grid */
/* Increase card padding on desktop for "bigger box" feel */
@media (min-width: 901px) {
    .guestbook-card {
        padding: 2.5rem;
        gap: 1.25rem;
        min-height: 280px;
        display: flex;
        flex-direction: column;
    }
    
    .card-body {
        font-size: 1.05rem;
        flex: 1;
    }

    .message-author {
        font-size: 1.1rem;
    }
}

@media (max-width: 900px) {
    .guestbook-grid,
    .guestbook-masonry {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .nickname-group {
        width: 100%;
    }
    
    .guestbook-grid,
    .guestbook-masonry {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .guestbook-hero {
        padding: 2rem 0;
    }
    
    /* Pagination mobile */
    .guestbook-pagination {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .page-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .page-numbers {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    
    .page-num {
        min-width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .guestbook-grid,
    .guestbook-masonry {
        grid-template-columns: 1fr;
    }
}


/* ====================================================================================
   Steam Media Gallery Styles - 双Swiper联动模式
   ==================================================================================== */

.steam-media-section {
    margin-bottom: 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
}

.steam-media-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.9rem;
    display: flex;
    align-items: center;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.75rem;
}

.steam-media-title svg {
    color: var(--primary);
    flex-shrink: 0;
}

/* 双Swiper容器 */
.steam-gallery-container {
    position: relative;
    width: 100%;
}

/* 主显示区 - Gallery Top */
.gallery-top {
    width: 100%;
    margin-bottom: 0.7rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #f1f5f9;
    max-width: 760px;
    margin-right: auto;
}

.gallery-top .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 缩略图导航 - Gallery Thumbs */
.gallery-thumbs {
    width: 100%;
    height: 80px;
    padding: 0;
}

.gallery-thumbs .swiper-wrapper {
    height: 100%;
    align-items: stretch;
}

.gallery-thumbs .swiper-slide {
    width: auto !important;
    height: 100% !important;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s;
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: flex;
    align-items: stretch;
    box-sizing: border-box;
}

.gallery-thumbs .swiper-slide-thumb-active {
    opacity: 1;
    border: 2px solid var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.media-thumb-item {
    position: relative;
    width: 120px;
    height: 100%;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #f1f5f9;
}

.media-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0 !important;
    border-radius: 0;
}

/* 视频缩略图播放图标覆盖层 */
.thumb-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.thumb-overlay svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.steam-media-gallery {
    position: relative;
    width: 100%;
    overflow: visible;
    margin: 0 -10px;
    padding: 0 10px;
}

.steam-media-gallery .swiper-wrapper {
    display: flex;
    align-items: stretch;
    padding-bottom: 10px;
}

.steam-media-gallery .swiper-slide {
    height: auto;
    display: flex;
    box-sizing: border-box;
}

.media-item {
    width: 100%;
    height: 0;
    padding-bottom: 50%; /* 更紧凑的展示比例 */
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #f1f5f9;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.media-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.media-item img,
.media-item video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.media-item video {
    cursor: pointer;
}

.steam-video-shell {
    position: absolute;
    inset: 0;
}

.steam-video-controls {
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0.45rem 0.55rem;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.8));
    backdrop-filter: blur(8px);
    z-index: 4;
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.steam-video-shell:hover .steam-video-controls,
.steam-video-shell:focus-within .steam-video-controls {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.video-control-btn {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: 999px;
    font-size: 0.74rem;
    line-height: 1;
    font-weight: 600;
    padding: 0.35rem 0.6rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.video-control-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.42);
}

.video-control-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.video-time-wrap {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.72rem;
    min-width: 88px;
    justify-content: flex-end;
}

.video-time-sep {
    opacity: 0.55;
}

.video-progress {
    width: 100%;
    appearance: none;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
}

.video-progress::-webkit-slider-thumb {
    appearance: none;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #fff;
    border: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.video-progress::-moz-range-thumb {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #fff;
    border: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.media-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(37, 99, 235, 0.9);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    backdrop-filter: blur(4px);
}

/* Swiper Navigation Buttons - 主显示区 */
.gallery-top .swiper-button-prev,
.gallery-top .swiper-button-next {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

.gallery-top .swiper-button-prev:after,
.gallery-top .swiper-button-next:after {
    font-size: 20px;
    font-weight: 900;
    color: var(--primary);
}

.gallery-top .swiper-button-prev:hover,
.gallery-top .swiper-button-next:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.gallery-top .swiper-button-prev:hover:after,
.gallery-top .swiper-button-next:hover:after {
    color: #fff;
}

.gallery-top .swiper-button-disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* 旧版单一轮播样式保留（兼容性） */
.steam-media-gallery .swiper-button-prev,
.steam-media-gallery .swiper-button-next {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s;
}

.steam-media-gallery .swiper-button-prev:after,
.steam-media-gallery .swiper-button-next:after {
    font-size: 18px;
    font-weight: 900;
    color: var(--primary);
}

.steam-media-gallery .swiper-button-prev:hover,
.steam-media-gallery .swiper-button-next:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.steam-media-gallery .swiper-button-prev:hover:after,
.steam-media-gallery .swiper-button-next:hover:after {
    color: #fff;
}

.steam-media-gallery .swiper-button-disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Swiper Pagination */
.steam-media-gallery .swiper-pagination {
    position: relative;
    margin-top: 1.5rem;
    bottom: auto;
}

.steam-media-gallery .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: var(--border);
    opacity: 1;
    transition: all 0.3s;
}

.steam-media-gallery .swiper-pagination-bullet-active {
    background: var(--primary);
    width: 24px;
    border-radius: 5px;
}

/* Video Item Hover Effect */
.video-item:hover {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

/* Image Item Hover Effect */
.image-item img {
    transition: transform 0.5s ease;
}

.image-item:hover img {
    transform: scale(1.05);
}

/* Tablet Responsive */
@media (max-width: 1024px) {
    .steam-media-gallery {
        margin: 0;
        padding: 0;
    }
    
    .media-thumb-item {
        width: 100px;
    }
}

/* Mobile Responsive - 双Swiper联动模式 */
@media (max-width: 768px) {
    .steam-media-section {
        padding: 1rem;
        margin-bottom: 1.5rem;
        border-radius: var(--radius-md);
    }
    
    .steam-media-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .steam-media-title svg {
        width: 18px;
        height: 18px;
    }
    
    /* 双Swiper容器 - 移动端 */
    .steam-gallery-container {
        width: 100%;
        overflow: hidden;
    }
    
    /* 主显示区 - 移动端 */
    .gallery-top {
        width: 100%;
        margin-bottom: 0.75rem;
        border-radius: var(--radius-md);
    }
    
    .gallery-top .swiper-slide {
        width: 100%;
    }
    
    /* 主显示区的媒体项 */
    .gallery-top .media-item {
        width: 100%;
        padding-bottom: 56.25%; /* 16:9 */
        border-radius: var(--radius-md);
    }
    
    .gallery-top .media-item img,
    .gallery-top .media-item video {
        width: 100%;
        height: 100%;
        object-fit: contain;
        background: #000;
    }

    .steam-video-controls {
        left: 0.5rem;
        right: 0.5rem;
        bottom: 0.5rem;
        padding: 0.4rem 0.45rem;
        gap: 0.35rem;
    }

    .video-control-btn {
        font-size: 0.7rem;
        padding: 0.32rem 0.5rem;
    }

    .video-time-wrap {
        min-width: auto;
        font-size: 0.68rem;
    }
    
    /* 缩略图导航 - 移动端优化 */
    .gallery-thumbs {
        height: 60px;
        width: 100%;
        padding: 0.5rem 0;
    }
    
    .gallery-thumbs .swiper-wrapper {
        display: flex;
    }
    
    .gallery-thumbs .swiper-slide {
        width: 90px !important;
        flex-shrink: 0;
    }
    
    .media-thumb-item {
        width: 90px;
        height: 60px;
    }
    
    /* 隐藏主显示区导航按钮 */
    .gallery-top .swiper-button-prev,
    .gallery-top .swiper-button-next {
        display: none;
    }

    .steam-video-controls {
        left: auto;
        right: 0.55rem;
        bottom: 0.55rem;
        width: auto;
        padding: 0;
        gap: 0;
        background: transparent;
        backdrop-filter: none;
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }

    .steam-video-controls .video-control-btn,
    .steam-video-controls .video-time-wrap,
    .steam-video-controls .video-progress {
        display: none;
    }

    .steam-video-controls .video-control-btn[data-action="fullscreen"] {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 46px;
        height: 46px;
        padding: 0 0.9rem;
        font-size: 0.86rem;
        font-weight: 700;
        border-radius: 999px;
        background: rgba(15, 23, 42, 0.7);
        border-color: rgba(255, 255, 255, 0.35);
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    }

    .steam-video-controls .video-control-btn[data-action="fullscreen"]:active {
        transform: scale(1.06);
    }
    
    /* 移动端轮播容器 - 填满宽度 */
    .steam-media-gallery {
        margin: 0;
        padding: 0 1.25rem 1.25rem;
        overflow: hidden;
        max-width: 100%;
        width: 100%;
    }
    
    .steam-media-gallery .swiper-wrapper {
        padding-bottom: 0;
        max-width: 100%;
    }
    
    /* 每张幻灯片填满容器 */
    .steam-media-gallery .swiper-slide {
        width: 100%;
        max-width: 100%;
        padding: 0;
        box-sizing: border-box;
    }
    
    /* 图片/视频容器 - 填满并美化 */
    .media-item {
        padding-bottom: 56.25%; /* 恢复标准16:9 */
        border-radius: var(--radius-md);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
        margin: 0;
        width: 100%;
        max-width: 100%;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }
    
    .media-item img,
    .media-item video {
        border-radius: var(--radius-md);
    }
    
    /* 隐藏导航按钮 */
    .steam-media-gallery .swiper-button-prev,
    .steam-media-gallery .swiper-button-next {
        display: none;
    }
    
    /* 分页器样式优化 */
    .steam-media-gallery .swiper-pagination {
        position: relative;
        margin-top: 1.25rem;
        bottom: auto;
    }
    
    .steam-media-gallery .swiper-pagination-bullet {
        width: 8px;
        height: 8px;
        margin: 0 5px;
        background: var(--border);
        opacity: 1;
    }
    
    .steam-media-gallery .swiper-pagination-bullet-active {
        width: 24px;
        background: var(--primary);
        border-radius: 4px;
    }
    
    /* 标签样式 */
    .media-label {
        font-size: 0.65rem;
        padding: 0.25rem 0.6rem;
        top: 8px;
        left: 8px;
    }
}

/* 小屏手机优化 */
@media (max-width: 640px) {
    .steam-media-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .steam-media-title {
        font-size: 1.125rem;
        margin-bottom: 0.875rem;
    }
    
    /* 双Swiper容器 */
    .steam-gallery-container {
        width: 100%;
    }
    
    /* 主显示区 */
    .gallery-top {
        width: 100%;
        margin-bottom: 0.75rem;
    }
    
    .gallery-top .media-item {
        width: 100%;
        padding-bottom: 56.25%;
    }
    
    /* 缩略图 */
    .gallery-thumbs {
        height: 55px;
    }

    .steam-video-controls {
        gap: 0.3rem;
    }

    .steam-video-controls .video-control-btn[data-action="pip"],
    .steam-video-controls .video-control-btn[data-action="fullscreen"] {
        display: none;
    }

    .video-time-wrap {
        margin-left: 0;
        order: 8;
        width: auto;
    }
    
    .gallery-thumbs .swiper-slide {
        width: 80px !important;
    }
    
    .media-thumb-item {
        width: 80px;
        height: 55px;
    }
    
    /* 旧版轮播容器填满 */
    .steam-media-gallery {
        padding: 0;
        margin: 0;
        overflow: hidden;
        width: 100%;
        max-width: 100%;
    }
    
    .steam-media-gallery .swiper-wrapper {
        width: 100%;
        max-width: 100%;
    }
    
    .steam-media-gallery .swiper-slide {
        width: 100% !important;
        max-width: 100%;
    }
    
    /* 图片填满容器 */
    .steam-media-gallery .media-item {
        padding-bottom: 56.25%;
        border-radius: 12px;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    }
    
    .steam-media-gallery .media-item img,
    .steam-media-gallery .media-item video {
        border-radius: 12px;
    }
    
    .steam-media-gallery .swiper-pagination {
        margin-top: 1rem;
        padding: 0;
    }
    
    .media-label {
        font-size: 0.65rem;
        padding: 0.25rem 0.6rem;
        top: 8px;
        left: 8px;
        backdrop-filter: blur(8px);
        background: rgba(37, 99, 235, 0.95);
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .steam-media-section {
        padding: 0.875rem;
    }
    
    .steam-media-title {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .steam-media-title svg {
        width: 16px;
        height: 16px;
    }
    
    /* 双Swiper - 超小屏 */
    .gallery-thumbs {
        height: 50px;
    }
    
    .gallery-thumbs .swiper-slide {
        width: 75px !important;
    }
    
    .media-thumb-item {
        width: 75px;
        height: 50px;
    }
    
    /* 旧版轮播 */
    .steam-media-gallery {
        padding: 0;
        margin: 0;
    }
    
    .steam-media-gallery .media-item {
        padding-bottom: 56.25%;
        border-radius: 10px;
        width: 100%;
    }
    
    .steam-media-gallery .media-item img,
    .steam-media-gallery .media-item video {
        border-radius: 10px;
    }
}

/* Latest Games Section */
.latest-games-section {
    max-width: 1600px;
    margin: 0 auto 3rem;
    padding: 0 1.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    position: relative;
    padding-left: 1rem;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: linear-gradient(to bottom, var(--primary), #60a5fa);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

.more-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    padding: 0.5rem 1rem;
    border-radius: 99px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
}

.more-link:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.more-link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s;
}

.more-link:hover svg {
    transform: translateX(2px);
}

@media (max-width: 640px) {
    .section-title {
        font-size: 1.25rem;
    }
    .more-link {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Disclaimer Section */
.disclaimer-section {
    max-width: 1600px;
    margin: 3rem auto 2rem;
    padding: 0 1.5rem;
}

.disclaimer-container {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 3rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    text-align: center;
    position: relative;
}

/* Inner decorative frame */
.disclaimer-container::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    pointer-events: none;
}

.disclaimer-title {
    color: #2563eb;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 1.5rem 0;
    letter-spacing: 1px;
}

.disclaimer-content {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.8;
}

.disclaimer-content p {
    margin: 0;
}


/* ====================================================================================
   文章详情页文字溢出修复
   ==================================================================================== */

/* 修复文章详情页所有文本内容的溢出问题 */
.single-post .entry-content,
.single-post .post-content,
.single-post .article-content,
.single-post-container .content-area {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    overflow-x: hidden;
}

/* 修复段落、div等块级元素的文字溢出 */
.single-post .entry-content p,
.single-post .entry-content div,
.single-post .entry-content span,
.single-post-container .content-area p,
.single-post-container .content-area div {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* 修复长URL和链接溢出 */
.single-post .entry-content a,
.single-post-container .content-area a {
    word-break: break-all;
    overflow-wrap: break-word;
}

/* 修复代码块溢出 - 添加横向滚动 */
.single-post .entry-content pre,
.single-post .entry-content code,
.single-post-container .content-area pre,
.single-post-container .content-area code {
    max-width: 100%;
    overflow-x: auto;
    word-wrap: normal;
    white-space: pre-wrap;
    word-break: normal;
}

.single-post .entry-content pre {
    background: #f8fafc;
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    overflow-x: auto;
}

/* 修复表格溢出 - 添加响应式包装器 */
.single-post .entry-content table,
.single-post-container .content-area table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    word-break: normal;
    border-collapse: collapse;
}

.single-post .entry-content table td,
.single-post .entry-content table th,
.single-post-container .content-area table td,
.single-post-container .content-area table th {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 300px;
    padding: 0.5rem;
}

/* 修复图片和媒体元素溢出 */
.single-post .entry-content img,
.single-post .entry-content video,
.single-post .entry-content iframe,
.single-post-container .content-area img,
.single-post-container .content-area video,
.single-post-container .content-area iframe {
    max-width: 100% !important;
    height: auto !important;
    display: block;
}

/* 修复嵌入内容溢出 */
.single-post .entry-content iframe,
.single-post-container .content-area iframe {
    max-width: 100%;
    border: none;
}

/* 修复列表溢出 */
.single-post .entry-content ul,
.single-post .entry-content ol,
.single-post-container .content-area ul,
.single-post-container .content-area ol {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    padding-left: 2rem;
}

.single-post .entry-content li,
.single-post-container .content-area li {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* 修复引用块溢出 */
.single-post .entry-content blockquote,
.single-post-container .content-area blockquote {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    padding: 1rem;
    border-left: 4px solid var(--primary);
    background: #f8fafc;
    margin: 1rem 0;
}

/* 移动端额外优化 */
@media (max-width: 768px) {
    .single-post .entry-content,
    .single-post-container .content-area {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .single-post .entry-content pre,
    .single-post-container .content-area pre {
        font-size: 0.85rem;
        padding: 0.75rem;
    }
    
    .single-post .entry-content table,
    .single-post-container .content-area table {
        font-size: 0.85rem;
    }
    
    .single-post .entry-content table td,
    .single-post .entry-content table th,
    .single-post-container .content-area table td,
    .single-post-container .content-area table th {
        max-width: 200px;
        padding: 0.4rem;
    }
}


/* ====================================================================================
   移动端显示优化 - 修复右侧截断和padding过大问题
   ==================================================================================== */

/* 平板端优化 */
@media(max-width: 768px) {
    .single-post-container {
        padding: 1.5rem 1rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .single-title {
        font-size: 1.75rem;
        word-wrap: break-word;
    }
}

/* 手机端优化 */
@media (max-width: 640px) {
    .page {
        padding: 0.5rem;
        width: 100%;
        overflow-x: hidden;
    }
    
    .single-post-container {
        padding: 1rem 0.75rem;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
        border-left: none;
        border-right: none;
        border-radius: 0;
    }
    
    .single-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }
    
    .single-title {
        font-size: 1.5rem;
        line-height: 1.3;
        margin-bottom: 0.5rem;
    }
    
    /* Steam媒体区域全宽显示 */
    .steam-gallery-container,
    .steam-media-section {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
    }
    
    .steam-media-section {
        padding: 0.75rem;
        margin-left: -0.75rem;
        margin-right: -0.75rem;
        width: calc(100% + 1.5rem);
        max-width: calc(100% + 1.5rem);
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .gallery-top {
        border-radius: 0;
    }

    .gallery-top .media-item {
        border-radius: 0;
    }
}


/* ====================================================================================
   文章详情评论区样式（与站点风格统一）
   ==================================================================================== */
.single-post-container .comments-area {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.single-post-container .comments-title,
.single-post-container .comment-reply-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.85rem;
    line-height: 1.3;
}

.single-post-container .comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.single-post-container .comment-list .children {
    list-style: none;
    margin: 1rem 0 0 2.25rem;
    padding: 0;
    border-left: 2px solid var(--border);
    padding-left: 1rem;
}

.single-post-container .comment {
    margin-bottom: 1rem;
}

.single-post-container .comment-body {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.8rem 0.9rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.single-post-container .comment-body:hover {
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: var(--shadow-md);
}

.single-post-container .comment-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    color: var(--text-main);
    font-weight: 600;
    font-style: normal;
    font-size: 0.95rem;
}

.single-post-container .comment-author .avatar {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid var(--border);
}

.single-post-container .comment-metadata {
    margin-bottom: 0.7rem;
    font-size: 0.8rem;
}

.single-post-container .comment-metadata a {
    color: var(--text-muted);
    text-decoration: none;
}

.single-post-container .comment-metadata a:hover {
    color: var(--primary);
}

.single-post-container .comment-content {
    color: var(--text-main);
    line-height: 1.75;
    word-break: break-word;
}

.single-post-container .comment-content p {
    margin: 0.45rem 0;
}

.single-post-container .reply {
    margin-top: 0.65rem;
}

.single-post-container .comment-reply-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary);
    border: 1px solid rgba(37, 99, 235, 0.25);
    border-radius: 999px;
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.single-post-container .comment-reply-link:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.single-post-container .comment-respond {
    margin-top: 1.25rem;
    background: linear-gradient(to bottom, #f8fafc, #fff);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.95rem;
}

.single-post-container .comment-notes,
.single-post-container .logged-in-as {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
}

.single-post-container .comment-form p {
    margin-bottom: 0.85rem;
}

.single-post-container .comment-form label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.88rem;
    color: var(--text-muted);
    font-weight: 500;
}

.single-post-container .comment-form input[type="text"],
.single-post-container .comment-form input[type="email"],
.single-post-container .comment-form input[type="url"],
.single-post-container .comment-form textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
    padding: 0.58rem 0.75rem;
    transition: all 0.2s ease;
    resize: vertical;
}

.single-post-container .comment-form textarea {
    min-height: 96px;
}

.single-post-container .comment-form input:focus,
.single-post-container .comment-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.single-post-container .form-submit {
    margin-bottom: 0;
}

.single-post-container .comment-form .submit {
    display: inline-block;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
    padding: 0.62rem 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.single-post-container .comment-form .submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 15px rgba(37, 99, 235, 0.32);
    filter: brightness(1.03);
}

.single-post-container .comment-awaiting-moderation {
    display: inline-block;
    margin-top: 0.45rem;
    color: #b45309;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 0.2rem 0.55rem;
    font-size: 0.78rem;
}

.single-post-container .no-comments {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin: 0.75rem 0 0;
}

[data-theme="dark"] .single-post-container .comment-respond {
    background: linear-gradient(to bottom, #1e293b, #0f172a);
    border-color: var(--border);
}

[data-theme="dark"] .single-post-container .comment-body {
    background: #151e32;
    border-color: var(--border);
}

[data-theme="dark"] .single-post-container .comment-form input[type="text"],
[data-theme="dark"] .single-post-container .comment-form input[type="email"],
[data-theme="dark"] .single-post-container .comment-form input[type="url"],
[data-theme="dark"] .single-post-container .comment-form textarea {
    background: #0f172a;
    border-color: var(--border);
    color: var(--text-main);
}

@media (max-width: 640px) {
    .single-post-container .comments-area {
        margin-top: 1.75rem;
        padding-top: 1.25rem;
    }

    .single-post-container .comments-title,
    .single-post-container .comment-reply-title {
        font-size: 1.15rem;
    }

    .single-post-container .comment-list .children {
        margin-left: 1rem;
        padding-left: 0.75rem;
    }

    .single-post-container .comment-body {
        padding: 0.85rem 0.9rem;
    }

    .single-post-container .comment-author .avatar {
        width: 30px;
        height: 30px;
    }
}


/* ====================================================================================
   评论区视觉升级（不改评论数据结构与审核逻辑）
   - 自定义结构：作者+时间同一信息行
   - 优化层级、间距、回复按钮、子评论缩进、移动端与暗色模式
   ==================================================================================== */

.single-post-container .comments-area {
    margin-top: 2.75rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.single-post-container .comments-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    font-size: 1.22rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.single-post-container .comments-title::before {
    content: "";
    width: 4px;
    height: 1.1em;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--primary), var(--primary-hover));
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28);
}

.single-post-container .comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.single-post-container .comment-list > .comment,
.single-post-container .comment-list > .pingback,
.single-post-container .comment-list > .trackback {
    margin: 0 0 1rem;
}

.single-post-container .gr-comment-card {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg-surface);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.single-post-container .gr-comment-card:hover {
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.single-post-container .gr-comment-main {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 0.9rem;
    padding: 0.95rem 1rem;
}

.single-post-container .gr-comment-avatar-wrap {
    width: 44px;
}

.single-post-container .gr-comment-avatar {
    display: block;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid var(--border);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    background: #fff;
}

.single-post-container .gr-comment-body-wrap {
    min-width: 0;
}

.single-post-container .gr-comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.42rem;
}

.single-post-container .gr-comment-meta-line {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    min-width: 0;
}

.single-post-container .gr-comment-author,
.single-post-container .gr-comment-author a {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    max-width: 100%;
}

.single-post-container .gr-comment-author a:hover {
    color: var(--primary);
}

.single-post-container .gr-comment-time {
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
}

.single-post-container .gr-comment-edit-link a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.78rem;
    border-bottom: 1px dashed transparent;
}

.single-post-container .gr-comment-edit-link a:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.single-post-container .gr-comment-content {
    color: var(--text-main);
    font-size: 0.93rem;
    line-height: 1.72;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.single-post-container .gr-comment-content p {
    margin: 0.45rem 0;
}

.single-post-container .gr-comment-awaiting {
    margin-top: 0.55rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 0.2rem 0.55rem;
}

.single-post-container .gr-comment-footer {
    margin-top: 0.6rem;
    display: flex;
    justify-content: flex-end;
}

.single-post-container .gr-comment-footer .comment-reply-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0.3rem 0.78rem;
    border-radius: 999px;
    text-decoration: none;
    border: 1px solid rgba(37, 99, 235, 0.28);
    color: var(--primary);
    background: rgba(37, 99, 235, 0.06);
    font-size: 0.79rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.single-post-container .gr-comment-footer .comment-reply-link:hover {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.24);
}

/* 子评论层级与缩进 */
.single-post-container .comment-list .children {
    list-style: none;
    margin: 0.75rem 0 0 1.6rem;
    padding: 0 0 0 0.95rem;
    border-left: 2px solid rgba(148, 163, 184, 0.35);
}

.single-post-container .comment-list .children .gr-comment-card {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.02), rgba(37, 99, 235, 0.01));
}

/* 评论分页 */
.single-post-container .comment-navigation,
.single-post-container .comments-area .navigation {
    margin: 1rem 0 1.25rem;
}

/* 表单优化（保留现有功能） */
.single-post-container .comment-respond {
    margin-top: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.9), #fff);
    padding: 1rem;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.single-post-container .comment-reply-title {
    font-size: 1.06rem;
    font-weight: 700;
    margin-bottom: 0.7rem;
}

.single-post-container .comment-form p {
    margin-bottom: 0.75rem;
}

.single-post-container .comment-form label {
    margin-bottom: 0.32rem;
    display: block;
    font-size: 0.84rem;
    color: var(--text-muted);
    font-weight: 600;
}

.single-post-container .comment-form input[type="text"],
.single-post-container .comment-form input[type="email"],
.single-post-container .comment-form input[type="url"],
.single-post-container .comment-form textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.92rem;
    padding: 0.62rem 0.8rem;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.single-post-container .comment-form textarea {
    min-height: 108px;
    line-height: 1.62;
}

.single-post-container .comment-form input:focus,
.single-post-container .comment-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.13);
}

.single-post-container .comment-form .submit {
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #fff;
    font-size: 0.91rem;
    font-weight: 700;
    padding: 0.62rem 1.25rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.24);
}

.single-post-container .comment-form .submit:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.3);
}

/* 兼容 fallback：默认 WP 输出也按“作者+时间同一信息行”呈现 */
.single-post-container .comment-body > .comment-author,
.single-post-container .comment-body > .comment-metadata {
    display: inline-flex;
    vertical-align: middle;
    margin-bottom: 0;
}

.single-post-container .comment-body > .comment-author {
    margin-right: 0.45rem;
}

.single-post-container .comment-body > .comment-metadata a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.78rem;
}

/* 暗色模式可读性 */
[data-theme="dark"] .single-post-container .gr-comment-card {
    background: #151e32;
    border-color: var(--border);
    box-shadow: 0 4px 12px rgba(2, 6, 23, 0.35);
}

[data-theme="dark"] .single-post-container .gr-comment-card:hover {
    border-color: rgba(59, 130, 246, 0.45);
    box-shadow: 0 12px 24px rgba(2, 6, 23, 0.45);
}

[data-theme="dark"] .single-post-container .gr-comment-avatar {
    background: #0f172a;
    border-color: var(--border);
}

[data-theme="dark"] .single-post-container .gr-comment-time {
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.2);
}

[data-theme="dark"] .single-post-container .comment-list .children {
    border-left-color: rgba(148, 163, 184, 0.45);
}

[data-theme="dark"] .single-post-container .comment-list .children .gr-comment-card {
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.08), rgba(59, 130, 246, 0.04));
}

[data-theme="dark"] .single-post-container .comment-respond {
    background: linear-gradient(180deg, #1e293b, #0f172a);
    border-color: var(--border);
}

[data-theme="dark"] .single-post-container .comment-form input[type="text"],
[data-theme="dark"] .single-post-container .comment-form input[type="email"],
[data-theme="dark"] .single-post-container .comment-form input[type="url"],
[data-theme="dark"] .single-post-container .comment-form textarea {
    background: #0b1220;
    border-color: var(--border);
    color: var(--text-main);
}

/* 移动端优化 */
@media (max-width: 768px) {
    .single-post-container .comments-area {
        margin-top: 2rem;
        padding-top: 1.35rem;
    }

    .single-post-container .comments-title {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }

    .single-post-container .gr-comment-main {
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 0.7rem;
        padding: 0.8rem 0.82rem;
    }

    .single-post-container .gr-comment-avatar-wrap {
        width: 36px;
    }

    .single-post-container .gr-comment-avatar {
        width: 36px;
        height: 36px;
    }

    .single-post-container .gr-comment-author,
    .single-post-container .gr-comment-author a {
        font-size: 0.9rem;
    }

    .single-post-container .gr-comment-time {
        font-size: 0.74rem;
        padding: 0.16rem 0.42rem;
    }

    .single-post-container .gr-comment-content {
        font-size: 0.89rem;
        line-height: 1.64;
    }

    .single-post-container .comment-list .children {
        margin-left: 0.85rem;
        padding-left: 0.68rem;
    }

    .single-post-container .gr-comment-footer {
        margin-top: 0.5rem;
    }

    .single-post-container .gr-comment-footer .comment-reply-link {
        min-height: 28px;
        padding: 0.25rem 0.68rem;
        font-size: 0.75rem;
    }

    .single-post-container .comment-respond {
        border-radius: 14px;
        padding: 0.85rem 0.82rem;
    }

    .single-post-container .comment-reply-title {
        font-size: 1rem;
    }
}

@media (max-width: 420px) {
    .single-post-container .gr-comment-main {
        grid-template-columns: 32px minmax(0, 1fr);
        gap: 0.62rem;
        padding: 0.75rem;
    }

    .single-post-container .gr-comment-avatar-wrap {
        width: 32px;
    }

    .single-post-container .gr-comment-avatar {
        width: 32px;
        height: 32px;
    }

    .single-post-container .gr-comment-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.28rem;
    }

    .single-post-container .gr-comment-meta-line {
        gap: 0.32rem;
    }

    .single-post-container .gr-comment-time {
        margin-top: 0.04rem;
    }

    .single-post-container .gr-comment-footer {
        justify-content: flex-start;
    }
}


/* ====================================================================================
   前端用户系统样式（复用现有 submit-btn / 卡片风格）
   ==================================================================================== */
.header-message-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 38px;
  padding: 0 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.header-message-btn:hover {
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--primary);
  background: rgba(255, 255, 255, 0.28);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.12);
}

.header-message-btn.has-unread {
  border-color: rgba(37, 99, 235, 0.35);
}

.header-message-btn__icon {
  font-size: 0.95rem;
  line-height: 1;
}

.header-message-btn--icon {
  width: 38px;
  min-width: 38px;
  padding: 0;
}

.header-message-btn--icon .header-message-btn__text {
  display: none;
}

.header-message-btn__count {
  position: absolute;
  top: -6px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.28);
}

.header-user-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  transition: all 0.2s ease;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.header-user-btn--icon {
  width: 38px;
  min-width: 38px;
  padding: 0;
}

.header-user-btn--icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.login-modal-content {
  max-width: 420px;
}

.rx-user-welcome-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.rx-user-welcome-text strong {
  color: var(--text-main);
}

.rx-user-action-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.rx-user-form-group {
  margin-bottom: 0.85rem;
}

.rx-login-submit-btn,
.rx-register-submit-btn {
  width: 100%;
  margin-top: 0.25rem;
}

#rx-login-message,
#rx-register-message {
  margin: 0 0 0.9rem;
  max-width: none;
}

#rx-login-message.hidden,
#rx-register-message.hidden {
  display: none !important;
}

.header-user-btn:hover {
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--primary);
  background: rgba(255, 255, 255, 0.28);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.12);
}

.header-user-btn.is-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  border-color: transparent;
  color: #fff;
}

.header-user-btn.is-primary:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 14px rgba(37, 99, 235, 0.25);
}

.rx-user-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 0 auto 1.25rem;
  max-width: 980px;
}

.rx-auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.25rem;
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.rx-auth-tab {
  flex: 1 1 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.68rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.rx-auth-tab.is-active {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.22);
}

.rx-user-card {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.rx-user-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.08rem;
}

.rx-user-card-full,
.rx-user-card-single {
  grid-column: 1 / -1;
}

.rx-user-form label {
  display: block;
  margin-bottom: 0.32rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.rx-user-form.hidden {
  display: none !important;
}

.rx-user-form input[type="text"],
.rx-user-form input[type="email"],
.rx-user-form input[type="password"] {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.58rem 0.72rem;
  margin-bottom: 0.72rem;
  transition: all 0.2s ease;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.rx-user-form input[type="email"] {
  text-transform: none;
}

.rx-user-form input:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.55);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12), 0 8px 20px rgba(37, 99, 235, 0.08);
}

.rx-inline-check {
  display: inline-flex !important;
  align-items: center;
  gap: 0.45rem;
  margin: -0.2rem 0 0.85rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500 !important;
}

.rx-inline-check input {
  margin: 0;
}

.rx-user-alert {
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  margin: 0 auto 1rem;
  max-width: 980px;
  font-size: 0.9rem;
  font-weight: 600;
}

.rx-message-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.8rem;
}

.message-modal-content {
  max-width: 620px;
}

.rx-message-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.rx-message-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-surface);
  padding: 0.9rem 1rem;
  transition: all 0.2s ease;
}

.rx-message-item.is-unread {
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.05);
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.08);
}

.rx-message-item__head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.45rem;
}

.rx-message-item__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.rx-message-item__time {
  flex-shrink: 0;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.rx-message-item__content,
.rx-message-item__link {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-main);
  text-decoration: none;
  word-break: break-word;
}

.rx-message-item__link:hover {
  color: var(--primary);
}

.rx-message-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 1.4rem 1rem;
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: rgba(148, 163, 184, 0.06);
}

.rx-user-alert.success {
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #166534;
}

.rx-user-alert.error {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

[data-theme="dark"] .rx-auth-tabs {
  background: rgba(15, 23, 42, 0.75);
  border-color: var(--border);
}

[data-theme="dark"] .rx-auth-tab {
  color: var(--text-muted);
}

[data-theme="dark"] .rx-user-form input[type="text"],
[data-theme="dark"] .rx-user-form input[type="email"],
[data-theme="dark"] .rx-user-form input[type="password"] {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(148, 163, 184, 0.28);
  color: var(--text-main);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .header-user-btn {
  background: rgba(15, 23, 42, 0.42);
  border-color: rgba(148, 163, 184, 0.22);
  color: var(--text-main);
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.2);
}

[data-theme="dark"] .header-user-btn:hover {
  background: rgba(30, 41, 59, 0.62);
  border-color: rgba(96, 165, 250, 0.32);
  color: var(--primary);
}

[data-theme="dark"] .rx-user-card {
  background: rgba(15, 23, 42, 0.68);
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: 0 16px 32px rgba(2, 6, 23, 0.28);
}

[data-theme="dark"] .header-message-btn {
  background: rgba(15, 23, 42, 0.42);
  border-color: rgba(148, 163, 184, 0.22);
  color: var(--text-main);
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.2);
}

[data-theme="dark"] .header-message-btn:hover {
  background: rgba(30, 41, 59, 0.62);
  border-color: rgba(96, 165, 250, 0.32);
  color: var(--primary);
}

[data-theme="dark"] .rx-message-item {
  background: #151e32;
  border-color: var(--border);
}

[data-theme="dark"] .rx-message-item.is-unread {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(96, 165, 250, 0.42);
}

[data-theme="dark"] .rx-message-empty {
  background: rgba(148, 163, 184, 0.08);
  border-color: var(--border);
}

.rx-hp-field {
  display: none !important;
  visibility: hidden !important;
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

@media (max-width: 768px) {
  .site-header-nav .header-actions {
    gap: 0.35rem;
    flex-wrap: nowrap;
  }

  .site-header-nav .header-search-form {
    display: none;
  }

  .site-header-nav .header-message-btn,
  .site-header-nav .header-user-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border-radius: 12px;
    flex-shrink: 0;
  }

  .site-header-nav .header-message-btn {
    padding: 0;
    width: 40px;
  }

  .site-header-nav .header-message-btn--icon {
    max-width: 40px;
  }

  .site-header-nav .header-message-btn__text {
    display: none;
  }

  .site-header-nav .header-message-btn__icon {
    font-size: 1rem;
  }

  .site-header-nav .header-message-btn__count {
    top: -5px;
    right: -5px;
    min-width: 17px;
    height: 17px;
    font-size: 0.64rem;
    padding: 0 4px;
  }

  .site-header-nav .header-user-btn {
    max-width: 96px;
    padding: 0 0.7rem;
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .site-header-nav .header-user-btn--icon {
    width: 40px;
    max-width: 40px;
    padding: 0;
  }

  .rx-user-grid {
    grid-template-columns: 1fr;
  }

  .rx-user-action-row {
    flex-direction: column;
  }

  .rx-user-action-row .header-user-btn {
    display: inline-flex;
    width: 100%;
    max-width: none;
    justify-content: center;
  }

  .login-modal-content,
  .message-modal-content {
    width: calc(100vw - 1rem);
    max-width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
    border-radius: 18px;
  }

  .modal-header {
    padding: 1rem 1rem 0.9rem;
  }

  .modal-header h3 {
    font-size: 1rem;
  }

  .modal-body {
    padding: 1rem;
    overflow-y: auto;
  }

  .message-modal-content .modal-body,
  .login-modal-content .modal-body {
    max-height: calc(100vh - 8.5rem);
  }

  .rx-user-card {
    padding: 0.9rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.76);
  }

  .rx-user-card h3 {
    font-size: 1rem;
    margin-bottom: 0.6rem;
  }

  .rx-user-welcome-text {
    font-size: 0.88rem;
    line-height: 1.6;
  }

  .rx-user-form-group {
    margin-bottom: 0.75rem;
  }

  .rx-user-form label {
    font-size: 0.82rem;
    margin-bottom: 0.28rem;
  }

  .rx-user-form input[type="text"],
  .rx-user-form input[type="email"],
  .rx-user-form input[type="password"] {
    font-size: 0.88rem;
    padding: 0.7rem 0.75rem;
    margin-bottom: 0;
    border-radius: 10px;
  }

  .rx-inline-check {
    display: flex !important;
    align-items: flex-start;
    line-height: 1.45;
    margin: 0.1rem 0 0.85rem;
  }

  .rx-inline-check input {
    margin-top: 0.15rem;
  }

  .rx-auth-tabs {
    gap: 0.35rem;
    margin-bottom: 0.9rem;
    padding: 0.2rem;
  }

  .rx-auth-tab {
    font-size: 0.85rem;
    padding: 0.62rem 0.8rem;
  }

  .rx-login-submit-btn,
  .rx-register-submit-btn,
  .rx-message-toolbar .header-user-btn {
    width: 100%;
    justify-content: center;
  }

  .rx-message-toolbar {
    justify-content: stretch;
    margin-bottom: 0.7rem;
  }

  .rx-message-list {
    max-height: calc(100vh - 14rem);
    gap: 0.65rem;
  }

  .rx-message-item {
    padding: 0.8rem 0.85rem;
    border-radius: 12px;
  }

  .rx-message-item__head {
    flex-direction: column;
    gap: 0.25rem;
  }

  .rx-message-item__title {
    font-size: 0.9rem;
  }

  .rx-message-item__time {
    font-size: 0.72rem;
  }

  .rx-message-item__content,
  .rx-message-item__link,
  .rx-message-empty,
  .rx-user-alert {
    font-size: 0.84rem;
  }
}

@media (max-width: 480px) {
  .site-header-nav .header-actions {
    gap: 0.25rem;
  }

  .site-header-nav .header-message-btn,
  .site-header-nav .header-user-btn,
  .site-header-nav .theme-toggle {
    min-width: 38px;
    height: 38px;
  }

  .site-header-nav .header-user-btn {
    max-width: 82px;
    padding: 0 0.58rem;
    font-size: 0.76rem;
  }

  .site-header-nav .header-user-btn--icon {
    width: 38px;
    max-width: 38px;
    padding: 0;
  }

  .login-modal-content,
  .message-modal-content {
    width: calc(100vw - 0.5rem);
    max-width: calc(100vw - 0.5rem);
    max-height: calc(100vh - 0.5rem);
    border-radius: 16px;
  }

  .modal-header,
  .modal-body {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .message-modal-content .modal-body,
  .login-modal-content .modal-body {
    max-height: calc(100vh - 8rem);
  }

  .rx-auth-tab {
    font-size: 0.82rem;
    padding: 0.58rem 0.55rem;
  }

  .rx-user-card,
  .rx-message-item {
    padding: 0.8rem;
  }

  .rx-message-list {
    max-height: calc(100vh - 13rem);
  }
}

/* =========================================
   Modern Homepage Enhancements (Cool & Atmospheric)
   ========================================= */

/* 1. Gradient Overlay */
.hero-overlay-gradient {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(to bottom, rgba(15, 23, 42, 0.18) 0%, rgba(15, 23, 42, 0.5) 52%, rgba(15, 23, 42, 0.88) 100%),
        linear-gradient(to right, rgba(15, 23, 42, 0.18) 0%, rgba(15, 23, 42, 0.04) 35%, rgba(15, 23, 42, 0.18) 100%);
}

/* 2. Animated Shapes Background */
.hero-animated-shapes {
    display: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite;
}

.shape-1 {
    top: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: #4f46e5;
    animation-delay: 0s;
}

.shape-2 {
    bottom: -10%;
    right: -10%;
    width: 700px;
    height: 700px;
    background: #2563eb;
    animation-delay: -5s;
}

.shape-3 {
    top: 40%;
    left: 40%;
    width: 500px;
    height: 500px;
    background: #7c3aed;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(50px, 50px) rotate(120deg); }
    66% { transform: translate(-30px, 80px) rotate(240deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

/* 3. Glassmorphism Effect */
.glass-morphism {
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .glass-morphism {
    background: rgba(15, 23, 42, 0.68) !important;
    border: 1px solid rgba(148, 163, 184, 0.28) !important;
}

/* Specific Glass Elements Adjustments */
.hero .brand-pill.glass-morphism {
    background: rgba(15, 23, 42, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    border-radius: 9999px;
    padding: 0.56rem 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 24px rgba(2, 6, 23, 0.28);
}

.hero .brand-pill.glass-morphism span {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 1px 8px rgba(2, 6, 23, 0.65);
}

.brand-pill .live-dot {
    width: 8px;
    height: 8px;
    background-color: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 10px #4ade80;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

.stats-container.glass-morphism {
    padding: 2rem;
    border-radius: var(--radius-lg);
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.glass-morphism .stat-card {
    background: transparent;
    border: none;
    padding: 0;
    text-align: center;
}

.glass-morphism .stat-value {
    color: #fff;
    font-size: 2.5rem;
    font-weight: 800;
    display: block;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.glass-morphism .stat-label {
    color: rgba(255,255,255,0.8);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Search Container Glass Style */
.search-container.glass-morphism {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin-top: 2rem;
}

.search-container.glass-morphism .search-input-wrapper {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    height: 60px;
    border-radius: 30px;
    max-width: 700px;
    margin: 0 auto;
}

.search-container.glass-morphism .search-input-wrapper:hover,
.search-container.glass-morphism .search-input-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.search-container.glass-morphism input {
    color: #fff;
    font-size: 1.1rem;
}

.search-container.glass-morphism input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-container.glass-morphism .search-icon {
    color: rgba(255, 255, 255, 0.9);
}

/* 4. Glitch Text Effect */
.glitch-text {
    position: relative;
    color: #fff;
    font-weight: 900;
    font-size: 4rem;
    letter-spacing: -0.02em;
    text-shadow: 2px 2px 0px #4f46e5, -2px -2px 0px #eb4899;
    animation: glitch-skew 4s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .glitch-text {
        font-size: 2.5rem;
    }

    .hero .brand-pill.glass-morphism {
        padding: 0.5rem 0.85rem;
    }

    .hero .brand-pill.glass-morphism span {
        font-size: 0.82rem;
        letter-spacing: 0.06em;
    }
    
    /* 移动端保持“总资源收录 / 最新收录”左右横排 */
    .stats-container.glass-morphism {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: stretch;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 1rem;
    }

    .stats-container.glass-morphism .stat-card {
        flex: 1 1 0;
        min-width: 0;
    }

    .stats-container.glass-morphism .stat-value {
        font-size: 1.75rem;
        line-height: 1.1;
    }

    .stats-container.glass-morphism .stat-label {
        font-size: 0.75rem;
        white-space: nowrap;
    }
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.glitch-text::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(30px, 9999px, 10px, 0); }
    5% { clip: rect(70px, 9999px, 90px, 0); }
    10% { clip: rect(10px, 9999px, 30px, 0); }
    15% { clip: rect(80px, 9999px, 100px, 0); }
    20% { clip: rect(10px, 9999px, 60px, 0); }
    25% { clip: rect(50px, 9999px, 20px, 0); }
    30% { clip: rect(90px, 9999px, 10px, 0); }
    35% { clip: rect(20px, 9999px, 80px, 0); }
    40% { clip: rect(60px, 9999px, 40px, 0); }
    45% { clip: rect(10px, 9999px, 50px, 0); }
    50% { clip: rect(40px, 9999px, 90px, 0); }
    55% { clip: rect(80px, 9999px, 10px, 0); }
    60% { clip: rect(30px, 9999px, 60px, 0); }
    65% { clip: rect(70px, 9999px, 20px, 0); }
    70% { clip: rect(10px, 9999px, 80px, 0); }
    75% { clip: rect(50px, 9999px, 40px, 0); }
    80% { clip: rect(90px, 9999px, 10px, 0); }
    85% { clip: rect(20px, 9999px, 50px, 0); }
    90% { clip: rect(60px, 9999px, 30px, 0); }
    95% { clip: rect(10px, 9999px, 70px, 0); }
    100% { clip: rect(40px, 9999px, 90px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(10px, 9999px, 90px, 0); }
    100% { clip: rect(90px, 9999px, 10px, 0); }
}

@keyframes glitch-skew {
    0% { transform: skew(0deg); }
    10% { transform: skew(-2deg); }
    20% { transform: skew(2deg); }
    30% { transform: skew(0deg); }
    40% { transform: skew(-1deg); }
    50% { transform: skew(3deg); }
    60% { transform: skew(0deg); }
    70% { transform: skew(1deg); }
    80% { transform: skew(-2deg); }
    90% { transform: skew(2deg); }
    100% { transform: skew(0deg); }
}

/* Ensure z-index layering is correct */
.hero-banner-content {
    position: relative;
    z-index: 2;
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* ==========================================================================
   Help Center (FAQ) Styles
   ========================================================================== */
.help-center-section {
    padding: 2rem 1.5rem 4rem;
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.faq-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.faq-item:hover {
    border-color: var(--primary-color);
    border-left-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.faq-item.active {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
    border-left-color: var(--primary-color);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
}

.faq-item:not(.active) .faq-question:hover {
    background: rgba(255, 255, 255, 0.02);
}

.faq-item.active .faq-question {
    color: var(--primary-color);
}

.faq-toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-muted);
}

.faq-item:hover .faq-toggle-icon {
    color: var(--primary-color);
}

.faq-item.active .faq-toggle-icon {
    transform: rotate(180deg);
    color: #fff;
    background: var(--primary-color);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-answer-inner {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
    border-top: 1px dashed var(--border-color);
    margin: 0 1.5rem;
    padding-top: 1.5rem;
}
