/* ============================================
   Hot-Site - 全局样式
   配色: Indigo + Cyan + Emerald + Rose + Violet
   字体: Inter + Noto Sans SC
   ============================================ */

/* --- CSS 变量 --- */
:root {
  /* 主色系 */
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.3);

  /* 辅助色 */
  --secondary: #06b6d4;
  --secondary-light: #22d3ee;
  --secondary-dark: #0891b2;
  --secondary-glow: rgba(6, 182, 212, 0.3);

  /* 强调色 */
  --accent: #f59e0b;
  --accent-light: #fbbf24;
  --accent-dark: #d97706;

  /* 中性色 */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  /* 背景 */
  --bg-primary: #fafbff;
  --bg-secondary: #f1f4fb;
  --bg-dark: #0f172a;

  /* 文字 */
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  /* 玻璃态 */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-shadow: 0 8px 32px rgba(99, 102, 241, 0.08);

  /* 间距 */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* 过渡 */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* 布局 */
  --container-max: 1200px;
  --navbar-height: 72px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* --- 页面淡入动画 --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-enter {
  animation: fadeIn 0.5s ease forwards;
}

/* --- 容器 --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

/* --- 导航栏 --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--navbar-height);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  transition: all var(--transition-base);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 20px rgba(99, 102, 241, 0.06);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-xl);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  position: relative;
}

.logo-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 2px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav-link {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
}

/* 汉堡菜单 */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-sm);
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero 区域 --- */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--navbar-height) + var(--space-3xl)) var(--space-xl) var(--space-3xl);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, var(--primary-glow) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, var(--secondary-glow) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(245, 158, 11, 0.08) 0%, transparent 40%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 720px;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-2xl);
  font-weight: 400;
}

.hero-cta {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* 几何装饰 */
.hero-decoration {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.geo-shape {
  position: absolute;
  border-radius: var(--radius-md);
  opacity: 0.15;
}

.geo-1 {
  width: 180px;
  height: 180px;
  top: 15%;
  left: 8%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  transform: rotate(25deg);
  animation: float 8s ease-in-out infinite;
}

.geo-2 {
  width: 120px;
  height: 120px;
  bottom: 20%;
  right: 12%;
  background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
  transform: rotate(-15deg);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite reverse;
}

.geo-3 {
  width: 80px;
  height: 80px;
  top: 30%;
  right: 20%;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  transform: rotate(45deg);
  animation: float 10s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(25deg); }
  50%      { transform: translateY(-20px) rotate(25deg); }
}

/* --- 按钮 --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all var(--transition-base);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--primary-glow);
}

.btn-secondary {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--gray-200);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: #fff;
  border-color: var(--primary-light);
  transform: translateY(-2px);
}

/* --- 区块 --- */
.section {
  padding: var(--space-4xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 1.0625rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* --- 文章卡片网格 --- */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-xl);
}

.article-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.2);
}

.article-card-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
}

.article-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.article-card:hover .article-card-cover img {
  transform: scale(1.05);
}

.article-card-cover .category-badge {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  backdrop-filter: blur(8px);
}

.category-badge[data-cat="ai"] {
  background: rgba(16, 185, 129, 0.85);
  color: #fff;
}

.category-badge[data-cat="game"] {
  background: rgba(244, 63, 94, 0.85);
  color: #fff;
}

.category-badge[data-cat="music"] {
  background: rgba(139, 92, 246, 0.85);
  color: #fff;
}

/* art 分类样式（已禁用，保留用于未来恢复） */
/*
.category-badge[data-cat="art"] {
  background: rgba(6, 182, 212, 0.85);
  color: #fff;
}
*/

.category-badge[data-cat="tech"] {
  background: rgba(99, 102, 241, 0.85);
  color: #fff;
}

.category-badge[data-cat="sports"] {
  background: rgba(6, 182, 212, 0.85);
  color: #fff;
}

.category-badge[data-cat="news"] {
  background: rgba(245, 158, 11, 0.85);
  color: #fff;
}

.article-card-body {
  padding: var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-card-date {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.article-card-title {
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-excerpt {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- 分类卡片网格 --- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-xl);
}

.category-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  text-align: center;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  transition: height var(--transition-base);
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.1);
}

.category-card:hover::before {
  height: 6px;
}

