/* ================= 全局基础 ================= */
* { margin:0; padding:0; box-sizing:border-box; }

/* ✅ 去除点击按钮时的蓝色焦点框 */
button:focus,
button:active,
a:focus,
a:active,
.member-item:focus,
.member-item:active,
.group-tab:focus,
.group-tab:active {
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
}

/* 为键盘导航用户保留可访问性（可选） */
button:focus-visible {
  outline: 2px solid rgba(255,255,255,0.5);
  outline-offset: 2px;
}

html,body{height:100%;}
body {
  color:#fff;
  font-family:"PingFang SC","Microsoft YaHei",sans-serif;
  min-height:100vh;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
  padding-bottom: 94px; /* 底栏留白 */
  background-color: #000;
}

/* ================= 背景层（通用 + 性能优化） ================= */
.bg-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  /* 性能优化：使用 will-change 提示浏览器优化 */
  will-change: opacity;
  /* 硬件加速 */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  z-index: -2;
  /* 初始隐藏，加载后淡入 */
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

.bg-image.loaded {
  opacity: 1;
}

/* ====== 背景半透明（更清晰版） ====== */
.bg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);  /* 0.45 → 0.18，更干净更透亮 */
  backdrop-filter: blur(2px);       /* 轻磨砂，显质感 */
  -webkit-backdrop-filter: blur(2px);
  z-index: -1;
}

@keyframes bgFade { from{opacity:0.0} to{opacity:1} }

/* per-page background by body class - 使用渐进式加载 */
body.page-home     .bg-image { background-image: url('./images/home.jpg'); }
body.page-jidanhuang .bg-image { background-image: url('./images/guo.jpg'); }
body.page-members    .bg-image { background-image: url('./images/members.jpg'); }
body.page-show       .bg-image { background-image: url('./images/show.jpg'); }

/* 移动端背景优化：使用 scroll 而不是 fixed，提升性能 */
@media (max-width: 768px) {
  .bg-image {
    background-attachment: scroll;
    /* 移动端减少模糊，提升性能 */
  }
  
  .bg-overlay {
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
  }
}

/* ================= header ================= */
header{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 20px; position:sticky; top:0; z-index:20;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  backdrop-filter: blur(8px);
}
header h1{ font-size:18px; font-weight:600; color:#fff; text-shadow:0 1px 2px rgba(0,0,0,0.35); }

/* ================= 音乐按钮（旋转样式） ================= */
#music-btn {
  background: rgba(255,255,255,0.18); border: none; width:40px; height:40px; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center; cursor:pointer;
  backdrop-filter: blur(8px); transition: transform .25s ease, background .25s ease;
  font-size:18px; color:#fff;
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
#music-btn:hover { transform: scale(1.06); background: rgba(255,255,255,0.28); }
#music-btn:active { transform: scale(0.95); }
#music-btn.playing { animation: spin 4.5s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ================= 内容浮窗（毛玻璃卡片） ================= */
/* content-card 为浮窗容器：厚磨砂、淡描边、圆角16px（R2） */
.content-card{
  max-width: 920px;
  margin: 8vh auto 24px;
  padding: 32px 36px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.04));
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  border-radius: 16px; /* R2 */
  border: 1px solid rgba(255,255,255,0.12); /* 淡描边 */
  box-shadow: 0 10px 30px rgba(0,0,0,0.36);
  color: #fff;
  opacity: 0;
  transform: translateY(40vh) scale(.995); /* C：居中浮现起点 */
  animation: cardFloatIn 900ms cubic-bezier(.22,.9,.35,1) forwards;

    /* ✅ 新增这一行，让底部不会被遮 */
  padding-bottom: calc(32px + env(safe-area-inset-bottom));
  padding-bottom: 70px !important;

}

/* 轻柔浮现：从居中向上落位（C） */
@keyframes cardFloatIn {
  0% { opacity:0; transform: translateY(40vh) scale(.995); }
  60% { opacity:1; transform: translateY(6vh) scale(1.005); }
  100% { opacity:1; transform: translateY(0) scale(1); }
}

