/* 白噪音 · 专属样式（选择器统一 .g-whitenoise 前缀；场景动画纯 CSS） */

.g-whitenoise { gap: 10px; }

/* ---------------- 场景卡 ---------------- */
.g-whitenoise .wn-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex: none;
}
.g-whitenoise .wn-card {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 58px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  text-align: left;
  color: var(--text);
  touch-action: manipulation;
  transition: border-color 0.16s, transform 0.1s, box-shadow 0.16s;
}
.g-whitenoise .wn-card.scene-rain { background: linear-gradient(140deg, #1c2d48, #223b5a); }
.g-whitenoise .wn-card.scene-waves { background: linear-gradient(140deg, #152c44, #23506a); }
.g-whitenoise .wn-card.scene-forest { background: linear-gradient(140deg, #182b22, #244a35); }
.g-whitenoise .wn-card.scene-fire { background: linear-gradient(140deg, #2c1d18, #4a2a1e); }
.g-whitenoise .wn-card:active { transform: scale(0.98); }
.g-whitenoise .wn-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(121, 184, 255, 0.16), 0 6px 18px -10px var(--accent);
}
.g-whitenoise .wn-card-glyph {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.g-whitenoise .wn-card-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.g-whitenoise .wn-card-name { font-size: 13.5px; font-weight: 700; line-height: 1.2; }
.g-whitenoise .wn-card-desc { font-size: 10px; color: rgba(255, 255, 255, 0.55); line-height: 1.3; }

/* ---------------- 动画视觉区 ---------------- */
.g-whitenoise .wn-visual {
  position: relative;
  flex: 1;
  min-height: 132px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  box-shadow: 0 20px 48px -26px rgba(0, 0, 0, 0.95), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  transition: background 0.3s ease;
}
.g-whitenoise .wn-visual.scene-rain {
  background: radial-gradient(130% 85% at 50% -10%, #2c4a6e 0%, #1a2b43 55%, #101a2a 100%);
}
.g-whitenoise .wn-visual.scene-waves {
  background: linear-gradient(180deg, #15263f 0%, #1d3550 42%, #2b5570 72%, #3a6e88 100%);
}
.g-whitenoise .wn-visual.scene-forest {
  background: linear-gradient(180deg, #101f18 0%, #1b3527 55%, #274b36 100%);
}
.g-whitenoise .wn-visual.scene-fire {
  background: radial-gradient(120% 95% at 50% 105%, #6b3a22 0%, #3a2118 46%, #1b1310 100%);
}
.g-whitenoise .wn-layer { position: absolute; inset: 0; pointer-events: none; }

/* 雨 */
.g-whitenoise .scene-rain .wn-layer-a {
  background-image:
    repeating-linear-gradient(100deg, rgba(170, 215, 255, 0.22) 0 1px, transparent 1px 11px),
    repeating-linear-gradient(78deg, rgba(170, 215, 255, 0.12) 0 1px, transparent 1px 17px);
  animation: wnRain 0.55s linear infinite;
}
.g-whitenoise .scene-rain .wn-layer-b {
  background: radial-gradient(110% 55% at 50% 100%, rgba(121, 184, 255, 0.28), transparent 64%);
}
/* 海浪 */
.g-whitenoise .scene-waves .wn-layer-a {
  background: radial-gradient(130% 70% at 50% 86%, rgba(95, 224, 200, 0.20), transparent 62%);
  animation: wnWave 4.2s ease-in-out infinite alternate;
}
.g-whitenoise .scene-waves .wn-layer-b {
  background-image: repeating-radial-gradient(ellipse 120% 60% at 50% 118%, rgba(255, 255, 255, 0.10) 0 2px, transparent 2px 28px);
  animation: wnWave 3.4s ease-in-out infinite alternate-reverse;
}
/* 森林 */
.g-whitenoise .scene-forest .wn-layer-a {
  background: radial-gradient(75% 65% at 30% 30%, rgba(126, 231, 135, 0.14), transparent 62%);
  animation: wnFog 7s ease-in-out infinite alternate;
}
.g-whitenoise .scene-forest .wn-layer-b {
  background-image:
    radial-gradient(circle, rgba(216, 255, 180, 0.8) 0 1.5px, transparent 2px),
    radial-gradient(circle, rgba(216, 255, 180, 0.45) 0 1px, transparent 1.6px);
  background-size: 92px 92px, 141px 141px;
  animation: wnFirefly 5.5s ease-in-out infinite alternate;
}
/* 炉火 */
.g-whitenoise .scene-fire .wn-layer-a {
  background: radial-gradient(56% 46% at 50% 94%, rgba(255, 186, 96, 0.6), rgba(255, 120, 60, 0.2) 46%, transparent 72%);
  animation: wnFlicker 2.2s ease-in-out infinite alternate;
}
.g-whitenoise .scene-fire .wn-layer-b {
  background-image:
    radial-gradient(circle, rgba(255, 210, 130, 0.9) 0 1.5px, transparent 2px),
    radial-gradient(circle, rgba(255, 150, 80, 0.7) 0 1px, transparent 1.6px);
  background-size: 74px 130px, 116px 170px;
  animation: wnEmber 6.5s linear infinite;
}

.g-whitenoise .wn-visual.paused .wn-layer { animation-play-state: paused; opacity: 0.42; }
.g-whitenoise .wn-visual-top {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.g-whitenoise .wn-scene-name {
  font-size: 12.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.g-whitenoise .wn-state-pill {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(6, 10, 18, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}
.g-whitenoise .wn-mind {
  position: absolute;
  left: 12px;
  bottom: 10px;
  z-index: 2;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.86);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

/* ---------------- 播放 / 控制 ---------------- */
.g-whitenoise .wn-play-row { flex: none; }
.g-whitenoise .wn-play {
  width: 100%;
  min-height: 54px;
  font-size: 16px;
  letter-spacing: 0.03em;
}
.g-whitenoise .wn-play.paused { opacity: 0.92; }
.g-whitenoise .wn-panel {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 9px 12px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.g-whitenoise .wn-row { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.g-whitenoise .wn-row-k { flex: none; width: 52px; font-size: 11px; color: var(--faint); letter-spacing: 0.03em; }
.g-whitenoise .wn-vol-value {
  flex: none;
  width: 40px;
  text-align: right;
  font-size: 11.5px;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}
.g-whitenoise .wn-range {
  flex: 1;
  min-width: 0;
  height: 32px;
  background: transparent;
  accent-color: var(--accent);
  cursor: pointer;
  touch-action: manipulation;
}
.g-whitenoise .wn-range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  opacity: 0.82;
}
.g-whitenoise .wn-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 21px;
  height: 21px;
  margin-top: -7.5px;
  border-radius: 50%;
  background: #f7fbff;
  border: 3px solid var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
.g-whitenoise .wn-range::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}
.g-whitenoise .wn-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f7fbff;
  border: 3px solid var(--accent);
}
.g-whitenoise .wn-timer { display: flex; flex-direction: column; gap: 6px; }
.g-whitenoise .wn-timer-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.g-whitenoise .wn-timer-text {
  font-size: 10.5px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.g-whitenoise .wn-stats {
  flex: none;
  text-align: center;
  font-size: 11.5px;
  color: var(--dim);
}
.g-whitenoise .wn-stats b { color: var(--text); font-weight: 700; }
.g-whitenoise .wn-hint { text-align: center; flex: none; }

/* ---------------- 动画 ---------------- */
@keyframes wnRain {
  from { background-position: 0 0, 0 0; }
  to { background-position: -34px 70px, 24px 46px; }
}
@keyframes wnWave {
  from { transform: translateY(9px) scaleY(1); }
  to { transform: translateY(-7px) scaleY(1.06); }
}
@keyframes wnFog {
  from { transform: translateX(-10px); opacity: 0.75; }
  to { transform: translateX(14px); opacity: 1; }
}
@keyframes wnFirefly {
  0% { opacity: 0.25; background-position: 0 0, 30px 20px; }
  50% { opacity: 0.9; }
  100% { opacity: 0.35; background-position: 22px -16px, -24px 26px; }
}
@keyframes wnFlicker {
  0% { opacity: 0.82; transform: scale(1); }
  45% { opacity: 1; transform: scale(1.05); }
  100% { opacity: 0.78; transform: scale(0.99); }
}
@keyframes wnEmber {
  from { background-position: 0 130px, 0 170px; }
  to { background-position: 0 -130px, 0 -170px; }
}

/* ---------------- 小屏 ---------------- */
@media (max-width: 359px) {
  .g-whitenoise .wn-card { min-height: 54px; padding: 7px 8px; }
  .g-whitenoise .wn-card-name { font-size: 13px; }
  .g-whitenoise .wn-row-k { width: 46px; }
}


/* ---------------- 小高度屏幕（如 360x640）：保证一屏放下 ---------------- */
@media (max-height: 720px) {
  .g-whitenoise { gap: 8px; }
  .g-whitenoise .wn-hint { display: none; }
  .g-whitenoise .wn-card { min-height: 50px; padding: 6px 9px; }
  .g-whitenoise .wn-visual { min-height: 108px; }
  .g-whitenoise .wn-play { min-height: 48px; }
  .g-whitenoise .wn-panel { padding: 7px 11px; gap: 5px; }
  .g-whitenoise .wn-row { min-height: 36px; }
}
