/* SECRET Diamond Glass v26.
   SECRET uses the exact same card geometry and 3D tilt as every other rarity.
   The artwork stays fixed inside that shared card; only two reflections move. */

.card[data-set="secret"] {
  --secret-light-x: var(--background-x, 50%);
  --secret-light-y: var(--background-y, 50%);
}

/* No colour film, grain, foil dots or moving texture over the illustration. */
.card[data-set="secret"] .card__shine {
  background: none !important;
  background-image: none !important;
  mix-blend-mode: normal !important;
  filter: none !important;
  opacity: 1 !important;
}

/* A fixed platinum/champagne lip. Its colour and position never move. */
.card[data-set="secret"] .card__shine::before {
  content: "";
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  box-sizing: border-box !important;
  padding: 1.7px !important;
  border-radius: inherit !important;
  background-image: linear-gradient(135deg,
    rgb(255 255 255 / .96) 0%,
    rgb(174 222 242 / .78) 24%,
    rgb(102 129 159 / .62) 43%,
    rgb(244 224 170 / .84) 67%,
    rgb(245 251 255 / .94) 100%) !important;
  background-size: 100% 100% !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0) !important;
  -webkit-mask-composite: xor !important;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0) !important;
  mask-composite: exclude !important;
  mix-blend-mode: screen !important;
  filter: none !important;
  opacity: .72 !important;
}

/* Main polished-glass reflection. The broad coloured shoulders and narrow white
   core are the only strong moving treatment on the card. */
.card[data-set="secret"] .card__shine::after {
  content: "";
  display: block !important;
  background-image: linear-gradient(110deg,
    transparent 0 32%,
    rgb(44 218 255 / .07) 36%,
    rgb(44 218 255 / .30) 40%,
    rgb(152 82 255 / .35) 43.5%,
    rgb(255 79 174 / .25) 46%,
    rgb(235 248 255 / .15) 48%,
    rgb(255 255 255 / .55) 50%,
    rgb(255 249 226 / .34) 51.6%,
    rgb(255 216 117 / .41) 53.5%,
    rgb(67 244 184 / .34) 57%,
    rgb(52 198 255 / .21) 60.5%,
    transparent 67% 100%) !important;
  background-size: 170% 122% !important;
  background-position:
    calc((var(--secret-light-x) - 50%) * -1.12 + 50%)
    calc((var(--secret-light-y) - 50%) * -.72 + 50%) !important;
  background-repeat: no-repeat !important;
  mix-blend-mode: screen !important;
  filter: none !important;
  opacity: .80 !important;
  will-change: background-position;
}

/* Secondary refraction crosses the main reflection at a different angle. It is
   thinner and quieter, producing a jewel-like intersection without a pattern. */
.stage .card-preview .card[data-set="secret"] .secret-rainbow-overlay {
  background-image: linear-gradient(68deg,
    transparent 0 39%,
    rgb(142 80 255 / .13) 42%,
    rgb(61 206 255 / .24) 45%,
    rgb(238 249 255 / .14) 47.5%,
    rgb(255 255 255 / .30) 50%,
    rgb(255 230 160 / .26) 52.5%,
    rgb(80 240 191 / .19) 55%,
    transparent 61% 100%) !important;
  background-size: 170% 138% !important;
  background-position:
    calc((var(--secret-light-x) - 50%) * 1.06 + 50%)
    calc((var(--secret-light-y) - 50%) * -.64 + 50%) !important;
  background-repeat: no-repeat !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
  mix-blend-mode: screen !important;
  filter: none !important;
  opacity: calc(.24 + (var(--pointer-from-center, .18) * .18)) !important;
  will-change: background-position, opacity;
}

.stage .card-preview .card[data-set="secret"] .secret-rainbow-overlay::before,
.stage .card-preview .card[data-set="secret"] .secret-rainbow-overlay::after {
  content: none !important;
  display: none !important;
}

/* Disable the former whole-card colour/grain layer completely. */
.stage .card-preview .card[data-set="secret"] .secret-rainbow-glare {
  background: none !important;
  background-image: none !important;
  filter: none !important;
  opacity: 0 !important;
  display: none !important;
}

/* Dark metal body, platinum face lip and a single champagne hairline. */
.card[data-set="secret"] .card__front {
  box-shadow:
    inset 1px 1px 0 rgb(252 254 255 / .86),
    inset -1px -1px 0 rgb(7 11 18 / .88),
    inset 0 0 0 2px rgb(139 161 187 / .58),
    inset 0 0 0 3px rgb(235 213 155 / .28),
    inset 0 0 10px rgb(179 211 239 / .10),
    0 0 0 1px rgb(4 8 14 / .94),
    0 5px 16px rgb(0 0 0 / .50),
    0 0 19px rgb(116 185 233 / .22) !important;
}

/* Reduced motion keeps the same clean material and freezes both reflections. */
@media (prefers-reduced-motion: reduce) {
  .card[data-set="secret"] .card__shine::after {
    background-position: 51% 49% !important;
  }

  .stage .card-preview .card[data-set="secret"] .secret-rainbow-overlay {
    background-position: 49% 51% !important;
  }
}
