:root {
  --bg: #0f172a;
  --card: #0b132b;
  --muted: #94a3b8;
  --text: #e2e8f0;
  --accent: #22d3ee;
  --accent-2: #60a5fa;
  --ok: #34d399;
  --warn: #f59e0b;
  --danger: #fb7185;
  --tag: #1f2937;
  --radius: 14px;
  --nav-height: 60px;
  
  /* 多语言字体支持 */
  --font-family-zh: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-family-en: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  
  /* 阴影系统 - 增强层次感 */
  --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-sm: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
  --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
  --shadow-lg: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.3), 0 15px 15px rgba(0, 0, 0, 0.2);
  --shadow: var(--shadow-md);
  
  /* 层次深度变量 */
  --depth-1: 0 1px 3px rgba(0, 0, 0, 0.2);
  --depth-2: 0 4px 8px rgba(0, 0, 0, 0.25);
  --depth-3: 0 8px 16px rgba(0, 0, 0, 0.3);
  --depth-4: 0 12px 24px rgba(0, 0, 0, 0.35);
  --depth-5: 0 16px 32px rgba(0, 0, 0, 0.4);
  
  /* 通用间距 */
  --spacing-xs: 4px;
  --spacing-sm: 6px;
  --spacing-md: 8px;
  --spacing-lg: 12px;
  --spacing-xl: 16px;
  
  /* 通用字体大小体系 */
  --font-xs: 11px;      /* 小标签、辅助文字 */
  --font-sm: 12px;      /* 元数据、次要信息 */
  --font-md: 13px;      /* 正文内容、描述 */
  --font-lg: 14px;      /* 主要文字、导航 */
  --font-xl: 16px;      /* 重要文字、子标题 */
  --font-2xl: 18px;     /* 页面标题、主标题 */
  --font-3xl: 20px;     /* 大标题 */
  
  /* 标准正文大小 */
  --font-body: var(--font-md);
  --font-body-large: var(--font-lg);
  
  /* 标准标题大小 */
  --font-heading-sm: var(--font-xl);
  --font-heading-md: var(--font-2xl);
  --font-heading-lg: var(--font-3xl);
}

* {
  box-sizing: border-box
}

html,
body {
  margin: 0;
  padding: 0;
  background: 
    radial-gradient(ellipse 800px 600px at 20% -10%, rgba(34, 211, 238, 0.05), transparent 60%),
    radial-gradient(ellipse 600px 400px at 80% 110%, rgba(96, 165, 250, 0.08), transparent 60%),
    radial-gradient(ellipse 400px 300px at 50% 50%, rgba(168, 85, 247, 0.03), transparent 70%),
    linear-gradient(180deg, #0b1024, #0f172a 40%, #0b1024 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: var(--font-body-large);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: .05px;
  min-height: 100vh;
  position: relative;
}

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

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px
}

body {
  -webkit-tap-highlight-color: transparent
}

/* 多语言字体切换 */
html[lang="zh"], html[lang="zh-CN"], html[data-lang="zh"] {
  font-family: var(--font-family-zh);
}

html[lang="en"], html[lang="en-US"], html[data-lang="en"] {
  font-family: var(--font-family-en);
}

