/* ========================================
   组件样式 - 克莱因蓝主题
   ======================================== */

/* ===== 首页样式 ===== */
.home-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 0;
  position: relative;
  overflow: hidden;
}

/* 装饰元素 */
.home-decoration {
  position: absolute;
  pointer-events: none;
  opacity: 0.06;
}

.home-deco-top {
  top: -50px;
  left: 10%;
  width: 200px;
  height: 200px;
  border: 2px solid var(--accent-purple);
  transform: rotate(45deg);
}

.home-deco-bottom {
  bottom: -60px;
  right: 5%;
  width: 160px;
  height: 160px;
  border: 2px solid var(--accent-purple);
  transform: rotate(-45deg);
}

.home-deco-left {
  top: 30%;
  left: -40px;
  width: 120px;
  height: 120px;
  background: var(--accent-purple);
  border-radius: 50%;
}

.home-deco-right {
  top: 60%;
  right: -30px;
  width: 80px;
  height: 80px;
  border: 3px solid var(--accent-purple);
  border-radius: 50%;
}

.home-hero-content {
  z-index: 1;
  position: relative;
}

.home-badge {
  font-family: var(--font-en);
  font-size: 0.9rem;
  color: var(--accent-purple);
  letter-spacing: 0.3em;
  margin-bottom: 12px;
  padding: 6px 16px;
  border: 1px solid var(--accent-purple);
  border-radius: 20px;
  display: inline-block;
}

#hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: var(--text-primary);
  margin: 0 0 8px 0;
  display: block;
}

.home-subtitle {
  font-family: var(--font-en);
  font-size: 1.4rem;
  color: var(--text-secondary);
  font-weight: 300;
  letter-spacing: 0.15em;
  margin: 0 0 24px 0;
}

.home-slogan {
  font-size: 1.1rem;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  font-style: italic;
  display: block;
}

/* 统计数据 */
.home-stats {
  display: flex;
  align-items: center;
  gap: 32px;
  margin: 40px 0;
  padding: 24px 40px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  border: 1px solid var(--glass-border);
}

.home-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home-stat-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-purple);
  line-height: 1;
}

.home-stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.home-stat-divider {
  width: 1px;
  height: 40px;
  background: var(--glass-border);
}

.home-scroll-hint {
  position: absolute;
  bottom: 40px;
  opacity: 0.5;
  animation: float 2s ease-in-out infinite;
}

.home-scroll-hint p {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  letter-spacing: 0.1em;
}

.home-scroll-hint p + p {
  font-size: 1.2rem;
  margin-top: 4px;
}

/* 班级亮点 */
.home-features {
  padding: 80px 24px;
  background: rgba(0, 47, 167, 0.02);
}

.home-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.home-feature-card {
  background: #fff;
  padding: 32px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  text-align: center;
  transition: transform 0.25s, box-shadow 0.25s;
}

.home-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0, 47, 167, 0.08);
}

.home-feature-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.home-feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.home-feature-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* 导航卡片区域 */
.home-nav-section {
  padding: 60px 24px 80px;
  max-width: var(--container-max);
  margin: 0 auto;
}

.home-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.home-nav-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  box-shadow: 0 1px 8px rgba(0, 47, 167, 0.04);
  overflow: hidden;
}

.home-nav-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-purple);
  box-shadow: 0 8px 28px rgba(0, 47, 167, 0.12);
}

.home-nav-card:hover .home-nav-arrow {
  transform: translateX(4px);
  opacity: 1;
}

.home-nav-icon {
  font-size: 2rem;
  margin-bottom: 14px;
}

.home-nav-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.home-nav-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.home-nav-arrow {
  position: absolute;
  bottom: 20px;
  right: 24px;
  font-size: 1.1rem;
  color: var(--accent-purple);
  opacity: 0.5;
  transition: transform 0.25s, opacity 0.25s;
}

/* 毕业寄语 */
.home-quotes {
  padding: 80px 24px;
  background: rgba(0, 47, 167, 0.04);
}

.home-quote-slider {
  max-width: 700px;
  margin: 40px auto 0;
  text-align: center;
}

.home-quote-item {
  animation: fadeIn 1s ease-out;
}

.home-quote-item p {
  font-size: 1.3rem;
  color: var(--text-primary);
  line-height: 1.8;
  font-style: italic;
  margin: 0 0 16px 0;
  font-family: 'KaiTi', 'STKaiti', '楷体', serif;
}

.home-quote-item span {
  font-size: 0.9rem;
  color: var(--text-tertiary);
}

.home-quote-item {
  transition: opacity 0.4s ease;
}

/* 卡片 */
.glass-card {
  background: #fff;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: transform 0.25s, box-shadow 0.25s;
  box-shadow: 0 1px 8px rgba(0, 47, 167, 0.04);
  will-change: transform;
  content-visibility: auto;
  contain-intrinsic-size: auto 320px;
}

.glass-card:hover {
  border-color: var(--glass-border-hover);
  box-shadow: 0 4px 20px rgba(0, 47, 167, 0.1);
  transform: translateY(-2px);
}

