/* ========================================
   高2026届7班毕业纪念册 - 克莱因蓝主题
   ======================================== */

:root {
  /* 背景色系 - 浅蓝 */
  --bg-deep: #dce8f5;
  --bg-primary: #e8f0fe;
  --bg-secondary: #eef4fa;
  --bg-card: rgba(255, 255, 255, 0.85);

  /* 渐变色系 - 克莱因蓝 */
  --gradient-purple: linear-gradient(135deg, #002FA7, #1a56db);
  --gradient-blue: linear-gradient(135deg, #1a56db, #3b82f6);
  --gradient-gold: linear-gradient(135deg, #f59e0b, #d97706);
  --gradient-bg: linear-gradient(180deg, #e8f0fe 0%, #eef4fa 40%, #f0f5fa 70%, #e8f0fe 100%);

  /* 卡片 - 白色系 */
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-bg-hover: rgba(255, 255, 255, 0.95);
  --glass-border: rgba(0, 47, 167, 0.12);
  --glass-border-hover: rgba(0, 47, 167, 0.3);
  --glass-blur: blur(4px);
  --glass-shadow: 0 2px 16px rgba(0, 47, 167, 0.06);

  /* 文字色系 */
  --text-primary: #0f1a30;
  --text-secondary: #4a5568;
  --text-tertiary: #8895a7;
  --text-accent: #002FA7;

  /* 强调色 - 克莱因蓝 */
  --accent-purple: #002FA7;
  --accent-blue: #1a56db;
  --accent-gold: #c27803;
  --accent-pink: #c02660;
  --accent-cyan: #0891b2;

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* 间距 */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* 字体 */
  --font-display: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-body: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-en: 'SF Pro Display', 'Inter', -apple-system, sans-serif;

  /* 过渡 */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* 容器宽度 */
  --container-max: 1200px;
  --container-padding: 24px;
}

/* Reset */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* 背景渐变层 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--gradient-bg);
  z-index: -3;
  pointer-events: none;
}

/* Canvas 粒子层 */
#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

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

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 47, 167, 0.15);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 47, 167, 0.3);
}

/* 容器 */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* 区块标题 */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-sm);
  background: linear-gradient(135deg, #002FA7 0%, #1a56db 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: var(--space-3xl);
  letter-spacing: 0.05em;
}

/* 页面区块 */
.page-section {
  display: none;
  padding: var(--space-4xl) 0;
  min-height: 100vh;
  will-change: transform;
}

.page-section.active {
  display: block;
  animation: fadeSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 导航栏 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-md) 0;
  transition: var(--transition-base);
  transform: translateZ(0);
}

.navbar.scrolled {
  background: rgba(232, 240, 254, 0.92);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 1px 8px rgba(0, 47, 167, 0.06);
}

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

.navbar-brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.navbar-brand span {
  background: var(--gradient-purple);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-links {
  display: flex;
  gap: var(--space-sm);
  list-style: none;
}

.navbar-links a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.navbar-links a:hover,
.navbar-links a.active {
  color: var(--accent-purple);
  background: rgba(0, 47, 167, 0.08);
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--space-xs);
}

/* 灯箱 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  transform: scale(0.9);
  transition: transform 0.3s;
  will-change: transform;
}

.lightbox.active .lightbox-img {
  transform: scale(1);
}

.lightbox-close,
.lightbox-nav {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 1.5rem;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
}

.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

.lightbox-caption {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.6);
  padding: 8px 20px;
  border-radius: var(--radius-full);
}

/* 弹窗 */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: #fff;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s;
  will-change: transform;
  box-shadow: 0 8px 40px rgba(0, 47, 167, 0.1);
}

.modal-overlay.active .modal-content {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0, 47, 167, 0.08);
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.modal-close:hover {
  background: rgba(0, 47, 167, 0.15);
  color: var(--text-primary);
}

/* 加载动画 */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}