/*
 * Final reference pass for the four core PeerMusic secondary pages.
 * This file is deliberately route-scoped and does not alter page copy or hooks.
 */

/* Recharge balance icon: soft circular token with a crisp inner mark. */
.secondary-page-view[data-secondary-view="recharge"]
  > .pm-ref-balance-card
  > .pm-ref-wallet-orb {
  position: relative;
  overflow: hidden;
  width: 60px !important;
  height: 60px !important;
  border: 1px solid rgba(255, 255, 255, 0.96) !important;
  border-radius: 50% !important;
  color: transparent !important;
  font-size: 0 !important;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.72), transparent 31%),
    linear-gradient(145deg, #efadd8 0%, #ad9fe8 53%, #75c8e8 100%) !important;
  box-shadow:
    0 10px 22px rgba(126, 143, 203, 0.2),
    inset 0 2px 7px rgba(255, 255, 255, 0.66) !important;
}

.secondary-page-view[data-secondary-view="recharge"]
  > .pm-ref-balance-card
  > .pm-ref-wallet-orb::before,
.secondary-page-view[data-secondary-view="recharge"]
  > .pm-ref-balance-card
  > .pm-ref-wallet-orb::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border: 2px solid rgba(255, 255, 255, 0.98);
  border-radius: 3px;
  transform: translate(-50%, -50%);
}

.secondary-page-view[data-secondary-view="recharge"]
  > .pm-ref-balance-card
  > .pm-ref-wallet-orb::before {
  width: 19px;
  height: 19px;
}

.secondary-page-view[data-secondary-view="recharge"]
  > .pm-ref-balance-card
  > .pm-ref-wallet-orb::after {
  width: 7px;
  height: 7px;
  border-width: 1.5px;
}

/* Withdraw balance icon: layered rounded USDT tile from the supplied reference. */
.secondary-page-view[data-secondary-view="withdraw"]
  > .pm-ref-withdraw-hero
  > .pm-ref-wallet-stack {
  position: relative;
  overflow: visible;
  width: 82px !important;
  height: 82px !important;
  border: 1px solid rgba(255, 255, 255, 0.96) !important;
  border-radius: 24px !important;
  color: #fff !important;
  font-size: 31px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.68), transparent 32%),
    linear-gradient(145deg, #eea9d7 0%, #aa99e7 51%, #70c7e8 100%) !important;
  box-shadow:
    -8px 8px 0 rgba(230, 205, 240, 0.3),
    -14px 14px 0 rgba(216, 241, 251, 0.34),
    0 14px 28px rgba(126, 143, 203, 0.21),
    inset 0 2px 8px rgba(255, 255, 255, 0.64) !important;
  text-shadow: 0 2px 7px rgba(72, 79, 145, 0.24);
}

/* Music dividend: match the reference's compact, complete one-screen rhythm. */
.secondary-page-layer:has([data-secondary-view="music-dividend"]) .secondary-page-header {
  min-height: 104px !important;
  padding-bottom: 8px !important;
}

.secondary-page-view[data-secondary-view="music-dividend"] {
  gap: 10px !important;
}

.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-hero {
  min-height: 144px !important;
  padding: 19px 20px !important;
  border-radius: 25px !important;
}

.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-hero-copy {
  position: relative;
  z-index: 3;
  width: 54%;
}

.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-hero-copy .secondary-page-badge {
  display: none !important;
}

.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-hero-copy h2 {
  margin-top: 2px !important;
  font-size: 24px !important;
  line-height: 1.28 !important;
}

.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-hero-copy p {
  margin-top: 11px !important;
  font-size: 9px !important;
}

.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-hero-art {
  right: 4px !important;
  bottom: 0 !important;
  width: 54% !important;
  height: 136px !important;
  filter: saturate(0.84) brightness(1.05);
}

.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-note {
  font-size: 88px !important;
  filter: drop-shadow(0 13px 13px rgba(131, 142, 207, 0.16));
}

.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-disc {
  transform: translate(-50%, -50%) scale(0.86);
}

.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-equalizer {
  opacity: 0.66;
  transform: translateX(-50%) scaleY(0.76);
  transform-origin: bottom;
}

.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-metrics {
  gap: 8px !important;
}

