/**
 * 全局样式
 * 包含基础样式、组件样式和动画效果
 */

/* 基础样式 */
html {
  scroll-behavior: smooth;
}
body {
  background-color: #f8f9fa;
}



#nav-logo {
  color: #F7FAFC;
  font-size: 1.3rem;
  font-weight: 600;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  margin: 0; 
  margin-left: 0.9rem;         /* 去默认外边距，防止错位 */
  line-height: 1;     /* 让高度更紧凑 */
}

/* ===== 音乐播放器 ===== */
#music-player {
  position: fixed;
  bottom: 1.25rem; /* tailwind: bottom-5 */
  right: 1.25rem; /* tailwind: right-5  */
  z-index: 50;
  width: 3.5rem; /* 14 */
  height: 3.5rem; /* 14 */
  border-radius: 9999px; /* full */
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: background 0.3s ease;
}

/* 背景色（动态写入） */
#music-player {
  background: var(--mp-bg);
}
#music-player:hover {
  background: var(--mp-bg-hover);
}

/* 播放/暂停按钮 */
#music-toggle {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: none;
  outline: none;
  cursor: pointer;
  background: var(--mp-play); /* 默认播放键颜色 */
  transition: background 0.3s ease;
}
#music-toggle.playing {
  background: var(--mp-pause); /* 暂停键颜色 */
}

/* 视频容器样式 */
.video-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
}
.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.5s ease-in-out;
}
.video-info {
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

/* style.css */
#video-tabs .video-filter.active {
  background-color: #ff6b00; /* 你定义的 secondary 颜色 */
  color: white;
}

/* 导航栏滚动效果 */
.navbar {
  transition: background-color 0.3s ease, padding 0.3s ease;
}

/* 加载动画 */
.loader {
  border-top-color: theme("colors.secondary");
  animation: spinner 0.6s linear infinite;
}
@keyframes spinner {
  0% {
    transform: rotate(deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* 轮播控制按钮 */
.carousel-control {
  opacity: 0.7;
  transition: all 0.3s ease;
}
.carousel-control:hover {
  opacity: 1;
  transform: scale(1.1);
}

/*活动区域*/
.event-slide {
  opacity: 0;
  transition: opacity 0.6s ease;
}
.event-slide.active {
  opacity: 1;
}

/* 团队轮播外壳 */
#team-carousel {
  height: 100vh;
  width: 100vw;
  max-width: 100%;
  position: relative;
  overflow: hidden;

  /* 关键：向外撑 2rem（可调） */
  margin: 0 -2rem;
  left: 2rem;
  right: 2rem;
}

/* 轮播轨道 */
.team-carousel-inner {
  display: flex;
  height: 100%;
  transition: transform 0.7s ease;
}

.team-carousel-inner {
  display: flex;
  width: 100%; /* 确保容器宽度正确 */
}

.team-slide {
  min-width: 100%; /* 关键：每个轮播项占满容器宽度 */
}

/* 单张幻灯片 - 全屏容器 */
.team-slide {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========== 立绘全屏 ========== */
.team-slide .character-detail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.team-slide .character-art {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(
    135deg,
    rgba(154, 103, 211, 0.2) 10%,
    rgba(0, 0, 0, 0.8) 100%
  );
}

.team-slide .character-flip-container {
  width: 100%;
  height: 100%;
  perspective: 1200px;
  cursor: pointer;
}

.team-slide .character-faces {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.team-slide .character-faces img {
  max-height: 90vh;
  max-width: 90vw;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: auto;
  display: block;
}
.character-flip-container {
  perspective: 1200px;
  cursor: pointer;
}
.character-flip-container img {
  transition: transform 0.5s ease;
  backface-visibility: hidden; /* 隐藏背面 */
}
.character-flip-container.flip img {
  transform: rotateY(180deg);
}
/* ===== 特效容器 ===== */
.pixel-explode {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 10;
}
.pixel {
  position: absolute;
  width: var(--size);
  height: var(--size);
  background: var(--bg) no-repeat;
  background-size: var(--bgSize);
  box-shadow: 0 0 8px 2px var(--glow);
  will-change: transform, opacity;
  animation: explode 0.9s cubic-bezier(0.4, 0.6, 0.2, 1) forwards;
}
@keyframes explode {
  0% {
    transform: translate(0, 0) scale(1) rotate(0);
    opacity: 1;
  }
  100% {
    transform: var(--end) scale(0) rotate(var(--rot));
    opacity: 0;
  }
}
.new-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(0.2);
  opacity: 0;
  animation: popIn 0.6s 0.3s cubic-bezier(0.4, 0.6, 0.2, 1) forwards;
}
@keyframes popIn {
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ========== 大卡片信息（左 55%） ========== */
.team-slide .character-info-panel {
  position: absolute;
  left: 1.8;
  top: 35%;
  transform: translateY(-50%);
  width: 800px;
  max-width: 90vw;
  background: rgba(255, 255, 255, 0);
  padding: 0 30px 30px 40px;
  z-index: 2;
}

.team-slide .character-info-panel h1 {
  color: #fff;
  font-size: 4.5rem;
  font-weight: 700;                       /* 更粗更有力 */
  font-family: 'Orbitron', sans-serif;                    
  text-shadow: 0 0 4.5px #000, 0 0 10px #000, 0 0 15px #000;
  margin: 0;

  margin: 0;
  
}

.team-slide .character-title {
  color: #ffffff;
  font-size: 2.3rem;
  margin-bottom: 8px;
  border-radius: 15px;
  text-shadow: 0 0 5px #000, 0 0 10px #000, 0 0 15px #000;
  font-family: "SimSun", "STSong", "Noto Serif SC", serif; /* 宋体 + 后备 */
}

.team-slide .character-tags {
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* 悬停微亮 */
.team-slide .character-tags .tag:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.8));
  cursor: pointer;
}

.team-slide .character-tags .tag {

  color: #fff;
  padding: 6px 16px;
  border-radius: 15px;
  font-size: 1.25rem;
  font-family: 'Orbitron', sans-serif;   /* 同系字体 */
  font-weight: 500;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 2px 8px rgba(0, 114, 255, .25);
  transition: background 0.3s;
}

.team-slide .character-desc {
  color: #fff;
  font-size: 2rem;
  font-family: "Ma Shan Zheng", cursive;
  line-height: 1.6;
  line-height: 1.5;
  width: 70%;
  text-shadow: 0 0 5px #000, 0 0 10px #000, 0 0 15px #000;
  margin: 0;
}
/* ===== 子轮播翻页按钮（中下） ===== */
.sub-carousel-controls {
  position: absolute;
  left: 50%;
  bottom: 7rem; /* 图片中下区域 */
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
  z-index: 10;
}

.sub-carousel-controls button {
  padding: 0.5rem 1.2rem;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
}
.sub-carousel-controls button:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* ===== 圆点（按钮下方） ===== */
.sub-dots {
  position: absolute;
  left: 50%;
  bottom: 6rem; /* 按钮正下方 */
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.sub-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background 0.3s;
}
.sub-dot.active {
  background: #fff;
}

#prev-video,
#next-video {
  z-index: 20; /* 高于遮罩 */
}

/* ========== 底部横向缩略图 ========== */
#team-thumbnails-container {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4rem;
  height: auto;
  min-height: 6rem;
  display: flex;
  align-items: flex-end; /* 底对齐 */
  justify-content: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  padding: 0.5rem 1rem 0.75rem; /* 下多留一点 */
  z-index: 3;
}
/* 缩略图个体 */
.team-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 0.25rem 0.5rem 0.5rem;
  border-radius: 0; /* 取消圆角 */
  overflow: visible; /* 取消裁剪 */
  transition: 0.3s;
}
.team-thumb {
  @apply rounded-lg border border-gray-300 hover:ring-2 hover:ring-secondary;
}