/* 按钮 */
.glass-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 28px;
  background: #fff;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.glass-btn:hover {
  border-color: var(--accent-purple);
  color: var(--accent-purple);
  transform: translateY(-1px);
}

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

.glass-btn-primary {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
  color: #fff;
}

.glass-btn-primary:hover {
  background: #1a56db;
  border-color: #1a56db;
  color: #fff;
}

/* 搜索框 */
.search-box {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: #fff;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  padding: 10px 20px;
  max-width: 400px;
  margin: 0 auto var(--space-2xl);
  transition: border-color 0.2s;
}

.search-box:focus-within {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(0, 47, 167, 0.08);
}

.search-box input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.search-box input::placeholder {
  color: var(--text-tertiary);
}

.search-icon {
  color: var(--text-tertiary);
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* 标签 */
.tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(0, 47, 167, 0.08);
  border: 1px solid rgba(0, 47, 167, 0.15);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--accent-purple);
  font-weight: 500;
}

/* 教师卡片 */
.teacher-card {
  text-align: center;
  cursor: pointer;
  overflow: hidden;
}

.teacher-photo {
  width: 160px;
  height: 160px;
  border-radius: 12px;
  object-fit: cover;
  margin: 0 auto var(--space-md);
  border: 3px solid rgba(0, 47, 167, 0.12);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.teacher-card:hover .teacher-photo {
  border-color: var(--accent-purple);
  box-shadow: 0 0 20px rgba(0, 47, 167, 0.15);
}

.teacher-name {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.teacher-subject {
  font-size: 0.85rem;
  color: var(--accent-purple);
  margin-bottom: var(--space-md);
}

.teacher-message {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ========================================
   学生卡片
   ======================================== */

/* 卡片容器 */
.students-kraft-board {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 0;
  padding: 20px 12px 48px;
  min-height: 600px;
}

/* 卡片 wrapper */
.student-card-wrap {
  flex-shrink: 0;
  padding: 8px 10px;
}

/* 卡片基底 */
.student-card {
  position: relative;
  width: 280px;
  background: linear-gradient(168deg, #fef9f0 0%, #fdf5e8 20%, #fef8f2 45%, #fcf3e4 70%, #fef9f0 100%);
  border: 1px solid rgba(160, 130, 90, 0.28);
  border-radius: 3px 14px 6px 11px;
  padding: 20px 18px 16px;
  cursor: pointer;
  overflow: visible;
  box-shadow: 0 2px 6px rgba(100, 70, 30, 0.12);
  z-index: 1;
}

.student-card:hover {
  transform: translateY(-4px);
  z-index: 10;
  box-shadow: 0 8px 20px rgba(100, 70, 30, 0.15);
}

/* ===== 夹子装饰 ===== */
.student-card-clip {
  position: absolute;
  top: -15px;
  right: 18px;
  z-index: 5;
  pointer-events: none;
}

.student-card-clip::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 24px;
  background: #9b8b7a;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

.student-card-clip::after {
  content: '';
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 6px;
  background: #5a4a3a;
  border-radius: 0 0 2px 2px;
}

/* ===== 透明胶带 ===== */
.student-card-tape {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%) rotate(-5deg);
  z-index: 5;
  pointer-events: none;
}

.student-card-tape::before {
  content: '';
  display: block;
  width: 50px;
  height: 20px;
  background: rgba(240, 235, 220, 0.45);
  border-radius: 1px;
}

/* 顶部区域：照片 + 姓名 */
.student-card-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}

/* 拍立得照片框 */
.student-photo-wrap {
  flex-shrink: 0;
  background: #fff;
  padding: 5px 5px 16px 5px;
  border-radius: 2px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.student-photo {
  width: 75px;
  height: 75px;
  object-fit: cover;
  border-radius: 1px;
  display: block;
}

.student-name {
  font-family: 'KaiTi', 'STKaiti', '楷体', 'FangSong', '仿宋', serif;
  font-size: 1.3rem;
  font-weight: 400;
  color: #4a3728;
  padding-top: 2px;
  letter-spacing: 0.08em;
  line-height: 1.3;
}

.student-message {
  font-family: 'Songti SC', 'STSong', '宋体', 'Noto Serif SC', 'SimSun', serif;
  font-size: 0.88rem;
  color: #5c5348;
  line-height: 1.8;
  margin-bottom: 10px;
  padding: 0 2px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-style: italic;
}

.student-divider {
  border: none;
  border-top: 1px dashed rgba(180, 160, 130, 0.3);
  margin: 0 0 8px 0;
}

.student-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.student-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.student-tags .tag {
  background: rgba(180, 140, 100, 0.1);
  border: 1px solid rgba(180, 140, 100, 0.2);
  color: #8b7355;
  font-size: 0.68rem;
  padding: 2px 7px;
}

.student-contact {
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 0.68rem;
  color: #b0a090;
  text-align: right;
  line-height: 1.5;
}

.student-contact-label {
  font-size: 0.6rem;
  color: #c5b8a5;
  display: block;
}

/* 角落装饰 */
.student-card-decor {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  opacity: 0.1;
  font-size: 0.65rem;
  color: #c9a96e;
}

.student-card-decor.top-right {
  top: 10px;
  right: 12px;
}

.student-card-decor.bottom-left {
  bottom: 20px;
  left: 8px;
  font-size: 0.55rem;
}

/* 空状态 */
.students-kraft-board .section-subtitle {
  width: 100%;
  text-align: center;
  color: var(--text-secondary);
  padding: 40px 0;
}

/* 时间轴 */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-xl) 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(0, 47, 167, 0.2) 10%,
    rgba(0, 47, 167, 0.4) 50%,
    rgba(0, 47, 167, 0.2) 90%,
    transparent 100%
  );
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-3xl);
  width: 50%;
  padding: 0 var(--space-xl);
}

