/* ========================================
   Aether Yard - 黑白科技感样式
   ======================================== */

/* === 字体引入 === */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* === CSS 变量 === */
:root {
  /* 颜色系统 */
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #161616;
  --bg-card-hover: #1a1a1a;
  --bg-input: #1a1a1a;
  --border-color: #2a2a2a;
  --border-light: #333333;
  
  --text-primary: #ffffff;
  --text-secondary: #888888;
  --text-muted: #555555;
  
  --accent: #00ff88;
  --accent-hover: #00cc6a;
  --accent-dim: rgba(0, 255, 136, 0.1);
  --accent-glow: rgba(0, 255, 136, 0.3);
  
  --danger: #ff4444;
  --warning: #ffaa00;
  
  --divider: #222222;
  
  /* 间距 */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  
  /* 尺寸 */
  --sidebar-width: 260px;
  --header-height: 72px;
  --max-width: 1400px;
  --border-radius: 12px;
  --border-radius-sm: 8px;
  
  /* 动效 */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease-out;
  --transition-spring: 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* === 重置 & 基础 === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  touch-action: pan-x pan-y;
  -webkit-tap-highlight-color: transparent;
}

/* 背景网格动画 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(90deg, transparent 49.5%, var(--divider) 49.5%, var(--divider) 50.5%, transparent 50.5%),
    linear-gradient(0deg, transparent 49.5%, var(--divider) 49.5%, var(--divider) 50.5%, transparent 50.5%);
  background-size: 80px 80px;
  opacity: 0.15;
  pointer-events: none;
  z-index: -1;
}

/* === 排版 === */
h1, h2, h3, h4, h5, h6 {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }

p { color: var(--text-secondary); }

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

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

code, pre {
  font-family: 'JetBrains Mono', monospace;
}

/* === 布局容器 === */
.app-container {
  display: flex;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: var(--space-xl);
  max-width: calc(var(--max-width) - var(--sidebar-width));
}

@media (max-width: 1024px) {
  .main-content {
    margin-left: 0;
    padding: var(--space-lg);
    padding-top: calc(var(--header-height) + var(--space-lg));
  }
}

/* === 侧边栏 === */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: 1002;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  will-change: transform;
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent 0%, var(--accent) 50%, transparent 100%);
  opacity: 0.3;
}

.sidebar-header {
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.03) 0%, transparent 100%);
  position: relative;
}

.sidebar-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.4;
}

.logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  position: relative;
}

.logo::before {
  content: '';
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 2px;
  animation: pulse-glow 2s ease-in-out infinite;
  box-shadow: 0 0 8px var(--accent), 0 0 16px rgba(0, 255, 136, 0.4);
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 8px var(--accent), 0 0 16px rgba(0, 255, 136, 0.4); }
  50% { opacity: 0.6; transform: scale(0.85); box-shadow: 0 0 4px var(--accent), 0 0 8px rgba(0, 255, 136, 0.2); }
}

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

.logo-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: var(--space-xs);
  font-family: 'JetBrains Mono', monospace;
}

.sidebar-nav {
  padding: var(--space-md);
  flex: 1;
}

.nav-section {
  margin-bottom: var(--space-lg);
}

.nav-section-title {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: var(--space-sm);
  padding: 0 var(--space-sm);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--accent-dim);
  transition: width var(--transition-base);
  z-index: -1;
}

.nav-link:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  transform: translateX(4px);
}

.nav-link:hover::before {
  width: 100%;
}

.nav-link.active {
  background: var(--accent-dim);
  color: var(--accent);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px var(--accent);
}

.nav-link .icon {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
}

/* 外站链接 */
.sidebar-sites {
  padding: var(--space-md);
  border-top: 1px solid var(--border-color);
}

.site-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: all var(--transition-fast);
  border-radius: var(--border-radius-sm);
}

.site-link:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.site-link .favicon {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
}

/* === 移动端菜单按钮 === */
.menu-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1001;
  width: 44px;
  height: 44px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: 1.3rem;
  line-height: 1;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.menu-toggle:hover {
  background: var(--bg-card);
  border-color: var(--accent);
  color: var(--accent);
}

/* 侧边栏内右上角的关闭图标 - 极简❌ */
.sidebar-header-close {
  display: none;
  position: absolute;
  top: 16px;
  right: 20px;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 300;
  padding: 0;
  line-height: 1;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.sidebar-header-close:hover {
  color: var(--accent);
  background: var(--bg-card);
}

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

  /* 侧边栏打开时，左上角菜单按钮消失 */
  body.sidebar-open .menu-toggle {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-20px) scale(0.9);
  }

  /* 侧边栏内❌出现，像按钮飞进来变的 */
  body.sidebar-open .sidebar-header-close {
    display: flex;
    animation: fadeInShift 0.35s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    box-shadow: none;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 32px rgba(0, 0, 0, 0.6), 0 0 1px var(--accent-glow);
  }

  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
    background: rgba(0, 0, 0, 0.72);
  }
}