/* 语言切换器样式 */
.language-switcher {
  position: fixed;
  top: 6px;
  right: 20px;
  z-index: 1001;
  display: flex;
  gap: 5px;
  background: 
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.9)),
    rgba(15, 23, 42, 0.8);
  border-radius: 20px;
  padding: 5px;
  backdrop-filter: blur(16px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 
    var(--depth-3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.lang-btn {
  background: transparent;
  border: none;
  color: #8b949e;
  padding: 8px 12px;
  border-radius: 15px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
  min-width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.lang-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.lang-btn:hover::before {
  opacity: 1;
}

.lang-btn:hover {
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.lang-btn.active {
  background: linear-gradient(135deg, var(--accent), rgba(34, 211, 238, 0.9));
  color: #0b132b;
  font-weight: 600;
  box-shadow: 
    0 4px 12px rgba(34, 211, 238, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.lang-btn:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.lang-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* 通用工具类 */
.card-like {
  background: linear-gradient(180deg, #0b132b, #0a1226);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--radius);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow);
  margin-bottom: var(--spacing-md);
}

.text-gradient {
  background: linear-gradient(90deg, #e2e8f0 0%, #93c5fd 60%, #22d3ee 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 导航栏 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: 
    linear-gradient(135deg, rgba(34, 211, 238, 0.08), transparent 50%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(11, 19, 35, 0.95));
  backdrop-filter: blur(24px) saturate(200%);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 
    var(--depth-4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 0 20px rgba(34, 211, 238, 0.1);
  display: flex;
  align-items: center;
  padding: 0 var(--spacing-xl);
  z-index: 1000;
  transition: all 0.3s ease;
}

.nav-left {
  position: absolute;
  left: var(--spacing-xl);
  display: flex;
  align-items: center;
  z-index: 2;
  position: relative;
  width: 36px;
  height: 36px;
}

.nav-back {
  width: 36px;
  height: 36px;
  border-radius: var(--spacing-md);
  background: 
    linear-gradient(135deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04)),
    radial-gradient(circle at 30% 30%, rgba(34, 211, 238, 0.15), transparent 70%);
  border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: 
    var(--depth-2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 0 8px rgba(34, 211, 238, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: var(--font-xl);
  opacity: 0;
  pointer-events: none;
  position: absolute;
  left: 0;
  top: 0;
  overflow: hidden;
}

.nav-home {
  width: 36px;
  height: 36px;
  border-radius: var(--spacing-md);
  background: 
    linear-gradient(135deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04)),
    radial-gradient(circle at 30% 30%, rgba(34, 211, 238, 0.15), transparent 70%);
  border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: 
    var(--depth-2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 0 8px rgba(34, 211, 238, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  pointer-events: none;
  position: absolute;
  left: 0;
  top: 0;
  overflow: hidden;
  color: var(--text);
}

.nav-home svg {
  width: 20px;
  height: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-back.visible {
  opacity: 1;
  pointer-events: auto;
}

.nav-back:hover {
  background: 
    linear-gradient(135deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .06)),
    radial-gradient(circle at 30% 30%, rgba(34, 211, 238, 0.2), transparent 70%);
  transform: scale(1.08) translateY(-2px);
  box-shadow: 
    var(--depth-3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 0 12px rgba(34, 211, 238, 0.3);
}

.nav-home.visible {
  opacity: 1;
  pointer-events: auto;
}

.nav-home:hover {
  background: 
    linear-gradient(135deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .06)),
    radial-gradient(circle at 30% 30%, rgba(34, 211, 238, 0.2), transparent 70%);
  transform: scale(1.08) translateY(-2px);
  box-shadow: 
    var(--depth-3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 0 12px rgba(34, 211, 238, 0.3);
  color: var(--accent);
}

.nav-home:hover svg {
  transform: scale(1.1);
}

.nav-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 600;
  font-size: var(--font-xl);
  background: linear-gradient(90deg, #e2e8f0 0%, #93c5fd 60%, #22d3ee 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100vw - 200px);
  z-index: 1;
}

.nav-title.expanded {
  max-width: calc(100vw - 120px);
}

.nav-right {
  position: absolute;
  right: var(--spacing-xl);
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  z-index: 2;
}

.period-selector {
  display: flex;
  gap: var(--spacing-xs);
  background: 
    linear-gradient(135deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02)),
    rgba(255, 255, 255, .03);
  border-radius: var(--spacing-md);
  padding: 3px;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: var(--depth-1);
  backdrop-filter: blur(8px);
}

.period-selector.hidden {
  display: none;
}

.period-btn {
  font-size: 11px;
  color: #cbd5e1;
  background: transparent;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.period-btn:hover {
  background: rgba(255, 255, 255, .08);
  color: #e2e8f0;
}

.period-btn.active {
  background: linear-gradient(135deg, var(--accent), rgba(34, 211, 238, 0.8));
  color: #0b132b;
  font-weight: 500;
  box-shadow: var(--depth-2);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 底部浮动时间段选择器 */
.bottom-period-selector {
  position: fixed;
  bottom: var(--spacing-xl);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  pointer-events: none;
}

.period-selector-container {
  display: flex;
  gap: var(--spacing-xs);
  background: 
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.9)),
    rgba(15, 23, 42, 0.8);
  border-radius: var(--spacing-lg);
  padding: var(--spacing-sm);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 
    0 20px 25px -5px rgba(0, 0, 0, 0.4),
    0 10px 10px -5px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  pointer-events: auto;
}

.bottom-period-selector .period-btn {
  font-size: 13px;
  color: #cbd5e1;
  background: transparent;
  border: none;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--spacing-sm);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-weight: 500;
  min-width: 48px;
}

.bottom-period-selector .period-btn:hover {
  background: rgba(255, 255, 255, .1);
  color: #f1f5f9;
  transform: translateY(-1px);
}

.bottom-period-selector .period-btn.active {
  background: linear-gradient(135deg, var(--accent), rgba(34, 211, 238, 0.9));
  color: #0b132b;
  font-weight: 600;
  box-shadow: 
    0 4px 12px rgba(34, 211, 238, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 主要内容区域 */
.main-container {
  margin-top: var(--nav-height);
  min-height: calc(100vh - var(--nav-height));
  position: relative;
  background: 
    radial-gradient(ellipse 800px 600px at 50% 0%, rgba(34, 211, 238, 0.03), transparent 70%);
}

.page {
  width: 100%;
  min-height: calc(100vh - var(--nav-height));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-xl) 80px;
  padding-left: calc(var(--spacing-xl) + env(safe-area-inset-left));
  padding-right: calc(var(--spacing-xl) + env(safe-area-inset-right));
}

/* 卡片和通用样式 */
.card {
  background: 
    linear-gradient(135deg, rgba(34, 211, 238, 0.03), transparent 50%),
    linear-gradient(180deg, #0b132b, #0a1226);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius);
  padding: var(--spacing-lg);
  box-shadow: var(--depth-2);
  margin-bottom: var(--spacing-md);
}

/* 日期列表样式 */
.date-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.date-item {
  padding: var(--spacing-lg);
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.02), transparent 50%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.date-item:hover {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.05), transparent 50%);
  border-color: rgba(96, 165, 250, 0.1);
  transform: translateX(2px);
}

.date-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-sm);
}

.date-header h3 {
  margin: 0;
  font-size: var(--font-lg);
  font-weight: 600;
}

.date-header h3 a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.date-header h3 a:hover {
  color: var(--accent);
}

.date-period {
  background: rgba(34, 211, 238, 0.1);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: var(--font-xs);
  font-weight: 500;
}

.date-meta {
  display: flex;
  gap: var(--spacing-lg);
  font-size: var(--font-sm);
  color: var(--muted);
}

/* 卡片头部和底部样式 */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-md);
}

.card-header h2 {
  margin: 0;
}

.view-more-link {
  color: var(--accent);
  text-decoration: none;
  font-size: var(--font-sm);
  font-weight: 500;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 6px;
  transition: all 0.2s ease;
  background: rgba(34, 211, 238, 0.05);
}

.view-more-link:hover {
  background: rgba(34, 211, 238, 0.1);
  border-color: rgba(34, 211, 238, 0.3);
  transform: translateX(2px);
}

.card-footer {
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.card-footer p {
  margin: 0;
  text-align: center;
}

.inline-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.inline-link:hover {
  color: var(--accent-2);
  text-decoration: underline;
}

h1 {
  font-size: var(--font-heading-lg);
  margin: 0 0 var(--spacing-md);
  letter-spacing: .1px;
  position: relative;
  padding-bottom: var(--spacing-sm);
  font-weight: 700;
}

h2 {
  font-size: var(--font-heading-md);
  margin: 0 0 var(--spacing-md);
  letter-spacing: .1px;
  position: relative;
  padding-bottom: var(--spacing-sm);
  font-weight: 600;
}

h1::after,
h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 44px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 3px;
  opacity: .85;
}

.grid {
  display: grid;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

@media(min-width:620px) {
  .grid {
    grid-template-columns: 1fr 1fr
  }
}

/* 仓库列表样式 */
.repo-item {
  background: 
    linear-gradient(135deg, rgba(34, 211, 238, 0.04), transparent 50%),
    linear-gradient(180deg, rgba(15, 26, 53, 0.95), rgba(11, 19, 43, 0.92));
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius);
  padding: 0; /* 移除内边距，让链接处理 */
  margin-bottom: var(--spacing-md);
  box-shadow: var(--depth-2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden; /* 确保链接不会溢出 */
}

.repo-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--depth-3);
}

/* 仓库链接样式 - SEO优化 */
.repo-link {
  display: block;
  color: inherit;
  text-decoration: none;
  width: 100%;
  padding: var(--spacing-lg); /* 原来在 repo-item 上的内边距 */
  border-radius: var(--radius);
}

.repo-link:hover {
  color: inherit;
  text-decoration: none;
}

.repo-link:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius);
}

.repo-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.repo-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--spacing-md);
}

.repo-name {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .05px;
  margin: 0;
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
  background: linear-gradient(90deg, #e2e8f0 0%, #93c5fd 60%, #22d3ee 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.repo-name a {
  background: linear-gradient(90deg, #e2e8f0 0%, #93c5fd 60%, #22d3ee 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.repo-stars {
  color: var(--accent);
  font-size: var(--font-md);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  white-space: nowrap;
  font-weight: 500;
}

.repo-desc {
  color: var(--muted);
  font-size: var(--font-lg);
  line-height: 1.4;
  margin: var(--spacing-md) 0;
}

.repo-meta {
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
  font-size: var(--font-sm);
  color: var(--muted);
  margin-top: var(--spacing-md);
  flex-wrap: wrap;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 8px;
  background: 
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, .03);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--depth-1);
  backdrop-filter: blur(4px);
}

.lang-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 3px;
}

