* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #0a0a0a;
  color: #fff;
  font-family: "华文楷体", "STKaiti", "KaiTi", "楷体", serif;
  overflow: hidden;
  height: 100vh;
}

/* 背景视频层 */
#bg-video-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  overflow: hidden;
  background: #000;
}

#bg-video-layer iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  height: 56.25vw;
  min-height: 100vh;
  min-width: 177.78vh;
  border: none;
}

#bg-dim {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.6) 100%);
  z-index: 2;
}

#video-label {
  position: absolute;
  bottom: 18px;
  right: 20px;
  z-index: 3;
  font-size: 11px;
  color: rgba(255,255,255,0.2);
  letter-spacing: 1px;
  pointer-events: none;
  font-family: "华文楷体", "STKaiti", "KaiTi", "楷体", serif;
}

/* 顶部按钮栏 */
.top-bar {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 20;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.top-btn {
  background: #003366;
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  padding: 6px 14px;
  border-radius: 18px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s;
}

.top-btn:hover {
  background: rgba(107,197,138,0.3);
  border-color: #6BC58A;
}

.top-btn.active {
  background: rgba(107,197,138,0.25);
  border-color: #6BC58A;
}

/* 章节导航按钮样式 */
.chapter-nav-btn {
  background: #2e5a3a;
  border-color: #6BC58A;
}

.chapter-nav-btn:hover {
  background: #3e7a4a;
  border-color: #a0e0b0;
}

/* 音量控制 */
.volume-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #003366;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 18px;
  padding: 0 12px;
  height: 32px;
}

.volume-icon {
  font-size: 14px;
  color: #fff;
  opacity: 0.8;
}

.volume-slider {
  width: 80px;
  height: 4px;
  -webkit-appearance: none;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #6BC58A;
  cursor: pointer;
  border: none;
}

.volume-slider::-webkit-slider-thumb:hover {
  background: #a0e0b0;
  transform: scale(1.2);
}

/* 氛围菜单 */
.mood-wrapper {
  position: relative;
  display: inline-block;
}

.mood-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  background: #003366;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 5px;
  min-width: 90px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  z-index: 31;
}

.mood-menu div {
  padding: 5px 14px;
  cursor: pointer;
  color: rgba(255,255,255,0.8);
  font-size: 12px;
  border-radius: 8px;
  transition: all 0.2s;
  font-family: inherit;
}

.mood-menu div:hover {
  background: rgba(107,197,138,0.25);
  color: #fff;
}

/* 音乐选择下拉菜单 */
.music-select-wrapper {
  position: relative;
  display: inline-block;
}

.music-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  background: #003366;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 5px;
  min-width: 130px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  z-index: 31;
}

.music-menu div {
  padding: 6px 14px;
  cursor: pointer;
  color: rgba(255,255,255,0.8);
  font-size: 12px;
  border-radius: 8px;
  transition: all 0.2s;
  font-family: inherit;
  white-space: nowrap;
}

.music-menu div:hover {
  background: rgba(107,197,138,0.25);
  color: #fff;
}

/* 章节标签 */
.chapter-label {
  position: fixed;
  top: 20px;
  right: 30px;
  z-index: 20;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 2px;
}

/* 轮播区域 */
.carousel-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: 10;
}

.carousel-track {
  display: flex;
  height: 100vh;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.player-wrapper {
  position: relative;
  min-width: 100%;
  height: 100vh;
  overflow: hidden;
}

/* 文字覆盖层 */
.overlay-text {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  max-width: none;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  padding: 60px 40px 30px;
  text-align: center;
}

.overlay-text h2 {
  font-size: 4em;
  margin-bottom: 10px;
  color: #6BC58A;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
  letter-spacing: 4px;
  font-family: "华文楷体", "STKaiti", "KaiTi", "楷体", serif;
  text-align: center;
}

.scroll-text {
  max-height: 65vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(107,197,138,0.3) transparent;
  text-align: center;
}

.scroll-text::-webkit-scrollbar {
  width: 4px;
}

.scroll-text::-webkit-scrollbar-thumb {
  background: rgba(107,197,138,0.3);
  border-radius: 2px;
}

.scroll-text p {
  font-size: 3.2em;
  line-height: 1.8;
  margin-bottom: 12px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8), 0 0 12px rgba(0,168,107,0.15);
  font-family: "华文楷体", "STKaiti", "KaiTi", "楷体", serif;
  color: #00A86B;
}

.scroll-text .cursor {
  display: inline-block;
  animation: curBlink 0.6s step-end infinite;
  color: #6BC58A;
  margin-left: 2px;
  font-size: 0.9em;
  opacity: 0.6;
}

@keyframes curBlink {
  50% { opacity: 0; }
}

/* 导航箭头 */
.nav-buttons {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  z-index: 10;
  pointer-events: none;
  padding: 0 10px;
}

.prev-btn, .next-btn {
  pointer-events: auto;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  background-size: 40%;
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
  flex-shrink: 0;
  background-color: rgba(0,0,0,0.35);
  transition: all 0.3s;
}

.prev-btn {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></svg>');
}

.next-btn {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>');
}

.prev-btn:hover, .next-btn:hover {
  background-color: rgba(107,197,138,0.25);
  border-color: #6BC58A;
}

/* 底部导航点 */
.dots {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 20;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  cursor: pointer;
  transition: all 0.3s;
  border: 1px solid rgba(255,255,255,0.15);
}

.dot.active {
  background: #6BC58A;
  transform: scale(1.3);
  border-color: #6BC58A;
}

/* 氛围特效画布 */
#m-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 25;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .top-bar {
    top: 12px;
    left: 12px;
    gap: 6px;
  }
  
  .top-btn {
    padding: 4px 10px;
    font-size: 11px;
  }
  
  .chapter-label {
    font-size: 11px;
    top: 12px;
    right: 12px;
  }
  
  .overlay-text {
    bottom: 60px;
    padding: 40px 20px 20px;
    width: 95%;
  }
  
  .overlay-text h2 {
    font-size: 2.6em;
  }
  
  .scroll-text {
    max-height: 55vh;
  }
  
  .scroll-text p {
    font-size: 2.6em;
    line-height: 1.6;
    margin-bottom: 10px;
  }
  
  .nav-buttons {
    padding: 0 5px;
  }
  
  .prev-btn, .next-btn {
    width: 40px;
    height: 40px;
  }
  
  .mood-menu, .music-menu {
    min-width: 80px;
  }
  
  .mood-menu div, .music-menu div {
    padding: 4px 12px;
    font-size: 11px;
  }
  
  .music-menu {
    right: 0;
    left: auto;
  }
  
  .volume-control {
    padding: 0 8px;
    height: 28px;
  }
  
  .volume-slider {
    width: 60px;
  }
  
  .volume-icon {
    font-size: 11px;
  }
}