@keyframes fadeInShift {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* === 页面头部 === */
.page-header {
  margin-bottom: var(--space-2xl);
}

.page-title {
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* === 卡片网格 === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
}

/* === 软件卡片 === */
.software-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  position: relative;
}

.software-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: var(--border-radius);
  background: linear-gradient(135deg, transparent 0%, var(--accent) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: -1;
  filter: blur(20px);
}

.software-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--accent-glow);
}

.software-card:hover::before {
  opacity: 0.15;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.card-cover {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--bg-secondary);
  overflow: hidden;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.card-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
  color: var(--text-muted);
  font-size: 3rem;
}

.card-badge {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  background: var(--accent);
  color: var(--bg-primary);
  font-size: 0.65rem;
  font-weight: 600;
  padding: var(--space-xs) var(--space-sm);
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-body {
  padding: var(--space-lg);
}

.card-category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-dim);
  padding: var(--space-xs) var(--space-sm);
  border-radius: 4px;
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--space-md);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.card-meta span {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

/* === 按钮 === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--border-radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-secondary:hover {
  background: var(--accent-dim);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn-ghost:hover {
  background: var(--bg-card);
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  filter: brightness(1.1);
}

.btn-sm {
  padding: var(--space-xs) var(--space-md);
  font-size: 0.8rem;
}

.btn-lg {
  padding: var(--space-md) var(--space-xl);
  font-size: 1rem;
}

/* === 输入框 === */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--space-md);
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

/* === 标签 === */
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

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

/* === 搜索栏 === */
.search-bar {
  position: relative;
  margin-bottom: var(--space-xl);
}

.search-bar input {
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  padding-left: 48px;
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-bar input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim), 0 0 20px var(--accent-glow);
}

.search-bar::before {
  content: '⌕';
  position: absolute;
  left: var(--space-lg);
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.search-bar:focus-within::before {
  color: var(--accent);
}

/* === 筛选栏 === */
.filter-bar {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

.filter-btn {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.filter-btn.active {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
  box-shadow: 0 4px 16px var(--accent-glow);
}

/* === 统计卡片 === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: var(--space-lg);
  text-align: center;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: var(--space-sm);
  text-shadow: 0 0 20px var(--accent-glow);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* === Hero 区域 === */
.hero {
  padding: var(--space-3xl) 0;
  margin-bottom: var(--space-2xl);
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  right: -50%;
  height: 300px;
  background: radial-gradient(ellipse at center, var(--accent-dim) 0%, transparent 70%);
  opacity: 0.3;
  pointer-events: none;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  position: relative;
}

.hero-title .accent {
  color: var(--accent);
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: var(--space-xl);
}

.hero-cta {
  display: flex;
  gap: var(--space-md);
}

/* === 区块标题 === */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.section-title::before {
  content: '';
  width: 4px;
  height: 20px;
  background: var(--accent);
  border-radius: 2px;
}

/* === 特色软件滚动 === */
.featured-scroll {
  display: flex;
  gap: var(--space-lg);
  overflow-x: auto;
  padding: var(--space-sm) 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.featured-scroll::-webkit-scrollbar {
  height: 6px;
}

.featured-scroll::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 3px;
}

.featured-scroll::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 3px;
}

.featured-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

.featured-scroll .software-card {
  flex: 0 0 320px;
  scroll-snap-align: start;
}

/* === 软件详情页 === */
.detail-header {
  margin-bottom: var(--space-2xl);
}

.detail-cover {
  width: 100%;
  aspect-ratio: 21/9;
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-bottom: var(--space-xl);
  position: relative;
}

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

.detail-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
  color: var(--text-muted);
  font-size: 5rem;
}

.detail-title {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.detail-meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.detail-meta-item .icon {
  color: var(--accent);
}

/* 图片画廊 */
.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-md);
  margin: var(--space-xl) 0;
}

.gallery-item {
  aspect-ratio: 16/9;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  border: 1px solid var(--border-color);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item::after {
  content: '⤢';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  color: white;
  opacity: 0;
  transition: opacity 0.3s ease;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-item:hover::after {
  opacity: 1;
}

/* 下载区 */
.download-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: var(--space-xl);
  margin: var(--space-2xl) 0;
  position: relative;
  overflow: hidden;
}

.download-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.download-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.download-title .icon {
  color: var(--accent);
}

.download-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.download-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md);
  background: var(--bg-secondary);
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.download-item:hover {
  border-color: var(--accent);
  transform: translateX(4px);
  box-shadow: -4px 0 20px var(--accent-glow);
}