.contributors {
  display: flex;
  gap: var(--spacing-xs);
  margin-top: var(--spacing-sm);
}

.contributor-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .2);
  cursor: pointer;
  box-shadow: var(--depth-1);
}

.analysis-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-left: 8px;
  background: var(--ok);
}

.analysis-indicator.loading {
  background: var(--warn);
}

.analysis-indicator.error {
  background: var(--danger);
}

/* Review页面样式 */
.hero {
  background: 
    radial-gradient(ellipse 1200px 400px at 20% -20%, rgba(34, 211, 238, 0.18), transparent 50%),
    radial-gradient(ellipse 900px 300px at 100% 0%, rgba(96, 165, 250, 0.15), transparent 50%),
    radial-gradient(ellipse 600px 200px at 80% 80%, rgba(168, 85, 247, 0.1), transparent 60%),
    linear-gradient(135deg, #0b1229 0%, #0f172a 70%);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 24px;
  padding: var(--spacing-xl);
  box-shadow: 
    var(--depth-5),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 0 50px rgba(34, 211, 238, 0.12);
  margin-bottom: var(--spacing-lg);
  position: relative;
  overflow: hidden;
}

.hero-title {
  font-weight: 700;
  letter-spacing: .05px;
  line-height: 1.3;
  margin: 0 0 10px;
  font-size: var(--font-heading-md);
  background: linear-gradient(90deg, #e2e8f0 0%, #93c5fd 60%, #22d3ee 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.hero-subtitle {
  color: var(--muted);
  font-size: var(--font-md);
  letter-spacing: .05px;
  margin: 0;
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.hero-snapshot {
  color: var(--muted);
  font-size: var(--font-md);
  margin: var(--spacing-md) 0 var(--spacing-lg);
  opacity: 0.8;
}

.hero-info {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-md) 0;
}

.info-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: var(--font-sm);
  padding: var(--spacing-xs) var(--spacing-md);
  background: 
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.03);
  border-radius: var(--spacing-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--depth-1);
  backdrop-filter: blur(8px);
}

