﻿/* ========================================
   毕业留念网页 - 机械专业
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  color: #fff;
  font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
  -webkit-user-select: none;
  user-select: none;
}

body {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.scroll-container {
  scroll-snap-type: y mandatory;
  overflow-y: hidden;
  height: 100vh;
  width: 100vw;
  background: #000;
  position: relative;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: none;
}

.full-screen {
  width: 100%;
  height: 100vh;
  scroll-snap-align: start;
  scroll-stop: stop;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: #000;
}

/* ========== 封面区域 ========== */
#coverSection {
  cursor: pointer;
  flex-direction: column;
}

#coverImage {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-hint {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 1.3rem;
  background: rgba(0, 0, 0, 0.6);
  padding: 10px 24px;
  border-radius: 25px;
  letter-spacing: 3px;
  backdrop-filter: blur(5px);
  animation: hintPulse 2s ease-in-out infinite;
  white-space: nowrap;
}

@keyframes hintPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* ========== 白色闪屏 ========== */
#flashOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

#flashOverlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ========== 图片展示区域 ========== */
.image-screen {
  background: #111;
  flex-direction: column;
  gap: 20px;
}

.img-caption {
  font-family: 'STZhongsong', '华文中宋', '宋体', serif;
  font-size: 2.2rem;
  font-weight: 300;
  letter-spacing: 5px;
  color: #fff;
  opacity: 0;
  transition: opacity 0.8s ease;
  z-index: 2;
  text-align: center;
  padding: 10px 20px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.image-screen img {
  width: 100%;
  height: calc(100% - 70px);
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.8s ease;
  filter: brightness(0.95);
}

/* ========== 向下箭头 ========== */
.scroll-arrow {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  animation: arrowFloat 2s ease-in-out infinite;
  z-index: 5;
}

.scroll-arrow.show {
  opacity: 0.9;
}

.scroll-arrow::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  width: 3px;
  height: 12px;
  background: #fff;
  transform: translateX(-50%);
  border-radius: 2px;
}

.scroll-arrow::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 8px;
  width: 10px;
  height: 10px;
  border-right: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: translateX(-50%) rotate(45deg);
}

@keyframes arrowFloat {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 12px); }
}

/* ========== 视频区域 ========== */
.video-section {
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  scroll-snap-align: start;
}

.video-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.video-title {
  position: absolute;
  bottom: 25px;
  left: 25px;
  font-size: 1.1rem;
  background: rgba(0, 0, 0, 0.7);
  padding: 8px 18px;
  border-radius: 20px;
  backdrop-filter: blur(5px);
  letter-spacing: 2px;
}

/* ========== 结束图片区域 ========== */
.end-screen {
  background: #000;
}

.end-screen img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ========== 加载提示 ========== */
#loadingIndicator {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px;
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  backdrop-filter: blur(5px);
  letter-spacing: 1px;
}

#loadingIndicator.visible {
  opacity: 1;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .img-caption {
    font-size: 1.6rem;
    letter-spacing: 3px;
  }
  .cover-hint {
    font-size: 1rem;
    bottom: 40px;
    padding: 8px 18px;
  }
  .video-title {
    font-size: 0.9rem;
    bottom: 15px;
    left: 15px;
  }
}

/* ========== 预加载器 ========== */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}

#preloader.fade-out {
  opacity: 0;
}

.preloader-content {
  text-align: center;
}

.preloader-percent {
  font-size: 3rem;
  font-weight: 200;
  letter-spacing: 5px;
  color: #fff;
  margin-bottom: 30px;
  font-family: 'Microsoft YaHei', sans-serif;
}

.preloader-bar {
  width: 200px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 1px;
  overflow: hidden;
}

.preloader-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #fff 0%, #aaa 100%);
  transition: width 0.3s ease;
  border-radius: 1px;
}