.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-metric {
  grid-template-columns: 34px minmax(0, 1fr) !important;
  grid-template-rows: none !important;
  align-items: center !important;
  align-content: center !important;
  gap: 7px !important;
  min-height: 78px !important;
  padding: 9px 8px !important;
  text-align: left !important;
  border-radius: 20px !important;
}

.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-metric-icon {
  grid-column: 1 !important;
  grid-row: 1 !important;
  width: 34px !important;
  height: 34px !important;
}

.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-metric > div {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: end !important;
  min-width: 0;
}

.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-metric > div > span {
  grid-column: 1 / -1 !important;
  grid-row: auto !important;
  min-height: 0 !important;
  font-size: 8px !important;
  line-height: 1.2 !important;
  text-align: left !important;
}

.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-metric > div > strong {
  grid-column: 1 !important;
  grid-row: auto !important;
  margin-top: 5px !important;
  font-size: 21px !important;
  line-height: 1 !important;
}

.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-metric > div > small {
  grid-column: 2 !important;
  grid-row: auto !important;
  align-self: end !important;
  margin: 0 0 1px 3px !important;
  font-size: 6px !important;
  text-align: left !important;
}

.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-chart-card {
  min-height: 162px !important;
  padding: 12px 13px 9px !important;
  border-radius: 23px !important;
}

.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-chart-heading {
  min-height: 19px;
}

.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-chart-heading h2 {
  font-size: 12px !important;
}

.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-chart-heading span {
  font-size: 8px !important;
}

.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-chart {
  height: 118px !important;
  margin-top: 2px !important;
}

.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-chart::before {
  inset: 8px 4px 22px !important;
}

.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-chart-point > i {
  bottom: calc(18px + var(--point-height)) !important;
}

.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-chart-point > b {
  bottom: calc(28px + var(--point-height)) !important;
  font-size: 6px !important;
}

.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-chart-point > small {
  bottom: 1px !important;
  font-size: 6px !important;
}

.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-section-title {
  min-height: 24px !important;
}

.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-section-title h2 {
  font-size: 15px !important;
}

.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-product-list {
  gap: 7px !important;
}

.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-product-card {
  grid-template-columns: 48px minmax(0, 1fr) 27px !important;
  gap: 8px !important;
  min-height: 64px !important;
  padding: 6px 9px !important;
  border-radius: 19px !important;
}

.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-product-art {
  width: 48px !important;
  height: 48px !important;
  border-radius: 16px !important;
}

.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-product-heading > b {
  font-size: 12px !important;
}

.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-product-heading > em,
.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-product-tags small {
  font-size: 6px !important;
}

.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-participation-note {
  min-height: 32px !important;
  padding: 6px 9px !important;
  font-size: 8px !important;
}

.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-participation-note > i {
  width: 21px !important;
  height: 21px !important;
}

.secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-join {
  min-height: 39px !important;
  font-size: 15px !important;
}

/* Lucky draw: translate the 852px reference artwork to the 390px app shell.
 * Keep the existing copy and interaction hooks; only correct the visual rhythm. */
.secondary-page-view[data-secondary-view="lucky-draw"] {
  gap: 12px !important;
}

.secondary-page-view[data-secondary-view="lucky-draw"] .secondary-page-wheel-card {
  min-height: 0 !important;
  padding: 12px !important;
  gap: 8px !important;
}

.secondary-page-view[data-secondary-view="lucky-draw"] .secondary-page-wheel-wrap {
  min-height: 326px !important;
  padding: 8px 0 0 !important;
}

.secondary-page-view[data-secondary-view="lucky-draw"] .secondary-page-wheel {
  background:
    repeating-conic-gradient(
      from -22.5deg,
      rgba(255, 255, 255, 0.86) 0 1deg,
      transparent 1deg 45deg
    ),
    conic-gradient(
      from -22.5deg,
      rgba(255, 229, 242, 0.72),
      rgba(247, 250, 255, 0.9),
      rgba(221, 244, 255, 0.76),
      rgba(255, 238, 247, 0.7),
      rgba(231, 247, 255, 0.82),
      rgba(255, 235, 246, 0.7),
      rgba(222, 244, 255, 0.8),
      rgba(255, 236, 247, 0.74)
    ) !important;
  box-shadow:
    0 20px 42px rgba(118, 145, 185, 0.18),
    0 0 0 1px rgba(235, 180, 215, 0.38),
    inset 0 0 0 3px rgba(255, 255, 255, 0.8),
    inset 0 -12px 22px rgba(139, 162, 210, 0.09) !important;
}