.info-label {
  color: var(--muted);
  font-weight: 500;
  font-size: var(--font-xs);
}

.info-item a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}

.info-item a:hover {
  text-decoration: underline;
}

.tags {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  margin-top: var(--spacing-lg);
}

.tag {
  font-size: var(--font-sm);
  color: var(--text);
  background: 
    linear-gradient(135deg, rgba(34, 211, 238, 0.05), transparent 50%),
    linear-gradient(180deg, #0f1a35, #0b132b);
  border: 1px solid rgba(255, 255, 255, .1);
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: 999px;
  box-shadow: var(--depth-1);
}

.bullets {
  list-style: none;
  padding: 0;
  margin: var(--spacing-lg) 0 0;
}

.bullets li {
  display: flex;
  gap: var(--spacing-md);
  margin: var(--spacing-md) 0;
  align-items: flex-start;
}

.bullets li .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 7px;
}

.bullets li .text {
  flex: 1;
  font-size: var(--font-body);
}

.muted {
  color: var(--muted);
}

/* 条形图 */
.bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bar .label {
  min-width: 74px;
  font-size: 12px;
  color: #cbd5e1;
}

.bar .track {
  flex: 1;
  height: 10px;
  background: #0a1428;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .06);
  overflow: hidden;
}

.bar .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: inherit;
}

.bar .val {
  min-width: 64px;
  text-align: right;
  font-size: 12px;
  color: #e5e7eb;
}

