/*
 * Identité DIVIN v2
 * Blanc céleste dominant, or pâle en accent, étoiles, croix et halos sacrés.
 * Chargé après rarity-system.css afin de rester l'autorité visuelle Divin.
 */

:root {
  --rarity-divin: #fffdf2;
  --rarity-divin-rgb: 255, 253, 242;
  --rarity-divin-light: #ffffff;
  --rarity-divin-gold: #f5d77c;
  --rarity-divin-sky: #dff6ff;
}

body .rarity-divin {
  --rarity: var(--rarity-divin);
  --rarity-rgb: var(--rarity-divin-rgb);
  --rarity-light: var(--rarity-divin-light);
}

/* Badge nacré : le blanc domine, l'or ne sert que de signature. */
.rarity-divin .cosmetic-rarity-badge {
  background:
    linear-gradient(100deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .5), rgba(245, 215, 124, .18), rgba(255, 255, 255, .42));
  border-color: rgba(255, 255, 255, .94);
  box-shadow:
    inset 0 0 12px rgba(255, 255, 255, .24),
    0 0 9px rgba(255, 255, 255, .82),
    0 0 24px rgba(223, 246, 255, .52),
    0 0 38px rgba(245, 215, 124, .18);
  color: #fff;
  text-shadow: 0 0 4px #fff, 0 0 11px rgba(223, 246, 255, .94);
}

/* Boutique publique : fond nocturne froid, rayonnement blanc et bordure prismatique. */
body[data-route="shop"] .shop-item.rarity-divin {
  --rarity: var(--rarity-divin);
  --rarity-rgb: var(--rarity-divin-rgb);
  background:
    radial-gradient(circle at 16% 13%, rgba(255, 255, 255, .34), transparent 24%),
    radial-gradient(circle at 82% 75%, rgba(223, 246, 255, .2), transparent 43%),
    radial-gradient(circle at 64% 22%, rgba(245, 215, 124, .09), transparent 31%),
    linear-gradient(150deg, rgba(34, 43, 65, .99), rgba(13, 20, 37, .99) 57%, rgba(7, 13, 27, .99)) padding-box,
    conic-gradient(
      from var(--shop-rarity-angle),
      transparent 0 7%,
      #fff 16%,
      #dff6ff 28%,
      #fff 39%,
      #f5d77c 48%,
      #fff 57%,
      transparent 69% 80%,
      #fff 91%,
      transparent
    ) border-box !important;
  border-color: transparent !important;
  box-shadow:
    inset 0 0 54px rgba(255, 255, 255, .09),
    inset 0 0 16px rgba(223, 246, 255, .1),
    0 14px 38px rgba(0, 0, 0, .3),
    0 0 18px rgba(255, 255, 255, .32),
    0 0 42px rgba(223, 246, 255, .18) !important;
}

body[data-route="shop"] .shop-item.rarity-divin::after {
  animation: phnxDivineWhiteScan 2.05s ease-in-out infinite;
  background:
    linear-gradient(105deg, transparent 23%, rgba(255, 255, 255, .12) 37%, rgba(255, 255, 255, .96) 49%, rgba(223, 246, 255, .52) 54%, transparent 70%);
  filter: blur(.2px);
  opacity: 1;
}

/* Compte, inventaire, équipement Like.io. */
.cosmetic-card.rarity-divin,
.inventory-cosmetic-card.rarity-divin,
.live-game-cosmetic-card.rarity-divin {
  background:
    radial-gradient(circle at 13% 9%, rgba(255, 255, 255, .27), transparent 27%),
    radial-gradient(circle at 83% 76%, rgba(223, 246, 255, .13), transparent 43%),
    linear-gradient(138deg, rgba(37, 45, 64, .98), rgba(9, 16, 31, .99) 70%);
  border-color: rgba(255, 255, 255, .84);
  box-shadow:
    inset 0 0 28px rgba(255, 255, 255, .09),
    0 0 12px rgba(255, 255, 255, .24),
    0 0 27px rgba(223, 246, 255, .15);
}

/* Panel admin : même identité pour cadres, missiles, boosts et packs. */
body.admin-panel-route :is(.admin-shop-card, .admin-web-frame-card).rarity-divin {
  background:
    radial-gradient(circle at 11% 8%, rgba(255, 255, 255, .27), transparent 25%),
    radial-gradient(circle at 82% 76%, rgba(223, 246, 255, .12), transparent 42%),
    linear-gradient(145deg, rgba(39, 47, 67, .98), rgba(8, 16, 32, .99) 66%) !important;
  border-color: rgba(255, 255, 255, .84) !important;
  box-shadow:
    inset 0 0 32px rgba(255, 255, 255, .08),
    0 0 13px rgba(255, 255, 255, .22),
    0 0 29px rgba(223, 246, 255, .14);
}