.timeline-item:nth-child(odd) {
  left: 0;
  padding-right: 60px;
  text-align: right;
}

.timeline-item:nth-child(even) {
  left: 50%;
  padding-left: 60px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  top: 24px;
  width: 14px;
  height: 14px;
  background: var(--accent-purple);
  border-radius: 50%;
  border: 3px solid rgba(0, 47, 167, 0.2);
  z-index: 1;
}

.timeline-item:nth-child(odd)::before {
  right: -7px;
}

.timeline-item:nth-child(even)::before {
  left: -7px;
}

.timeline-date {
  font-family: var(--font-en);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-purple);
  margin-bottom: var(--space-sm);
  letter-spacing: 0.05em;
}

.timeline-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.timeline-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.timeline-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-sm);
}

.timeline-images img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.2s;
}

.timeline-images img:hover {
  transform: scale(1.05);
}

/* 相册瀑布流 */
.gallery-grid {
  columns: 3;
  column-gap: var(--space-md);
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: var(--space-md);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s;
  will-change: transform;
}

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

.gallery-item img {
  width: 100%;
  display: block;
  border-radius: var(--radius-md);
}

.gallery-item-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: white;
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity 0.2s;
}

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

/* 留言便签 */
.message-note {
  position: absolute;
  padding: 20px;
  border-radius: var(--radius-md);
  background: #fff;
  border: 1px solid var(--glass-border);
  max-width: 260px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.4s;
  box-shadow: 0 2px 8px rgba(0, 47, 167, 0.05);
}

.message-note:hover {
  transform: scale(1.05) !important;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 47, 167, 0.12);
  border-color: var(--accent-purple);
}

.message-note-author {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.message-note-content {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.message-note-date {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  margin-top: 10px;
}

/* 留言提交表单 */
.message-form {
  position: relative;
  z-index: 10;
  max-width: 500px;
  margin: 0 auto;
}

.message-form textarea {
  width: 100%;
  height: 100px;
  background: #fff;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: var(--space-md);
  resize: none;
  outline: none;
  transition: border-color 0.2s;
}

.message-form textarea:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(0, 47, 167, 0.06);
}

.message-form textarea::placeholder {
  color: var(--text-tertiary);
}

.message-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-sm);
}

.message-form-author {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  outline: none;
  width: 140px;
}

.message-form-author::placeholder {
  color: var(--text-tertiary);
}

/* 信封弹窗 */
.envelope-modal .modal-content {
  background: linear-gradient(135deg, #f8faff, #eef3ff);
  border: 2px solid rgba(0, 47, 167, 0.15);
  padding: 0;
  overflow: hidden;
}

.envelope-flap {
  background: linear-gradient(135deg, #e8f0fe, #dce8ff);
  padding: var(--space-xl);
  text-align: center;
  border-bottom: 2px dashed rgba(0, 47, 167, 0.2);
}

.envelope-body {
  padding: var(--space-xl);
}

.envelope-body .message {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  white-space: pre-line;
}

.envelope-contact {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(0, 47, 167, 0.1);
  text-align: center;
}

.envelope-contact .phone-hidden {
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

.envelope-contact .phone-reveal {
  color: var(--accent-gold);
  font-size: 0.9rem;
  font-weight: 600;
}

/* 自动播放按钮 */
.auto-play-btn {
  position: fixed;
  bottom: 56px;
  right: 24px;
  z-index: 999;
  background: #fff;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  padding: 10px 18px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0, 47, 167, 0.06);
}

.auto-play-btn:hover {
  border-color: var(--accent-purple);
  color: var(--accent-purple);
}

.auto-play-btn.playing {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
  color: #fff;
}

/* 随机回忆按钮 */
.random-memory-btn {
  position: fixed;
  bottom: 104px;
  right: 24px;
  z-index: 999;
  background: #fff;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  color: var(--text-primary);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 47, 167, 0.06);
}

.random-memory-btn:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  transform: rotate(15deg);
}

/* 随机回忆弹窗 */
.random-memory-modal .modal-content {
  text-align: center;
  max-width: 480px;
}

.random-memory-modal img {
  width: 100%;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

.random-memory-modal .memory-text {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  font-style: italic;
}