/* 文本内容排版 */
.content-card h1{ font-size:1.6rem; margin-bottom:12px; line-height:1.2; color:#fff; }
.content-card p{ color: rgba(255,255,255,0.92); line-height:1.8; margin-bottom: 12px; font-size:1rem; }

/* ================= 视频区域 ================= */
.video-section{ max-width:920px; margin: 18px auto 88px; border-radius:14px; overflow:hidden; }
.video-section video{ width:100%; height:auto; display:block; border-radius:14px; }

/* ================= 底部导航（奶油月光 · L2+R2+W2+M1） ================= */
/* container */
.nav-footer{
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom) + 12px);
  left: 50%;
  transform: translateX(-50%);
  width: min(920px, 94%);
  max-width: 920px;
  height: 64px; /* M */
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-radius: 18px; /* R2-ish */
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.06));
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 12px 36px rgba(2,6,23,0.45);
  z-index: 9999;
  transition: transform .3s ease, opacity .3s ease;
  visibility: visible !important;
  opacity: 1 !important;
}

/* 单项 */
.nav-item{
  flex:1;
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:center;
  padding:8px 6px;
  text-decoration:none;
  color: rgba(255,255,255,0.92);
  font-size:14px;
  font-weight:500;
  border-radius: 12px;
  transition: background .28s ease, transform .22s ease, box-shadow .22s ease;
  position: relative;
  overflow: visible;
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* icon/text 并排（A） */
.nav-icon{ font-size:18px; display:inline-block; transform: translateY(-1px); transition: transform .28s ease, filter .28s ease; }
.nav-text{ font-size:13px; color: rgba(255,255,255,0.9); }

/* 悬停：轻浮 + 轻奶油光（F1） */
.nav-item:hover{
  transform: translateY(-4px);
  background: rgba(255,255,255,0.04);
  box-shadow: 0 8px 22px rgba(255,255,255,0.03);
}

/* 激活态：轻亮 + 底部光条（BB 的小光条） + D3 光感 */
.nav-item.active{
  transform: translateY(-4px);
  color: #ffffff;
  font-weight:600;
  background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.06));
  box-shadow: 0 14px 30px rgba(12,20,40,0.28);
}
.nav-item.active::after{
  content:"";
  position:absolute;
  bottom:-6px;
  left:50%;
  transform:translateX(-50%);
  width:36px; height:4px; border-radius:4px;
  background: linear-gradient(90deg, rgba(255,255,255,0.95), rgba(255,255,255,0.75));
  filter: blur(.2px);
}

/* 悬停时图标轻微亮起 */
.nav-item:hover .nav-icon, .nav-item.active .nav-icon{
  filter: brightness(1.18) saturate(1.05);
  transform: translateY(-3px) scale(1.06);
}

/* 点击回弹感 */
.nav-item:active{
  transform: translateY(-1px) scale(0.985);
}

/* 小屏优化 */
@media (max-width:560px){
  .content-card{ 
    margin:6vh 16px 18px; 
    padding: 22px; 
    border-radius:14px; 
  }
  .nav-footer{ 
    height:60px; 
    padding:6px 10px; 
    border-radius:14px;
    bottom: env(safe-area-inset-bottom, 0px) !important;
    max-height: 60px;
  }
  .nav-icon{ font-size:16px; }
  .nav-text{ font-size:12px; }
  .video-section{ margin: 14px 16px 84px; }
  
  body {
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px) + 10px) !important;
  }
}

/* ================ 轻微页面内元素动画（可按需扩展） ================ */
/* card 内部段落的轻微延时淡入 */
.content-card p{ opacity:0; transform: translateY(6px); animation: textFade .9s ease forwards; animation-delay:.45s; }
.content-card h1{ opacity:0; transform: translateY(6px); animation: titleFade .85s ease forwards; animation-delay:.25s; }
@keyframes textFade { to { opacity:1; transform:translateY(0);} }
@keyframes titleFade { to { opacity:1; transform:translateY(0);} }

/* ================= accessibility 小优化 ================= */
.nav-item[aria-current="page"]{ outline: none; }


/* ====== 拍立得相册 (INS 奶油风) ====== */
.polaroid-gallery {
  margin-top: 30px;
  text-align: center;
}