/* Passe LIVE. */
.live-pass-reward-card.rarity-divin,
.admin-live-pass-reward-card.rarity-divin {
  --rarity: var(--rarity-divin);
  --rarity-rgb: var(--rarity-divin-rgb);
  background:
    radial-gradient(circle at 15% 12%, rgba(255, 255, 255, .32), transparent 27%),
    radial-gradient(circle at 80% 77%, rgba(223, 246, 255, .16), transparent 42%),
    linear-gradient(150deg, rgba(38, 46, 66, .99), rgba(8, 17, 34, .99)) padding-box,
    conic-gradient(
      from var(--pass-rarity-angle),
      transparent 0 8%,
      #fff 18%,
      #dff6ff 31%,
      #fff 44%,
      #f5d77c 53%,
      #fff 62%,
      transparent 73% 82%,
      #fff 93%,
      transparent
    ) border-box !important;
  box-shadow: 0 0 15px rgba(255, 255, 255, .24), 0 0 34px rgba(223, 246, 255, .15);
}

/* Arbre de compétences : blanc sacré et bleu céleste au lieu du jaune légendaire. */
.live-game-skill-rarity[data-rarity="divin"] {
  background:
    linear-gradient(95deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .46), rgba(223, 246, 255, .2), rgba(255, 255, 255, .4));
  border-color: rgba(255, 255, 255, .94);
  color: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, .8), 0 0 25px rgba(223, 246, 255, .45);
  text-shadow: 0 0 5px #fff, 0 0 12px rgba(223, 246, 255, .94);
}

.live-game-skill-node.rarity-divin {
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 255, 255, .3), transparent 27%),
    radial-gradient(circle at 79% 76%, rgba(223, 246, 255, .15), transparent 49%),
    radial-gradient(circle at 61% 23%, rgba(245, 215, 124, .08), transparent 28%),
    linear-gradient(145deg, rgba(41, 49, 68, .99), rgba(7, 13, 27, .99));
  border-color: #fff;
  box-shadow:
    inset 0 0 34px rgba(255, 255, 255, .11),
    0 0 13px rgba(255, 255, 255, .5),
    0 0 32px rgba(223, 246, 255, .28);
  color: #fff;
}

.live-game-skill-node.rarity-divin::after {
  border-color: rgba(255, 255, 255, .78);
  box-shadow: inset 0 0 18px rgba(223, 246, 255, .18);
}

.live-game-skill-node.rarity-divin.can-upgrade {
  animation: liveGameSkillAvailable 1.55s ease-in-out infinite, phnxDivineWhitePulse 1.85s ease-in-out infinite;
}

.admin-live-game-rarity-grid label[data-rarity="divin"] {
  border-color: rgba(255, 255, 255, .7);
  box-shadow: inset 3px 0 #fff, 0 0 14px rgba(223, 246, 255, .11);
}

.admin-live-game-rarity-grid label[data-rarity="divin"] > span {
  color: #fff;
  text-shadow: 0 0 8px rgba(223, 246, 255, .88);
}

/*
 * Particules divines.
 * - majorité : poussière blanche
 * - 1/3 : étoile céleste
 * - 1/5 : croix lumineuse
 * - 1/7 : halo circulaire
 */
.rarity-divin > :is(.shop-rarity-effects, .live-pass-rarity-effects) {
  display: block !important;
  filter: saturate(.72) brightness(1.28);
  opacity: 1 !important;
}

.rarity-divin > :is(.shop-rarity-effects, .live-pass-rarity-effects) i,
body[data-route="shop"] .shop-item.rarity-divin .shop-rarity-effects i {
  background: #fff;
  border: 0;
  border-radius: 50%;
  box-shadow:
    0 0 4px #fff,
    0 0 11px rgba(255, 255, 255, .98),
    0 0 22px rgba(223, 246, 255, .82);
}