.download-item-name {
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.download-item-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-right: var(--space-md);
}

/* 内容区 */
.content-section {
  margin: var(--space-2xl) 0;
}

.content-section h3 {
  margin-bottom: var(--space-md);
}

.content-section p {
  margin-bottom: var(--space-md);
  line-height: 1.8;
}

/* === 外站导航 === */
.sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.sites-category {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.sites-category-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.sites-category-header .icon {
  color: var(--accent);
}

.sites-list {
  padding: var(--space-md);
}

.site-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
  color: var(--text-primary);
}

.site-item:hover {
  background: var(--bg-card-hover);
  color: var(--accent);
}

.site-item-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius-sm);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

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

.site-item-name {
  font-weight: 500;
  margin-bottom: 2px;
}

.site-item-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* === 模态框 === */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform var(--transition-spring);
}

.modal-overlay.show .modal {
  transform: translateY(0);
}

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

.modal-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
}

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

.modal-body {
  padding: var(--space-lg);
}

.modal-footer {
  padding: var(--space-lg);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-md);
}

/* === 空状态 === */
.empty-state {
  text-align: center;
  padding: var(--space-3xl);
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 4rem;
  margin-bottom: var(--space-lg);
  opacity: 0.3;
}

.empty-state h3 {
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

/* === 加载状态 === */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* === 面包屑 === */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

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

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

.breadcrumb .sep {
  opacity: 0.5;
}

/* === 工具栏 === */
.toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

/* === 管理卡片 === */
.manage-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  transition: all var(--transition-fast);
}

.manage-card:hover {
  border-color: var(--accent);
}

.manage-card-cover {
  width: 100px;
  height: 60px;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.manage-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.manage-card-title {
  font-weight: 600;
  margin-bottom: var(--space-xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.manage-card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  gap: var(--space-md);
}

.manage-card-actions {
  display: flex;
  gap: var(--space-sm);
}

/* === 发布页表单 === */
.publish-form {
  max-width: 800px;
}

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
}

.form-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.form-card-title .icon {
  color: var(--accent);
}

/* 图片上传预览 */
.image-upload-area {
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius);
  padding: var(--space-xl);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: var(--space-md);
}

.image-upload-area:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.image-preview-item {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  background: var(--bg-secondary);
}