.category-ai::before { background: linear-gradient(90deg, #10b981, #34d399); }
.category-game::before { background: linear-gradient(90deg, #f43f5e, #fb7185); }
.category-music::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
/* .category-art::before { background: linear-gradient(90deg, var(--secondary), var(--secondary-light)); } */
.category-tech::before { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.category-sports::before { background: linear-gradient(90deg, #06b6d4, #22d3ee); }
.category-news::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

.category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
}

.category-ai .category-icon { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.category-game .category-icon { background: rgba(244, 63, 94, 0.1); color: #f43f5e; }
.category-music .category-icon { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
/* .category-art .category-icon { background: rgba(6, 182, 212, 0.1); color: var(--secondary); } */
.category-tech .category-icon { background: rgba(99, 102, 241, 0.1); color: var(--primary); }
.category-sports .category-icon { background: rgba(6, 182, 212, 0.1); color: #06b6d4; }
.category-news .category-icon { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }

.category-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.category-card p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.category-count {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* --- 分类列表页 --- */
.page-header {
  padding: calc(var(--navbar-height) + var(--space-3xl)) 0 var(--space-2xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, var(--primary-glow) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 50%, var(--secondary-glow) 0%, transparent 50%);
  opacity: 0.5;
  z-index: 0;
}

.page-header-content {
  position: relative;
  z-index: 1;
}

.page-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-sm);
}

.page-header p {
  color: var(--text-secondary);
  font-size: 1.0625rem;
}

/* 筛选栏 */
.filter-bar {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-2xl);
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--glass-bg);
  border: 1px solid var(--gray-200);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.filter-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

.filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* --- 文章详情页 --- */
.article-detail {
  padding: calc(var(--navbar-height) + var(--space-2xl)) 0 var(--space-4xl);
}

.article-detail-header {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.article-detail-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.article-detail-meta .category-badge {
  position: static;
  font-size: 0.75rem;
}

.article-detail-date {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.article-detail-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: var(--space-lg);
}

.article-detail-cover {
  max-width: 900px;
  margin: 0 auto var(--space-3xl);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--gray-100);
}

.article-detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 文章正文 */
.article-content {
  max-width: 780px;
  margin: 0 auto;
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--text-primary);
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
  font-weight: 700;
  line-height: 1.3;
  margin-top: 2em;
  margin-bottom: 0.6em;
  letter-spacing: -0.01em;
}

.article-content h2 {
  font-size: 1.625rem;
  padding-bottom: 0.5em;
  border-bottom: 2px solid var(--gray-100);
}

.article-content h3 {
  font-size: 1.3125rem;
}

.article-content p {
  margin-bottom: 1.25em;
}

.article-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-content a:hover {
  color: var(--primary-dark);
}

.article-content ul,
.article-content ol {
  padding-left: 1.5em;
  margin-bottom: 1.25em;
}

.article-content ul {
  list-style-type: disc;
}

.article-content ol {
  list-style-type: decimal;
}

.article-content li {
  margin-bottom: 0.4em;
}

.article-content blockquote {
  margin: 1.5em 0;
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-secondary);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
  font-style: italic;
}

.article-content code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.875em;
  background: var(--gray-100);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--primary-dark);
}

.article-content pre {
  margin: 1.5em 0;
  padding: var(--space-lg);
  background: var(--gray-900);
  color: var(--gray-100);
  border-radius: var(--radius-md);
  overflow-x: auto;
  line-height: 1.6;
}

.article-content pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: 0.875rem;
}

.article-content img {
  border-radius: var(--radius-md);
  margin: 1.5em 0;
  cursor: zoom-in;
}

.article-content hr {
  border: none;
  height: 2px;
  background: var(--gray-200);
  margin: 2em 0;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
}

.article-content th,
.article-content td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-200);
  text-align: left;
}

.article-content th {
  background: var(--gray-50);
  font-weight: 600;
}

/* --- Lightbox --- */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  cursor: zoom-out;
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--radius-md);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
  transform: scale(0.9);
  transition: transform var(--transition-base);
}

.lightbox-overlay.active img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: var(--space-xl);
  right: var(--space-xl);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: #fff;
  font-size: 1.5rem;
  transition: background var(--transition-fast);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* --- 返回按钮 --- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: var(--space-xl);
  transition: color var(--transition-fast);
}

.back-link:hover {
  color: var(--primary);
}

.back-link svg {
  width: 18px;
  height: 18px;
}

/* --- 空状态 --- */
.empty-state {
  text-align: center;
  padding: var(--space-4xl) 0;
  color: var(--text-muted);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: var(--space-lg);
  opacity: 0.4;
}

