/* ================= 声音实验页 ================= */

/* 导航色块的颜色规则见 style.css（未选中青绿 / 当前页粉色） */

/* 语言切换：位置已在 style.css 统一固定在右上角 */

/* ---- 布局 ---- */
.sx {
  display: grid;
  grid-template-columns: 52px minmax(360px, 1.05fr) minmax(400px, 1fr) 52px;
  gap: 24px;
  width: 100%;
  padding: 34px clamp(16px, 2.5vw, 48px) 70px;
  align-items: start;
}

/* ---- 左右切换箭头 ---- */
.arrow {
  border: 0;
  background: none;
  color: #111;
  width: 52px;
  height: 80px;
  margin-top: 120px;
  cursor: pointer;
  padding: 0;
  opacity: .85;
  transition: opacity .15s ease, translate .15s ease;
}
.arrow:hover { opacity: 1; }
.arrow-prev:hover { translate: -3px 0; }
.arrow-next:hover { translate: 3px 0; }
.arrow svg { width: 34px; height: 60px; display: block; }

/* ---- 播放器 ---- */
.player { padding-top: 30px; }

.tape-visual {
  display: grid;
  place-items: center;
  height: 340px;   /* 固定高度：换磁带时图片高度不同也不影响下方进度条位置 */
}

.tape-photo {
  display: block;
  width: min(100%, 460px);
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, .22));
}
.tape-photo[hidden] { display: none; }

.tape-big {
  position: static;
  width: min(100%, 460px);
  max-height: 100%;
  animation: none;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, .22));
}

.progress { cursor: pointer; }

.progress .bar {
  height: 4px;
  border-radius: 3px;
  background: #e7e7ea;
  overflow: hidden;
}
.progress .bar i {
  display: block;
  height: 100%;
  width: 0;
  background: #4a4a4e;
  border-radius: 3px;
}

.progress .time {
  margin-top: 6px;
  text-align: right;
  font-size: 12.5px;
  color: #8a8a8e;
  font-variant-numeric: tabular-nums;
}

.meta {
  display: flex;
  align-items: baseline;
  gap: 26px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.meta h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: .5px;
}
.meta p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-soft, #3d3d40);
}

.controls {
  display: flex;
  align-items: center;
  margin-top: 22px;
}

.ctrl {
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  color: #1c1c1e;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background .15s ease;
}
.ctrl:hover { background: #f0f0f2; }
.ctrl svg { width: 100%; height: 100%; display: block; }
.ctrl.is-on { color: #c2477f; }

/* 静音图标切换 */
#btn-mute .wave-off { display: none; }
#btn-mute.is-on .wave-on { display: none; }
#btn-mute.is-on .wave-off { display: block; }

/* 大播放键 */
.play {
  width: 72px;
  height: 72px;
  border: 0;
  border-radius: 50%;
  background: #ececee;
  color: #111;
  cursor: pointer;
  display: grid;
  place-items: center;
  margin-left: auto;
  margin-right: auto;
  transition: scale .15s ease, background .15s ease;
}
.play:hover { scale: 1.06; background: #e2e2e6; }
.play svg { width: 34px; height: 34px; }
.play .ic-pause { display: none; }
.play.is-playing .ic-play { display: none; }
.play.is-playing .ic-pause { display: block; }

/* ---- 调音台 ---- */
.mixer { padding-top: 44px; }

.mixer-title {
  margin: 0 0 26px;
  font-size: 15px;
  color: var(--ink-soft, #3d3d40);
}

.fx { margin-bottom: 30px; }

.fx-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
  min-height: 28px;
}

.fx .num {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1px;
}

.fx-name {
  font-size: 16px;
  font-weight: 700;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .25s ease, transform .25s ease;
}

.fx-desc {
  margin: 10px 0 0 auto;
  max-width: 62%;
  font-size: 12px;
  line-height: 1.8;
  color: #8a8a8e;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height .3s ease, opacity .3s ease, margin .3s ease;
}

.fx.is-open .fx-name { opacity: 1; transform: none; }
.fx.is-open .fx-desc { max-height: 140px; opacity: 1; }
.fx.is-open .fx-ref { max-height: 80px; opacity: 1; }

/* 文献链接：比说明文字小一号，随滑块展开显示 */
.fx-ref {
  margin: 4px 0 0 auto;
  max-width: 62%;
  font-size: 11px;
  line-height: 1.7;
  color: #9a9a9e;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  word-break: break-all;
  transition: max-height .3s ease, opacity .3s ease, margin .3s ease;
}
.fx-ref a {
  color: var(--ac, #4a4a4e);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.fx-ref a:hover { opacity: .75; }

/* 滑块 */
.fx input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 26px;
  margin: 0;
  background: none;
  cursor: pointer;
}

.fx input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--ac) var(--val, 0%), #e5e5e8 var(--val, 0%));
}

.fx input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  margin-top: -11.5px;
  border-radius: 50%;
  background: #fff;
  border: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .22);
}

.fx input[type="range"]::-moz-range-track {
  height: 3px;
  border-radius: 2px;
  background: #e5e5e8;
}
.fx input[type="range"]::-moz-range-progress {
  height: 3px;
  border-radius: 2px;
  background: var(--ac);
}
.fx input[type="range"]::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .22);
}

.mixer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

/* 助听器模式按钮（本版仅占位） */
.ha-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid #e3e3e6;
  background: #fff;
  border-radius: 14px;
  padding: 18px 24px 18px 18px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #1c1c1e;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .06);
}
.ha-btn svg { width: 30px; height: 30px; }
.ha-btn:disabled { cursor: default; }

/* ---- 兼容提示 ---- */
.notice {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 60;
  max-width: min(92vw, 560px);
  background: #1c1c1e;
  color: #fff;
  font-size: 13px;
  line-height: 1.7;
  padding: 12px 20px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
}

/* ---- 响应式 ---- */
@media (max-width: 1080px) {
  .sx {
    grid-template-columns: 1fr;
    padding-top: 20px;
  }
  .arrow { display: none; }
  .player { max-width: 560px; margin: 0 auto; width: 100%; }
  .mixer { max-width: 560px; margin: 30px auto 0; width: 100%; padding-top: 0; }
}

@media (max-width: 560px) {
  .meta h1 { font-size: 24px; }
  .fx-desc, .fx-ref { max-width: 100%; }
  .ha-btn { padding: 14px 18px 14px 14px; }
}