/* 甜甜圈图 */
.donut-wrap {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.donut {
  width: clamp(96px, 28vw, 120px);
  height: clamp(96px, 28vw, 120px);
  border-radius: 50%;
  background: conic-gradient(#334155 0% 100%);
  position: relative;
  box-shadow: 
    inset 0 0 30px rgba(0, 0, 0, .35), 
    0 8px 20px rgba(0, 0, 0, .25);
  border: 1px solid rgba(255, 255, 255, .06);
}

.donut::after {
  content: "";
  position: absolute;
  inset: 16px;
  background: linear-gradient(180deg, #0b132b, #0a1226);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .06);
}

.legend {
  display: grid;
  gap: 8px;
  font-size: 13px;
  grid-template-columns: 1fr;
}

.legend .item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legend .sw {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, .25);
}

/* 加载和错误状态 */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--muted);
  position: relative;
}

.loading::before {
  content: '';
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 3px solid rgba(34, 211, 238, 0.2);
  border-radius: 50%;
  border-top-color: var(--accent);
  animation: spin 1s ease-in-out infinite;
  margin-bottom: 16px;
}

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

.error {
  background: linear-gradient(180deg, #2d1b1b, #1a0e0e);
  border-color: #fb7185;
  color: #fecaca;
}

/* 响应式设计 */
@media (max-width:480px) {
  html,
  body {
    font-size: var(--font-lg);  /* 从 13px 增加到 14px */
  }

  .navbar {
    padding: 0 var(--spacing-lg);
    height: 56px;
  }

  .main-container {
    margin-top: 56px;
    min-height: calc(100vh - 56px);
  }

  .nav-left {
    left: var(--spacing-lg);
    width: 32px;
    height: 32px;
  }

  .nav-back,
  .nav-home {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .nav-right {
    right: var(--spacing-lg);
  }

  .nav-title {
    font-size: 14px;
    max-width: calc(100vw - 180px);
  }

  .nav-title.expanded {
    max-width: calc(100vw - 120px);
  }

  .period-btn {
    font-size: 10px;
    padding: 5px 8px;
  }

  /* 底部浮动选择器移动端样式 */
  .bottom-period-selector {
    bottom: calc(var(--spacing-md) + env(safe-area-inset-bottom));
    left: var(--spacing-md);
    right: var(--spacing-md);
    transform: none;
  }

  .period-selector-container {
    justify-content: center;
    padding: var(--spacing-xs);
  }

  .bottom-period-selector .period-btn {
    font-size: 12px;
    padding: var(--spacing-xs) var(--spacing-sm);
    min-width: 40px;
    flex: 1;
    max-width: 80px;
  }

  .wrap {
    padding: var(--spacing-lg) var(--spacing-lg) 90px;
    padding-left: calc(var(--spacing-lg) + env(safe-area-inset-left));
    padding-right: calc(var(--spacing-lg) + env(safe-area-inset-right));
  }

  .card {
    padding: var(--spacing-xs);  /* 从 12px 增加到 16px */
    margin-bottom: var(--spacing-md);  /* 从 6px 增加到 8px */
    border-radius: 12px;
  }

  h1 {
    font-size: var(--font-heading-md);
    margin: 0 0 var(--spacing-sm);
    padding-bottom: var(--spacing-xs);
  }

  h2 {
    font-size: var(--font-heading-sm);
    margin: 0 0 var(--spacing-sm);
    padding-bottom: var(--spacing-xs);
  }

  .grid {
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
  }

  .repo-item {
    padding: 0; /* 移除内边距，让链接处理 */
    margin-bottom: var(--spacing-md);  /* 从 6px 增加到 8px */
    border-radius: 12px;
  }
  
  /* 移动端链接样式 */
  .repo-link {
    padding: var(--spacing-xl); /* 移动端内边距 */
    border-radius: 12px;
  }

  .repo-header {
    margin-bottom: var(--spacing-md);
  }

  .repo-name {
    font-size: var(--font-xl);  /* 从 14px 增加到 16px */
  }

  .repo-stars {
    font-size: var(--font-md);  /* 从 12px 增加到 13px */
  }

  .repo-desc {
    font-size: var(--font-lg);  /* 从 13px 增加到 14px */
    margin: var(--spacing-md) 0;
    line-height: 1.5;  /* 增加行高提升可读性 */
  }

  .repo-meta {
    font-size: var(--font-sm);  /* 从 11px 增加到 12px */
    margin-top: var(--spacing-md);
    gap: var(--spacing-sm);
  }

  .meta-item {
    padding: 2px var(--spacing-sm);
    gap: 2px;
  }

  .contributors {
    gap: 3px;
    margin-top: var(--spacing-sm);
  }

  .contributor-avatar {
    width: 20px;
    height: 20px;
  }

  .hero {
    padding: var(--spacing-lg);
    border-radius: 12px;
  }

  .hero-title {
    font-size: var(--font-heading-md);  /* 从 16px 增加到 18px */
    margin: 0 0 var(--spacing-md);
  }

  .hero-snapshot {
    font-size: var(--font-md);  /* 从 12px 增加到 13px */
    margin: var(--spacing-sm) 0 var(--spacing-lg);
    line-height: 1.5;  /* 增加行高 */
  }

  .hero-info {
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-sm) 0;
  }

  .info-item {
    font-size: var(--font-sm);  /* 从 11px 增加到 12px */
    padding: 4px var(--spacing-sm);  /* 增加内边距 */
    gap: var(--spacing-xs);
  }

  .info-label {
    font-size: var(--font-xs);  /* 从 10px 增加到 11px */
  }

  .hero-subtitle {
    font-size: var(--font-sm);
  }

  .tag {
    font-size: var(--font-sm);  /* 从 11px 增加到 12px */
    padding: var(--spacing-xs) var(--spacing-md);
  }

  .bar .label {
    min-width: 60px;
    font-size: var(--font-xs);
  }

  .bar .val {
    min-width: 50px;
    font-size: var(--font-xs);
  }

  .donut {
    width: 100px;
    height: 100px;
  }

  .legend {
    font-size: var(--font-sm);
  }

  /* 移动端bullets列表优化 */
  .bullets {
    margin: var(--spacing-md) 0 0;
  }

  .bullets li {
    gap: var(--spacing-sm);
    margin: var(--spacing-sm) 0;
  }

  .bullets li .dot {
    width: 6px;
    height: 6px;
    margin-top: 6px;
    flex-shrink: 0;
  }

  .bullets li .text {
    font-size: var(--font-md);  /* 从 12px 增加到 13px */
    line-height: 1.6;  /* 增加行高提升可读性 */
  }
}

/* 增强效果 */
p,
.bullets li .text {
  overflow-wrap: anywhere;
}

.card {
  backdrop-filter: saturate(120%) blur(8px);
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), rgba(34, 211, 238, 0.6));
  border-radius: 3px;
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--accent), rgba(34, 211, 238, 0.8));
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.4);
}