.team-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.team-thumb.active {
  border-color: #ff6d00;
  transform: scale(1.1);
}
.team-thumb:hover {
  border-color: #fff;
}
/*缩略图文字*/
/* 放到 style.css 最底部 */
/* 强制可见、有高度、能换行、有颜色 */
#team-thumbnails-container p {
  display: block !important;
  color: #ffffff !important; /* 荧光黄 */
  background: #000 !important; /* 黑底对比 */
  font-size: 1rem !important; /* 放大到 16 px */
  line-height: 2rem !important; /* 强制 32 px 高 */
  margin-top: 0.5rem !important;
  overflow: visible !important;
}
/* style.css 最底部 */
#team-pagination {
  top: full;     /* 参考轮播底边 */
  margin-top: 3rem; /* 再往下 48px，可调 mt-8 / mt-10 / mt-12 */
}

/* style.css 最底部 */
#team-pagination {
  position: relative;   /* 脱离 absolute 参考系 */
  top: full;            /* 紧跟轮播底边 */
  margin-top: 3rem;     /* 再往下 48px，可调 */
  z-index: 20;
}
/* style.css 最底部 */
#team-pagination {
  top: full;     /* 参考轮播底边 */
  margin-top: mt-10; /* 再往下 48px，可调 mt-8 / mt-10 / mt-12 */
}


/* ========== 移动端 ========== */
@media (max-width: 768px) {
  .team-slide .character-faces img {
    width: 100vw;
    height: 100vh;
    object-fit: cover;        /* 等比放大、裁剪多余 */
    object-position: center;  /* 居中裁剪 */
    max-width: none;
    max-height: none;
  }

  #team-thumbnails-container {
    display: none;
  }

  .team-slide .character-info-panel h1 {
    font-size: 4rem;
  }
  .team-slide .character-title {
    font-size: 2rem;
  }
  .team-slide .character-desc {
    font-size: 1.4rem;
    width: 100%;
  }

  #team-thumbnails-container {
    height: 5rem;
  }

  .team-thumb {
    width: 3rem;
    height: 3rem;
  }
}
/* === 立绘安全整图展示 === */
.character-faces img {
  /* 1. 先锁死最大可视区 */
  max-height: 75vh; /* 纵向不顶头 */
  max-width: 90vw; /* 横向不溢出 */

  /* 2. 让浏览器按“比例”自动缩 */
  width: auto !important;
  height: auto !important;

  /* 3. 保证完整图，不裁剪 */
  object-fit: contain;
}
/* ========== 策略卡（立绘适配） ========== */
.character-art-img-wide {
  object-fit: cover;
}
.character-art-img-tall-cover {
  object-fit: cover;
}
.character-art-img-tall {
  object-fit: contain;
}