.rarity-divin > :is(.shop-rarity-effects, .live-pass-rarity-effects) i:nth-child(3n + 1),
body[data-route="shop"] .shop-item.rarity-divin .shop-rarity-effects i:nth-child(3n + 1) {
  background: #fff;
  border-radius: 0;
  clip-path: polygon(50% 0, 61% 38%, 100% 50%, 61% 62%, 50% 100%, 39% 62%, 0 50%, 39% 38%);
  box-shadow: 0 0 7px #fff, 0 0 19px rgba(223, 246, 255, .96);
}

.rarity-divin > :is(.shop-rarity-effects, .live-pass-rarity-effects) i:nth-child(5n),
body[data-route="shop"] .shop-item.rarity-divin .shop-rarity-effects i:nth-child(5n) {
  background: #fff;
  border-radius: 1px;
  box-shadow: 0 0 8px #fff, 0 0 25px rgba(255, 255, 255, .98);
}

.rarity-divin > :is(.shop-rarity-effects, .live-pass-rarity-effects) i:nth-child(5n)::before,
.rarity-divin > :is(.shop-rarity-effects, .live-pass-rarity-effects) i:nth-child(5n)::after,
body[data-route="shop"] .shop-item.rarity-divin .shop-rarity-effects i:nth-child(5n)::before,
body[data-route="shop"] .shop-item.rarity-divin .shop-rarity-effects i:nth-child(5n)::after {
  background: linear-gradient(90deg, transparent, #fff 34% 66%, transparent);
  content: "";
  left: 50%;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

.rarity-divin > :is(.shop-rarity-effects, .live-pass-rarity-effects) i:nth-child(5n)::before,
body[data-route="shop"] .shop-item.rarity-divin .shop-rarity-effects i:nth-child(5n)::before {
  height: 1px;
  width: 560%;
}

.rarity-divin > :is(.shop-rarity-effects, .live-pass-rarity-effects) i:nth-child(5n)::after,
body[data-route="shop"] .shop-item.rarity-divin .shop-rarity-effects i:nth-child(5n)::after {
  height: 560%;
  width: 1px;
}

.rarity-divin > :is(.shop-rarity-effects, .live-pass-rarity-effects) i:nth-child(7n),
body[data-route="shop"] .shop-item.rarity-divin .shop-rarity-effects i:nth-child(7n) {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .92);
  border-radius: 50%;
  box-shadow: 0 0 7px #fff, inset 0 0 5px rgba(223, 246, 255, .82), 0 0 18px rgba(223, 246, 255, .72);
}

.rarity-divin > :is(.shop-rarity-effects, .live-pass-rarity-effects)::after {
  animation: phnxDivineHalo 5.8s linear infinite;
  background:
    radial-gradient(circle, transparent 45%, rgba(255, 255, 255, .16) 47% 49%, transparent 51%),
    conic-gradient(from 0deg, transparent 0 14%, rgba(255, 255, 255, .28) 18%, transparent 22% 47%, rgba(223, 246, 255, .25) 51%, transparent 55% 80%, rgba(245, 215, 124, .16) 84%, transparent 88%);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
  box-shadow: 0 0 22px rgba(255, 255, 255, .14), inset 0 0 18px rgba(223, 246, 255, .1);
  content: "";
  height: 92px;
  pointer-events: none;
  position: absolute;
  right: -28px;
  top: -35px;
  width: 92px;
}

@keyframes phnxDivineWhiteScan {
  0%, 100% { transform: translateX(-145%) skewX(-10deg); }
  57% { transform: translateX(145%) skewX(-10deg); }
}

@keyframes phnxDivineHalo {
  0% { opacity: .25; transform: rotate(0deg) scale(.9); }
  48% { opacity: .76; transform: rotate(176deg) scale(1.08); }
  100% { opacity: .25; transform: rotate(360deg) scale(.9); }
}

@keyframes phnxDivineWhitePulse {
  0%, 100% {
    filter: brightness(1);
    box-shadow: inset 0 0 34px rgba(255, 255, 255, .11), 0 0 13px rgba(255, 255, 255, .5), 0 0 32px rgba(223, 246, 255, .28);
  }
  50% {
    filter: brightness(1.2);
    box-shadow: inset 0 0 42px rgba(255, 255, 255, .17), 0 0 18px rgba(255, 255, 255, .82), 0 0 43px rgba(223, 246, 255, .42);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rarity-divin > :is(.shop-rarity-effects, .live-pass-rarity-effects)::after,
  .live-game-skill-node.rarity-divin,
  body[data-route="shop"] .shop-item.rarity-divin::after {
    animation: none !important;
  }
}