/* 选择文本样式 */
::selection {
  background: rgba(34, 211, 238, 0.3);
  color: var(--text);
}

::-moz-selection {
  background: rgba(34, 211, 238, 0.3);
  color: var(--text);
}

/* 全局深度层次系统 */
.depth-layer-1 { box-shadow: var(--depth-1); }
.depth-layer-2 { box-shadow: var(--depth-2); }
.depth-layer-3 { box-shadow: var(--depth-3); }
.depth-layer-4 { box-shadow: var(--depth-4); }
.depth-layer-5 { box-shadow: var(--depth-5); }

/* 增强对比度的文本阴影 */
.text-shadow-sm {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.text-shadow-md {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.text-shadow-lg {
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 可访问性辅助类 */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* 跳转链接（键盘导航） */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--accent);
  color: var(--bg);
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 10000;
  font-weight: 600;
}

.skip-link:focus {
  top: 6px;
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
  :root {
    --text: #ffffff;
    --bg: #000000;
    --accent: #00ffff;
  }
}

/* 减动画偏好支持 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 焦点可见性增强 */
.period-btn:focus-visible,
.nav-back:focus-visible,
.nav-home:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Q&A 深度解析模块样式 */
.qa-section {
  margin-top: 0rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.section-header.compact {
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
}

.section-header h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--font-heading-sm);
  font-weight: 600;
}

.qa-count {
  font-size: var(--font-sm);
  color: var(--text-muted);
  background: var(--bg-alt);
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  min-width: 1.5rem;
  text-align: center;
}

.qa-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.qa-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  transition: all 0.2s ease;
}

.qa-item:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.qa-item[open] {
  border-color: var(--accent);
  background: var(--bg-alt);
}

.qa-summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background-color 0.2s ease;
}

.qa-summary::-webkit-details-marker {
  display: none;
}

.qa-summary:hover {
  background: var(--bg-alt);
}

