/* 站点全局样式（遵循 .cursorrules：写清楚每个代码块的规则）
   规则：
   - 使用 Tailwind CDN 提供的原子类为主，少量自定义补充。
   - 负责统一动画、灯箱、滚动条与基础排版的细节。
*/

/* 基础排版与主题色 */
:root {
  --brand-bg: #0f172a; /* 深色背景 */
  --brand-fg: #e2e8f0; /* 浅色前景 */
  --accent: #38bdf8;  /* 强调色 */
}

html { scroll-behavior: smooth; }

body {
  background: var(--brand-bg);
  color: var(--brand-fg);
  min-height: 100vh;
  /* 还原：使用原始站点背景图 */
  background-image: url('/assets/site-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* 可见焦点，辅助无障碍 */
:focus { outline: 2px dashed var(--accent); outline-offset: 2px; }

/* Header 样式：粘性导航与半透明背景 */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(8px);
  background: rgba(2,6,23,0.7);
}

/* 活动导航高亮 */
.nav-link.active { color: var(--accent); }

/* 英雄区背景与渐变覆盖 */
.hero {
  background: radial-gradient(1000px 400px at 10% 10%, rgba(56,189,248,0.15), transparent),
              radial-gradient(800px 300px at 80% 20%, rgba(99,102,241,0.14), transparent);
}

/* 卡片与阴影节奏 */
.card {
  border-radius: 0.75rem;
  background: rgba(255,255,255,0.04);
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}
.card:hover { box-shadow: 0 12px 32px rgba(0,0,0,0.45); }

/* 图片灯箱：覆盖层与内容容器 */
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.7);
}
.lightbox-overlay.open { display: flex; }
.lightbox-content { max-width: 90vw; max-height: 90vh; }
.lightbox-content img { width: 100%; height: auto; object-fit: contain; }

/* 自定义滚动条（兼容性有限） */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,0.06); }
::-webkit-scrollbar-thumb { background: rgba(56,189,248,0.6); border-radius: 8px; }

/* 全局背景遮罩：提升对比度，保证文字可读性 */
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none;
  background: linear-gradient( to bottom right, rgba(2,6,23,0.55), rgba(56,189,248,0.12) );
  z-index: -1;
}