.secondary-page-view[data-secondary-view="lucky-draw"] .secondary-page-wheel > span small {
  filter: drop-shadow(0 5px 6px rgba(137, 115, 181, 0.15));
}

.secondary-page-view[data-secondary-view="lucky-draw"] .pm-lucky-remaining {
  margin: 0 !important;
  line-height: 21px !important;
}

.secondary-page-view[data-secondary-view="lucky-draw"] .pm-lucky-spin {
  min-height: 46px !important;
  font-size: 17px !important;
}

.secondary-page-view[data-secondary-view="lucky-draw"] .pm-lucky-lower-grid {
  gap: 8px !important;
}

.secondary-page-view[data-secondary-view="lucky-draw"] .secondary-page-prize-card,
.secondary-page-view[data-secondary-view="lucky-draw"] .pm-lucky-history {
  min-height: 144px !important;
  padding: 12px 10px !important;
  border-radius: 22px !important;
}

.secondary-page-view[data-secondary-view="lucky-draw"] .pm-lucky-card-title {
  margin-bottom: 8px !important;
}

.secondary-page-view[data-secondary-view="lucky-draw"] .pm-lucky-prize-grid > div {
  min-height: 72px !important;
}

.secondary-page-view[data-secondary-view="lucky-draw"] .secondary-page-prize-card > p {
  margin-top: 6px !important;
}

.secondary-page-view[data-secondary-view="lucky-draw"] .pm-lucky-history > div:not(.pm-lucky-card-title) {
  min-height: 26px !important;
}

.secondary-page-view[data-secondary-view="lucky-draw"] .pm-lucky-rules {
  min-height: 30px !important;
  margin-bottom: 2px !important;
}

@media (max-width: 360px) {
  .secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-hero-copy h2 {
    font-size: 21px !important;
  }

  .secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-metric {
    grid-template-columns: 29px minmax(0, 1fr) !important;
    gap: 5px !important;
    padding-inline: 6px !important;
  }

  .secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-metric-icon {
    width: 29px !important;
    height: 29px !important;
  }

  .secondary-page-view[data-secondary-view="music-dividend"] .music-dividend-metric > div > strong {
    font-size: 18px !important;
  }

  .secondary-page-view[data-secondary-view="lucky-draw"] .secondary-page-wheel-wrap {
    min-height: 304px !important;
  }

  .secondary-page-view[data-secondary-view="lucky-draw"] .secondary-page-prize-card,
  .secondary-page-view[data-secondary-view="lucky-draw"] .pm-lucky-history {
    min-height: 138px !important;
  }
}

/*
 * Final cross-page QA corrections.
 * Keep keyboard focus visible without the browser's yellow system outline, and
 * prevent compact dividend units from collapsing inside the three metrics.
 */
.secondary-page-layer .secondary-page-back:focus,
.secondary-page-layer .secondary-page-back:focus-visible {
  outline: none !important;
  box-shadow:
    0 0 0 2px rgba(247, 185, 232, 0.34),
    0 0 0 4px rgba(188, 238, 255, 0.3),
    0 10px 24px rgba(116, 139, 177, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.98) !important;
}

.secondary-page-layer[hidden],
.secondary-page-layer [hidden] {
  display: none !important;
}

.secondary-page-view[data-secondary-view="music-dividend"]
  .music-dividend-metric
  > div {
  grid-template-columns: minmax(0, auto) max-content !important;
}

.secondary-page-view[data-secondary-view="music-dividend"]
  .music-dividend-metric
  > div
  > strong {
  font-size: 20px !important;
}

.secondary-page-view[data-secondary-view="music-dividend"]
  .music-dividend-metric
  > div
  > small {
  min-width: max-content;
  margin-left: 2px !important;
  font-size: 5.5px !important;
  letter-spacing: -0.2px;
  white-space: nowrap;
}