.qa-item[open] .qa-summary {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.question-preview {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.category-badge {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.category-badge.category-problem_solving {
  background: #059669;
}

.category-badge.category-technical_solution {
  background: #0891b2;
}

.category-badge.category-user_experience {
  background: #d97706;
}

.category-badge.category-applicability_assessment {
  background: #e11d48;
}

.question-text {
  flex: 1;
  font-size: var(--font-body);
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}

/* 高亮问题样式 */
.highlighted-question {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(96, 165, 250, 0.06));
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(34, 211, 238, 0.15);
  box-shadow: 
    0 2px 4px rgba(34, 211, 238, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-weight: 600;
  color: var(--text);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.highlighted-question::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.4), transparent);
  opacity: 0.6;
}

.qa-summary:hover .highlighted-question {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(96, 165, 250, 0.08));
  border-color: rgba(34, 211, 238, 0.25);
  box-shadow: 
    0 3px 6px rgba(34, 211, 238, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.expand-icon {
  color: var(--text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.qa-item[open] .expand-icon {
  transform: rotate(45deg);
}

.qa-content {
  padding: 0 1.25rem 1rem;
  animation: slideDown 0.2s ease-out;
}

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

.answer-text {
  font-size: var(--font-body);
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

/* Markdown转换后的HTML样式 */
.answer-text p {
  margin: 0 0 0.75rem 0;
}

.answer-text p:last-child {
  margin-bottom: 0;
}

.answer-text strong {
  font-weight: 600;
  color: var(--text);
}

.answer-text em {
  font-style: italic;
  color: var(--text);
}

.answer-text code {
  background: var(--bg-alt);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  font-size: 0.85rem;
  color: var(--text);
  border: 1px solid var(--border);
}

.answer-text a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.answer-text a:hover {
  border-bottom-color: var(--accent);
}

.answer-text .list-item {
  display: inline;
}

.answer-text .list-number {
  font-weight: 600;
  color: var(--accent);
  margin-right: 0.25rem;
}

/* answer-text 中的标题样式 - 减小字体大小保持协调 */
.answer-text h1 {
  font-size: var(--font-lg);
  font-weight: 600;
  color: var(--text);
  margin: 0.75rem 0 0.5rem 0;
  line-height: 1.3;
}

.answer-text h2 {
  font-size: var(--font-md);
  font-weight: 600;
  color: var(--text);
  margin: 0.6rem 0 0.4rem 0;
  line-height: 1.3;
}

.answer-text h3 {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text);
  margin: 0.5rem 0 0.3rem 0;
  line-height: 1.3;
}

.answer-text h4,
.answer-text h5,
.answer-text h6 {
  font-size: var(--font-sm);
  font-weight: 500;
  color: var(--text);
  margin: 0.4rem 0 0.2rem 0;
  line-height: 1.3;
}

/* answer-text 中的列表样式 */
.answer-text ul,
.answer-text ol {
  margin: 0.5rem 0;
  padding-left: 1.2rem;
  font-size: inherit;
}

.answer-text li {
  margin: 0.2rem 0;
  line-height: 1.5;
}

/* answer-text 中的引用样式 */
.answer-text blockquote {
  margin: 0.75rem 0;
  padding: 0.5rem 0.75rem;
  border-left: 3px solid var(--accent);
  background: rgba(34, 211, 238, 0.05);
  border-radius: 0 4px 4px 0;
  font-style: italic;
  color: var(--muted);
}

.qa-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
}

.confidence-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.confidence-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.confidence-text {
  color: var(--text-muted);
  font-weight: 500;
  font-size: var(--font-xs);
}

/* 次要信息区域样式 */
.secondary-info {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
  opacity: 0.8;
}

.secondary-card {
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
}

.secondary-card h2 {
  font-size: 1rem;
  color: var(--text-muted);
}

.donut.small {
  width: 80px;
  height: 80px;
}

.legend.compact .item {
  font-size: 0.8rem;
  padding: 0.25rem 0;
}

.legend.compact .sw {
  width: 8px;
  height: 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .section-header {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
  }
  
  .section-header.compact {
    margin-bottom: 0.5rem;
    padding-bottom: 0.4rem;
  }
  
  .section-header h2 {
    font-size: var(--font-xl);  /* 从 14px 增加到 16px */
  }
  
  .qa-count {
    font-size: var(--font-body);  /* 从 11px 增加到 12px */
    padding: 0.2rem 0.6rem;  /* 增加内边距 */
  }
  
  .qa-summary {
    padding: 1rem 1.2rem;  /* 增加内边距提升点击体验 */
  }
  
  .question-text {
    font-size: var(--font-body);  /* 从 12px 增加到 13px */
  }
  
  /* 移动端高亮问题样式 */
  .highlighted-question {
    padding: 0.5rem 0.7rem;  /* 增加内边距 */
    font-size: var(--font-body);  /* 从 12px 增加到 13px */
    border-radius: 6px;
  }
  
  .qa-summary:hover .highlighted-question {
    transform: translateY(-0.5px);
  }
  
  .qa-content {
    padding: 0 1.2rem 1rem;  /* 增加内边距 */
  }
  
  .answer-text {
    font-size: var(--font-body);  /* 从 12px 增加到 13px */
    line-height: 1.6;  /* 增加行高 */
  }
  
  /* 移动端 answer-text 标题样式 */
  .answer-text h1 {
    font-size: var(--font-lg);  /* 从 13px 增加到 14px */
    margin: 0.6rem 0 0.4rem 0;
  }
  
  .answer-text h2 {
    font-size: var(--font-body);  /* 从 12px 增加到 13px */
    margin: 0.5rem 0 0.3rem 0;
  }
  
  .answer-text h3,
  .answer-text h4,
  .answer-text h5,
  .answer-text h6 {
    font-size: var(--font-body);  /* 从 11px 增加到 12px */
    margin: 0.4rem 0 0.2rem 0;
  }
  
  .qa-meta {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.4rem;
  }
  
  .confidence-text {
    font-size: 10px;
  }
  
  .secondary-info .grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .donut.small {
    width: 60px;
    height: 60px;
  }
  
  /* 移动端语言切换器调整 */
  .language-switcher {
    top: 10px;
    right: 10px;
    scale: 0.9;
    backdrop-filter: blur(12px) saturate(180%);
  }
  
  .lang-btn {
    padding: 6px 10px;
    font-size: 11px;
    min-width: 28px;
  }
}

/* ============= Footer Styles ============= */

/* 为带有footer的页面调整布局 */
body.has-footer {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body.has-footer .main-container {
  flex: 1;
  margin-bottom: 0; /* 移除底部margin，让footer紧贴主内容 */
}

/* Footer 主容器 */
.site-footer {
  background: linear-gradient(135deg, var(--card) 0%, #0a1121 100%);
  border-top: 1px solid rgba(34, 211, 238, 0.1);
  color: var(--text);
  padding: 0.5rem 0 0.5rem;
  margin-top: auto;
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.3;
}

/* Footer 内容容器 */
.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

/* Footer 各个部分 */
.footer-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-section h4 {
  color: var(--accent);
  font-size: var(--font-lg);
  font-weight: 600;
  margin: 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(34, 211, 238, 0.2);
}

.footer-section p {
  color: var(--muted);
  font-size: var(--font-md);
  line-height: 1.6;
  margin: 0;
}

/* 快速链接列表 */
.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-section ul li {
  margin: 0;
}

.footer-section ul li a {
  color: var(--muted);
  text-decoration: none;
  font-size: var(--font-md);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0;
}

.footer-section ul li a:hover {
  color: var(--accent);
  transform: translateX(4px);
}

/* 联系信息 */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  text-decoration: none;
  font-size: var(--font-md);
  padding: 0.5rem 0;
  transition: all 0.2s ease;
  border-radius: var(--radius);
}

.contact-link:hover {
  color: var(--accent);
  background: rgba(34, 211, 238, 0.1);
  padding-left: 0.5rem;
}

.contact-link svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.contact-link:hover svg {
  opacity: 1;
}

/* Footer 底部 */
.footer-bottom {
  /* margin-top: 2rem; */
  /* padding-top: 1.5rem; */
  /* border-top: 1px solid rgba(148, 163, 184, 0.1); */
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.copyright {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.copyright p {
  margin: 0;
  color: var(--muted);
  font-size: var(--font-sm);
}

.powered-by {
  opacity: 0.7;
}

.powered-by a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.powered-by a:hover {
  opacity: 0.8;
}

/* Footer 链接 */
.footer-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: var(--font-sm);
  transition: color 0.2s ease;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: left;
  }
  
  .footer-section {
    gap: 0.75rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .footer-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .contact-info {
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .site-footer {
    padding: 0.5rem 0 0.5rem;
  }
  
  .footer-content {
    padding: 0 0.75rem;
    gap: 1.5rem;
  }
  
  .footer-section h4 {
    font-size: var(--font-md);
  }
  
  .footer-section p,
  .footer-section ul li a,
  .contact-link {
    font-size: var(--font-sm);
  }
  
  .footer-links a {
    font-size: var(--font-xs);
  }
  
  .copyright p {
    font-size: var(--font-xs);
  }
}

/* 调整底部时间段选择器的位置，避免与footer重叠 */
.bottom-period-selector {
  bottom: 1rem; /* 从底部留出更多空间 */
}

@media (max-width: 768px) {
  .bottom-period-selector {
    bottom: 0.5rem;
  }
}