.polaroid-gallery h3 {
  font-size: 1.2rem;
  margin-bottom: 18px;
  color: #fffde9;
}

.polaroid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 18px;
  justify-items: center;
  padding-bottom: 100px;
}

/* ====== 升级版：更自然的拍立得 (层叠+风感) ====== */
.polaroid {
  background: #fff;
  border-radius: 12px;
  padding: 10px 10px 22px;
  width: 100%;
  max-width: 160px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  position: relative;
  transform-origin: center 80%;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

/* 让每张“自然倾斜” */
.polaroid:nth-child(1) { transform: rotate(-3deg); }
.polaroid:nth-child(2) { transform: rotate(2.5deg); }
.polaroid:nth-child(3) { transform: rotate(-1.5deg); }
.polaroid:nth-child(4) { transform: rotate(4deg); }
.polaroid:nth-child(5) { transform: rotate(-2.2deg); }
.polaroid:nth-child(6) { transform: rotate(3deg); }
.polaroid:nth-child(7) { transform: rotate(2.5deg); }
.polaroid:nth-child(8) { transform: rotate(-3deg); }
.polaroid:nth-child(9) { transform: rotate(-1.6deg); }
.polaroid:nth-child(10) { transform: rotate(4deg); }
.polaroid:nth-child(11) { transform: rotate(-2.1deg); }
.polaroid:nth-child(12) { transform: rotate(3deg); }
.polaroid:nth-child(13) { transform: rotate(-3deg); }
.polaroid:nth-child(14) { transform: rotate(2.5deg); }
.polaroid:nth-child(15) { transform: rotate(-1.5deg); }
.polaroid:nth-child(16) { transform: rotate(4deg); }
.polaroid:nth-child(17) { transform: rotate(-2.2deg); }
.polaroid:nth-child(18) { transform: rotate(3deg); }
.polaroid:nth-child(19) { transform: rotate(2.4deg); }
.polaroid:nth-child(20) { transform: rotate(-3.1deg); }
.polaroid:nth-child(21) { transform: rotate(-1.7deg); }
.polaroid:nth-child(22) { transform: rotate(4deg); }
.polaroid:nth-child(23) { transform: rotate(-2.3deg); }
.polaroid:nth-child(24) { transform: rotate(3deg); }
.polaroid:nth-child(25) { transform: rotate(2.6deg); }
.polaroid:nth-child(26) { transform: rotate(-3deg); }
.polaroid:nth-child(27) { transform: rotate(-1.6deg); }
.polaroid:nth-child(28) { transform: rotate(4deg); }
.polaroid:nth-child(29) { transform: rotate(-2.1deg); }
.polaroid:nth-child(30) { transform: rotate(3deg); }
.polaroid:nth-child(31) { transform: rotate(-3deg); }
.polaroid:nth-child(32) { transform: rotate(2.4deg); }
.polaroid:nth-child(33) { transform: rotate(4deg); }
.polaroid:nth-child(34) { transform: rotate(-2deg); }
.polaroid:nth-child(35) { transform: rotate(-2.1deg); }
.polaroid:nth-child(36) { transform: rotate(3deg); }

/* 悬停时像被轻轻扶正、升起来 */
.polaroid:hover {
  transform: rotate(0deg) scale(1.07);
  box-shadow: 0 12px 28px rgba(0,0,0,0.32);
  z-index: 2; /* 保证 hover 的那张盖在其他上面 */
}

.polaroid img {
  width: 100%;
  border-radius: 8px;
  display: block;
  object-fit: cover;
  aspect-ratio: 3 / 4;
}

.polaroid .caption {
  display: block;
  margin-top: 8px;
  font-size: 0.8rem;
  color: #333;
}

/* 点击放大 - 遮罩层 */
.img-viewer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.82);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  visibility: hidden;
  opacity: 0;
  transition: 0.3s;
  z-index: 999;
}
.img-viewer.show {
  visibility: visible;
  opacity: 1;
}
.img-viewer img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
}





/* ====== members tabs & modal (磨砂主题板) ====== */
/* ======= 分组切换按钮 ======= */
.group-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.group-tab {
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  border: none;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s ease;
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.group-tab:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-1px);
}

