/* ========================================================
   茉莉奶白《摩登郊响》H5 移动端页面样式
   自适应响应式系统：基于 375px 基准视口，采用 rem 弹性缩放
   支持各类移动机型（iPhone SE / 12 / 13 / 14 / 15 / 16 Pro Max 440px）
   主色调：茱萸粉 #E8B5CB / 背景深炭黑
   ======================================================== */

:root {
  --primary-pink: #E8B5CB;
  --dark-bg: #353638;
  --badge-text: #222222;
  --font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* 根字号：以 375px 视口为基准（1rem = 10px），随移动设备屏幕宽度等比缩放，最大适配至 440px（iPhone 16 Pro Max） */
html {
  font-size: calc(clamp(320px, 100vw, 440px) / 37.5);
  scrollbar-width: none;
  -ms-overflow-style: none;
  background-color: #3b3c3d;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  overscroll-behavior-y: none;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: #3b3c3d;
  background-image: url('./imgs/bg.jpg');
  background-size: 100% auto;
  background-repeat: repeat-y;
  background-position: top center;
  font-family: var(--font-family);
  color: var(--primary-pink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
  overscroll-behavior-y: none;
}

::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Page Container: 移动端全宽满屏填充，PC大屏居中展示；内部容器滚动彻底避免 iOS 微信网页露白 */
.page-container {
  width: 100%;
  max-width: 440px;
  height: 100%;
  height: 100dvh;
  margin: 0 auto;
  position: relative;
  background-color: #3b3c3d;
  background-image: url('./imgs/bg.jpg');
  background-size: 100% auto;
  background-repeat: repeat-y;
  background-position: top center;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: none;
  overscroll-behavior-y: none;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.page-container::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

@media screen and (min-width: 450px) {
  .page-container {
    box-shadow: 0 0 35px rgba(0, 0, 0, 0.7);
  }
}

/* ----------------------------------------------------
   1. Header Section: Logo & Theme
   ---------------------------------------------------- */
.page-header {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 4.5rem;
}

.brand-logo {
  width: 12rem;
  height: auto;
  display: block;
}

.theme-title {
  width: 15.0rem;
  height: auto;
  display: block;
  margin-top: 4.6rem;
}

/* ----------------------------------------------------
   2. Turntable Vinyl Section
   ---------------------------------------------------- */
.turntable-section {
  width: 100%;
  margin-top: 1.2rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.turntable-wrapper {
  width: 31.3rem;
  height: 29.7rem;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.turntable-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

/* ----------------------------------------------------
   3. Player Section (Progress Bar & Controls)
   ---------------------------------------------------- */
.player-section {
  width: 100%;
  margin-top: 2.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.artist-credit {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.7rem;
  margin-bottom: 1.4rem;
  color: var(--primary-pink);
  line-height: 1.2;
  white-space: nowrap;
}

.artist-credit-label {
  font-size: 1.15rem;
  font-weight: 500;
  opacity: 0.72;
}

.artist-credit-name {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.02rem;
}

/* Progress Bar */
.progress-bar-container {
  width: 27.8rem;
  height: 1.6rem;
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.progress-track {
  width: 100%;
  height: 0.25rem;
  background-color: rgba(232, 181, 203, 0.35);
  background-image: url('./imgs/progress-track-bg.svg');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  position: relative;
  border-radius: 0.2rem;
  overflow: hidden;
}

.progress-fill {
  width: 0;
  height: 100%;
  background: var(--primary-pink);
  border-radius: 0.2rem;
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 2;
  transition: width 0.1s linear;
}

.progress-buffer {
  width: 0;
  height: 100%;
  background: rgba(232, 181, 203, 0.55);
  border-radius: 0.2rem;
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 1;
  transition: width 0.2s ease;
}

/* Controls Row */
.controls-row {
  width: 28.0rem;
  height: 4.8rem;
  margin-top: 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ctrl-btn {
  background: transparent;
  border: none;
  outline: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.ctrl-btn:active {
  transform: scale(0.92);
}

.btn-loop img {
  width: 1.8rem;
  height: 1.8rem;
  display: block;
}

.ctrl-center-group {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.btn-prev img {
  width: 1.4rem;
  height: 1.5rem;
  display: block;
}

.btn-play img {
  width: 4.8rem;
  height: 4.8rem;
  display: block;
}

.btn-play.is-loading img {
  animation: player-loading 0.85s ease-in-out infinite alternate;
}

@keyframes player-loading {
  from { opacity: 0.45; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

.btn-next img {
  width: 1.4rem;
  height: 1.5rem;
  display: block;
}

.btn-list img {
  width: 2.0rem;
  height: 1.75rem;
  display: block;
}

/* ----------------------------------------------------
   4. Activity Section (Card with Grunge Brush Texture)
   ---------------------------------------------------- */
.activity-section {
  width: 100%;
  margin-top: 8.6rem;
  display: flex;
  justify-content: center;
  position: relative;
}

.activity-card {
  width: 32.5rem;
  height: 37.6rem;
  position: relative;
  background-image: url('./imgs/bg-brush.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

/* Mini Program Button (Floating at Top Right) */
.mini-program-btn {
  position: absolute;
  top: -0.8rem;
  right: -0.5rem;
  width: 7.6rem;
  height: 6.4rem;
  display: block;
  background: transparent;
  border: none;
  outline: none;
  padding: 0;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.15s ease;
  text-decoration: none;
  -webkit-touch-callout: none;
}

.mini-program-btn:active {
  transform: scale(0.94);
}

.mini-program-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Top Strip Header: 参与话题活动 + 耳机 */
.activity-header {
  position: absolute;
  top: 1.0rem;
  left: 3.4rem;
  display: flex;
  align-items: center;
  height: 3.0rem;
}

.activity-header-title {
  color: var(--primary-pink);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.05rem;
  line-height: 1;
}

.headphone-icon {
  width: 4.0rem;
  height: 2.7rem;
  margin-left: 0.6rem;
  margin-top: -0.1rem;
  display: block;
}

/* Activity Card Main Body */
.activity-body {
  position: absolute;
  top: 11.4rem;
  left: 3.2rem;
  right: 2.2rem;
  display: flex;
  flex-direction: column;
}

/* Question Title */
.activity-question {
  color: var(--primary-pink);
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.52;
  letter-spacing: 0.02rem;
}

/* Step Common Styles */
.step-item {
  display: flex;
  flex-direction: column;
}

.step-head {
  display: flex;
  align-items: center;
}

.step-badge {
  background: var(--primary-pink);
  color: var(--badge-text);
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 9999px;
  padding: 0.1rem 0.55rem;
  line-height: 1.25;
  display: inline-block;
  letter-spacing: 0.01rem;
}

.step-title {
  color: var(--primary-pink);
  font-size: 1.18rem;
  font-weight: 600;
  margin-left: 0.5rem;
  line-height: 1.2;
}

/* Step 1: 与上文提问保持 3.15rem 充足间距 */
.step-1 {
  margin-top: 3.15rem;
}

.step-1 .note-icon {
  width: 1.7rem;
  height: 1.8rem;
  margin-left: 1.25rem;
  display: block;
}

.step-1 .step-desc {
  color: var(--primary-pink);
  /* opacity: 1; */
  font-size: 0.9rem;
  margin-top: 0.8rem;
  line-height: 1.3;
}

.step-1 .step-hashtags {
  color: var(--primary-pink);
  width: 92%;
  font-size: 0.9rem;
  margin-top: 0.35rem;
  line-height: 1.7;
  letter-spacing: -0.01rem;
}

.topics-first-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  white-space: nowrap;
}

.topic-last-row {
  display: block;
}

/* 一键复制话题按钮：大号胶囊质感，字号清晰易点击 */
.copy-topic-btn {
  align-self: flex-start;
  margin-top: 1.0rem;
  background: #1c1c1e;
  border: none;
  outline: none;
  color: var(--primary-pink);
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 9999px;
  padding: 0.65rem 1.45rem;
  cursor: pointer;
  box-shadow: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.copy-topic-btn:hover {
  transform: none;
  box-shadow: none;
}

.copy-topic-btn:active {
  opacity: 0.75;
  transform: scale(0.97);
}

/* Step 2: 与上方一键复制话题按钮保持适度间距 */
.step-2 {
  margin-top: 2.15rem;
}

/* Step 3 */
.step-3 {
  margin-top: 0.85rem;
}

.step-3 .underline-target {
  position: relative;
  display: inline-block;
}

.step-3 .text-underline-img {
  position: absolute;
  left: 3.8rem;
  bottom: -0.28rem;
  width: 5.2rem;
  height: 0.22rem;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

/* Bottom Spacer */
.page-footer-space {
  height: 6.0rem;
  padding-bottom: env(safe-area-inset-bottom);
}

/* ----------------------------------------------------
   5. Interactive Toast Notification
   ---------------------------------------------------- */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  background: rgba(30, 30, 32, 0.94);
  color: var(--primary-pink);
  border: 1px solid rgba(232, 181, 203, 0.4);
  padding: 1.0rem 2.2rem;
  border-radius: 2.0rem;
  font-size: 1.3rem;
  font-weight: 600;
  box-shadow: 0 0.8rem 2.5rem rgba(0, 0, 0, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