/* --- 页脚 --- */
.footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: var(--space-3xl) 0 var(--space-xl);
  margin-top: var(--space-4xl);
}

.footer-content {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--gray-700);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 700;
  font-size: 1.125rem;
  color: #fff;
}

.footer-brand .logo-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.footer-desc {
  font-size: 0.9375rem;
  color: var(--gray-500);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  font-size: 0.875rem;
}

.footer-links {
  display: flex;
  gap: var(--space-lg);
}

.footer-links a {
  color: var(--gray-500);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: #fff;
}

/* --- 响应式 --- */
@media (max-width: 768px) {
  :root {
    --navbar-height: 64px;
  }

  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    flex-direction: column;
    background: #fff;
    padding: calc(var(--navbar-height) + var(--space-xl)) var(--space-xl) var(--space-xl);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
    transition: right var(--transition-base);
    gap: var(--space-xs);
    z-index: 999;
  }

  .nav-menu.open {
    right: 0;
  }

  .nav-link {
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    font-size: 1rem;
  }

  .hero {
    min-height: 70vh;
  }

  .article-grid {
    grid-template-columns: 1fr;
  }

  .category-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .container {
    padding: 0 var(--space-md);
  }

  .section {
    padding: var(--space-3xl) 0;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .category-grid {
    grid-template-columns: 1fr 1fr;
  }

  .article-detail-title {
    font-size: 1.75rem;
  }
}

/* --- 加载状态 --- */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- 返回顶部 --- */
.scroll-top {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px var(--primary-glow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-base);
  z-index: 100;
  cursor: pointer;
  border: none;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--primary-glow);
}

/* --- 打字机效果 (用于加载) --- */
.loading-text::after {
  content: '...';
  animation: dots 1.5s steps(3, end) infinite;
}

@keyframes dots {
  0%   { content: '.'; }
  33%  { content: '..'; }
  66%  { content: '...'; }
}

/* --- 搜索按钮 --- */
.nav-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: auto;
  min-width: 44px;
  height: 40px;
  padding: 0 var(--space-md);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--gray-200);
  backdrop-filter: blur(8px);
  transition: all var(--transition-fast);
  margin-right: var(--space-sm);
  cursor: pointer;
}

.nav-search-btn:hover {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--primary-light);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.12);
}

.nav-search-btn svg {
  flex-shrink: 0;
}

/* 搜索按钮文字提示 */
.nav-search-btn::after {
  content: '搜索';
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .nav-search-btn::after {
    content: '';
  }
  
  .nav-search-btn {
    min-width: 40px;
    padding: 0;
  }
}

/* --- 搜索模态框 --- */
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.search-modal.active {
  opacity: 1;
  visibility: visible;
}

.search-modal-content {
  width: 90%;
  max-width: 640px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
  transform: translateY(-20px) scale(0.95);
  transition: transform var(--transition-base);
  overflow: hidden;
}

.search-modal.active .search-modal-content {
  transform: translateY(0) scale(1);
}

/* 搜索输入框 */
.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 1px solid var(--gray-200);
}

.search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1.125rem;
  color: var(--text-primary);
  background: transparent;
  font-family: inherit;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-shortcut {
  padding: 0.25rem 0.5rem;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: inherit;
}

/* 搜索结果列表 */
.search-results {
  max-height: 400px;
  overflow-y: auto;
  padding: var(--space-sm);
}

.search-result-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.search-result-item:hover,
.search-result-item.active {
  background: var(--gray-50);
}

.search-result-cover {
  width: 80px;
  height: 60px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--gray-100);
}

.search-result-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-result-info {
  flex: 1;
  min-width: 0;
}

.search-result-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-excerpt {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-meta {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* 关键词高亮 */
.search-highlight {
  background: rgba(251, 191, 36, 0.3);
  color: var(--accent-dark);
  padding: 0.05em 0.15em;
  border-radius: 2px;
}

/* 搜索空状态 */
.search-empty {
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
  color: var(--text-muted);
}

.search-empty svg {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-md);
  opacity: 0.4;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .search-modal {
    padding-top: 0;
    align-items: stretch;
  }
  
  .search-modal-content {
    width: 100%;
    max-width: none;
    height: 100vh;
    border-radius: 0;
    transform: translateY(100%);
  }
  
  .search-modal.active .search-modal-content {
    transform: translateY(0);
  }
  
  .search-results {
    max-height: none;
    flex: 1;
  }
}