.group-tab:active {
  transform: scale(0.98);
}

.group-tab.active {
  background: rgba(255,255,255,0.35);
  font-weight: 600;
}

/* ======= 磨砂展示区 ======= */
.group-content {
  width: 100%;
  padding: 1.2rem 1.4rem;
  border-radius: 20px;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ======= panels 显示切换 ======= */
.group-panel {
  display: none;
}

.group-panel.show {
  display: block;
  animation: fadeIn 0.35s ease both;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ======= panel 标题 ======= */
.panel-title {
  font-size: 1rem;
  margin-bottom: 1rem;
  font-weight: 600;
  padding-left: 0.2rem;
}

/* ======= 成员竖向列表 ======= */
.member-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ======= 单个成员 ======= */
.member-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.75rem 0.9rem;
  border-radius: 16px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.25s ease;
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.member-item:hover {
  background: rgba(255,255,255,0.28);
  transform: translateX(2px);
}

.member-item:active {
  transform: scale(0.98);
  background: rgba(255,255,255,0.32);
}

/* ======= 头像样式 ======= */
.member-item .avatar {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 12px;
}

/* ======= 文本区域 ======= */
.member-item .info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.member-item .info .name {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.member-item .info .brief {
  font-size: 0.82rem;
  opacity: 0.85;
  line-height: 1.28;
}





/* ============ Member Modal 基础 ============ */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  z-index: 9999;
  transition: opacity .25s ease;
}

.modal.show {
  display: flex;
  opacity: 1;
}

.modal[aria-hidden="true"] {
  opacity: 0;
  pointer-events: none;
}

/* ===== 弹窗主体 ===== */
.modal-content {
  background: #fff;
  border-radius: 16px;
  max-width: 880px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  gap: 20px;
  padding: 26px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.15);
  transform: scale(0.95);
  transition: transform .25s ease;
}

.modal.show .modal-content {
  transform: scale(1);
}

/* ===== 关闭按钮 ===== */
.modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 26px;
  cursor: pointer;
  background: none;
  border: none;
  color: #666;
  transition: color .2s, transform .2s;
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.modal-close:hover {
  color: #000;
  transform: scale(1.1);
}
.modal-close:active {
  transform: scale(0.95);
}

/* ===== 左侧图片区 ===== */
.modal-left {
  flex: 0 0 300px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-main-img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: 12px;
}

.modal-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.modal-thumbs img {
  width: 66px;
  height: 66px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  opacity: .6;
  transition: opacity .15s, transform .15s;
}
.modal-thumbs img.active {
  opacity: 1;
  transform: scale(1.05);
}

/* ===== 右侧资料部分 ===== */
.modal-right {
  flex: 1;
  overflow-y: auto;
  padding-right: 10px;
}

.modal-name {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
}

.modal-role {
  font-size: 16px;
  color: #666;
  margin-bottom: 12px;
}

.modal-line {
  font-size: 15px;
  margin: 6px 0;
  line-height: 1.6;
  color: #444;
}
.modal-line strong {
  font-weight: 600;
  margin-right: 6px;
  color: #222;
}

.modal-bio {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.7;
  color: #333;
}

/* ============ 移动端适配 ============ */
@media (max-width: 600px) {
  .modal-content {
    flex-direction: column;
    max-width: 92%;
    width: 92%;
    padding: 20px;
  }
  .modal-left {
    flex-basis: auto;
  }
  .modal-main-img {
    height: 260px;
  }
  .modal-thumbs {
    justify-content: flex-start;
  }
  
  /* 移动端导航栏优化 */
  .nav-footer {
    height: 60px;
    padding: 6px 10px;
    border-radius: 14px;
  }
  
  body {
    padding-bottom: 80px !important;
  }
}

/* 更广泛的移动端支持 */
@media (max-width: 768px) {
  .nav-footer {
    bottom: env(safe-area-inset-bottom, 0px) !important;
    max-height: 60px;
  }
  
  body {
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px) + 10px) !important;
  }
  
  /* 移动端视口高度修复 */
  html, body {
    height: 100vh;
    height: 100dvh;
    overflow-x: hidden;
  }
}