.image-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-preview-item .remove-btn {
  position: absolute;
  top: var(--space-xs);
  right: var(--space-xs);
  width: 24px;
  height: 24px;
  background: var(--danger);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.image-preview-item:hover .remove-btn {
  opacity: 1;
}

/* 网盘输入组 */
.drive-group {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
}

.drive-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.drive-group-title {
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.drive-inputs {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: var(--space-md);
}

/* === 关于页 === */
.about-content {
  max-width: 700px;
}

.about-section {
  margin-bottom: var(--space-2xl);
}

.about-section h3 {
  margin-bottom: var(--space-md);
}

/* === 响应式 === */
@media (max-width: 768px) {
  /* 基础字号缩小 */
  body {
    font-size: 14px;
    line-height: 1.5;
  }

  /* Hero 区 */
  .hero {
    padding: var(--space-lg) 0 var(--space-md);
    margin-bottom: var(--space-lg);
  }

  .hero-title {
    font-size: 1.4rem;
    margin-bottom: var(--space-sm);
  }

  .hero-subtitle {
    font-size: 0.85rem;
    margin-bottom: var(--space-md);
  }

  .hero-cta {
    flex-direction: column;
    gap: var(--space-sm);
    margin-top: var(--space-md);
  }

  .hero-cta .btn {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    font-size: 0.85rem;
  }

  /* 页面标题 */
  .page-title {
    font-size: 1.2rem;
    margin-bottom: var(--space-sm);
  }

  /* 统计卡片 */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
  }

  .stat-card {
    padding: var(--space-md);
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  /* 软件卡片 */
  .card-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .card-cover {
    height: 130px;
  }

  .card-body {
    padding: var(--space-sm) var(--space-md);
  }

  .card-title {
    font-size: 0.95rem;
    margin-bottom: 2px;
  }

  .card-desc {
    font-size: 0.78rem;
    margin-bottom: var(--space-sm);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .card-meta {
    font-size: 0.72rem;
    flex-wrap: wrap;
    gap: var(--space-xs);
  }

  .card-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
  }

  /* 详情页 */
  .detail-title {
    font-size: 1.25rem;
  }

  .detail-cover {
    aspect-ratio: 16/9;
    margin-bottom: var(--space-md);
  }

  .detail-desc {
    font-size: 0.85rem;
  }

  .detail-meta {
    font-size: 0.75rem;
    gap: var(--space-sm);
  }

  .content-section {
    padding: var(--space-md);
  }

  /* 下载区 - 手机端改为垂直堆叠，按钮全宽更易用 */
  .download-section {
    padding: var(--space-md);
    margin: var(--space-lg) 0;
  }

  .download-title {
    font-size: 0.95rem;
    margin-bottom: var(--space-md);
  }

  .download-list {
    gap: var(--space-sm);
  }

  .download-item {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    font-size: 0.85rem;
  }

  .download-item-name {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.85rem;
  }

  .download-item-code {
    font-size: 0.75rem;
    padding: 3px 8px;
    background: var(--bg-card);
    border-radius: 4px;
    margin-right: 0;
  }

  .download-item .btn {
    width: 100%;
    padding: 10px;
    font-size: 0.85rem;
    justify-content: center;
  }

  /* 图片画廊 */
  .image-gallery {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .gallery-item {
    aspect-ratio: 16/9;
  }

  /* 管理页面 */
  .manage-card {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .manage-card-cover {
    width: 100%;
    height: 120px;
  }

  .manage-card-actions {
    width: 100%;
    justify-content: flex-end;
  }

  /* 发布页 */
  .drive-inputs {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .form-group label {
    font-size: 0.82rem;
    margin-bottom: 4px;
  }

  .form-group input,
  .form-group textarea {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.85rem;
  }

  /* 搜索栏 */
  .search-bar {
    margin-bottom: var(--space-md);
  }

  .search-bar input {
    padding: var(--space-sm) var(--space-md);
    padding-left: 36px;
    font-size: 0.85rem;
  }

  .search-bar::before {
    left: var(--space-md);
    font-size: 0.9rem;
  }

  /* 筛选栏 */
  .toolbar {
    margin-bottom: var(--space-md);
  }

  .filter-bar {
    gap: 6px;
    flex-wrap: wrap;
  }

  .filter-btn {
    padding: 6px 12px;
    font-size: 0.78rem;
    border-radius: 16px;
  }

  /* 章节标题 */
  .section-header {
    margin-bottom: var(--space-md);
  }

  .section-title {
    font-size: 0.95rem;
  }

  /* 精选滚动 */
  .featured-scroll {
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
  }

  .featured-card {
    min-width: 220px;
  }

  /* 快速分类 */
  .quick-categories {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
  }

  .quick-cat {
    padding: var(--space-md);
  }

  .quick-cat-icon {
    font-size: 1.2rem;
    margin-bottom: 4px;
  }

  .quick-cat-name {
    font-size: 0.82rem;
  }

  /* 外站导航 */
  .sites-category {
    margin-bottom: var(--space-md);
  }

  .sites-category h3 {
    font-size: 0.95rem;
    margin-bottom: var(--space-sm);
  }

  .sites-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .site-card {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.85rem;
  }

  /* 关于页面 */
  .about-section {
    padding: var(--space-md);
    margin-bottom: var(--space-md);
  }

  .about-section h3 {
    font-size: 1rem;
    margin-bottom: var(--space-sm);
  }

  .about-section p {
    font-size: 0.85rem;
  }

  /* 内容区 */
  .main-content {
    padding: var(--space-md);
    padding-top: calc(56px + var(--space-sm));
  }

  /* 侧边栏 */
  .sidebar {
    width: 85%;
    max-width: 300px;
  }

  .sidebar-header {
    padding: var(--space-md);
  }

  .logo {
    font-size: 1.2rem;
  }

  .logo-sub {
    font-size: 0.65rem;
  }

  .sidebar-section-title {
    font-size: 0.7rem;
    padding: var(--space-md) var(--space-md) var(--space-sm);
  }

  .nav-link {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.82rem;
  }

  /* 菜单按钮 */
  .menu-toggle {
    width: 38px;
    height: 38px;
    font-size: 1rem;
    top: var(--space-sm);
    left: var(--space-sm);
  }

  /* 空状态 */
  .empty-state {
    padding: var(--space-lg);
    font-size: 0.85rem;
  }

  /* 模态框 */
  .image-modal-content {
    max-width: 95%;
    max-height: 90vh;
  }

  /* 按钮 */
  .btn {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.85rem;
  }
}

/* === 动画延迟 === */
.stagger-1 { animation-delay: 60ms; }
.stagger-2 { animation-delay: 120ms; }
.stagger-3 { animation-delay: 180ms; }
.stagger-4 { animation-delay: 240ms; }
.stagger-5 { animation-delay: 300ms; }
.stagger-6 { animation-delay: 360ms; }

/* === 滚动条美化 === */
::-webkit-scrollbar {
  width: 8px;
}

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

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

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

/* === 选中样式 === */
::selection {
  background: var(--accent);
  color: var(--bg-primary);
}
