/* looks/color.css: the signature look + animation of EVERY color item, one block per item, keyed by .it-<item id>
 * (shop.js adds it-<id> to every rendered item: Shop/Library cards, the preview, in-match names/tiles/podium).
 * Each item must look unlike every other item. Respect prefers-reduced-motion (calmer or no animation there).
 * Names stay inline: only paint-level properties animate on the name itself (color, shadows, background, filter);
 * extra layers are absolutely positioned pseudo-elements carrying the same text from data-text. */

.pname[class*="it-c_"] { position: relative; isolation: isolate; }
.pname[class*="it-c_"]::before, .pname[class*="it-c_"]::after { pointer-events: none; white-space: nowrap; }

/* ---------- Cyan: broken neon tube. Steady glow, then a stuttering flicker. ---------- */
.pname.it-c_cyan { color: #27e8ff; animation: ncxNeon 4.2s linear infinite; }
@keyframes ncxNeon {
  0%, 7%, 11%, 49%, 100% { color: #7ff3ff; text-shadow: 0 0 2px #dffcff, 0 0 7px #27e8ff, 0 0 14px rgba(39, 232, 255, .65); }
  8%, 10% { color: #1a8fa0; text-shadow: none; }
  9% { color: #7ff3ff; text-shadow: 0 0 2px #dffcff, 0 0 7px #27e8ff; }
  50%, 52% { color: #1a8fa0; text-shadow: 0 0 3px rgba(39, 232, 255, .3); }
  51% { color: #7ff3ff; text-shadow: 0 0 2px #dffcff, 0 0 7px #27e8ff; }
}

/* ---------- Hot Pink: heartbeat. Lub-dub double pulse, then rest. ---------- */
.pname.it-c_pink { color: #ff2d95; animation: ncxHeart 1.5s ease-out infinite; }
@keyframes ncxHeart {
  0%, 40%, 100% { color: #ff2d95; text-shadow: 0 0 3px rgba(255, 45, 149, .5); }
  8% { color: #ff8cc6; text-shadow: 0 0 6px #ff2d95, 0 0 16px #ff2d95; }
  16% { color: #ff2d95; text-shadow: 0 0 4px rgba(255, 45, 149, .6); }
  24% { color: #ffb3d9; text-shadow: 0 0 8px #ff2d95, 0 0 22px #ff2d95, 0 0 32px rgba(255, 45, 149, .5); }
}

/* ---------- Lime: CRT terminal. Scanlines and a phosphor beam rolling down the letters. ---------- */
.pname.it-c_lime {
  color: #9dff3d; -webkit-text-fill-color: transparent;
  background-image: repeating-linear-gradient(180deg, transparent 0 2px, rgba(8, 40, 0, .22) 2px 3px),
    linear-gradient(180deg, #7ad62a 0%, #9dff3d 40%, #f2ffdf 48%, #9dff3d 56%, #7ad62a 100%);
  background-size: 100% 100%, 100% 300%; background-clip: text; -webkit-background-clip: text;
  filter: drop-shadow(0 0 3px rgba(157, 255, 61, .55));
  animation: ncxCrt 2.4s linear infinite;
}
@keyframes ncxCrt { from { background-position: 0 0, 0 100%; } to { background-position: 0 0, 0 0; } }

/* ---------- Tangerine: retro 3D extruded letters that sway side to side. ---------- */
.pname.it-c_orange { color: #ffa94d; animation: ncxExtrude 3s ease-in-out infinite; }
@keyframes ncxExtrude {
  0%, 100% { text-shadow: 1px 1px 0 #e0621c, 2px 2px 0 #b03c0f, 3px 3px 0 #6e2208; }
  50% { text-shadow: -1px 1px 0 #e0621c, -2px 2px 0 #b03c0f, -3px 3px 0 #6e2208; }
}

/* ---------- Grape: reverb. Ghost copies of the name drift out to the right and fade. ---------- */
.pname.it-c_purple { color: #c4a6ff; text-shadow: 0 0 4px rgba(177, 140, 255, .5); }
.pname.it-c_purple::before, .pname.it-c_purple::after {
  content: attr(data-text); position: absolute; left: 0; top: 0; z-index: -1;
  color: #8a5cff; text-shadow: none; opacity: 0; animation: ncxEcho 2.4s ease-out infinite;
}
.pname.it-c_purple::after { animation-delay: .5s; color: #b18cff; }
@keyframes ncxEcho {
  0% { opacity: .75; transform: translateX(0); }
  70%, 100% { opacity: 0; transform: translateX(.55em); }
}

/* ---------- Gold: polished metal with a glint, and a sparkle that pops on the corner. ---------- */
.pname.it-c_gold {
  -webkit-text-fill-color: transparent; text-shadow: none;
  background-image: linear-gradient(110deg, transparent 42%, #fffbe6 50%, transparent 58%),
    linear-gradient(180deg, #fff1a8 0%, #ffd34d 45%, #e0a21a 55%, #ffd34d 100%);
  background-size: 250% 100%, 100% 100%; background-repeat: no-repeat;
  background-clip: text; -webkit-background-clip: text;
  filter: drop-shadow(0 0 3px rgba(255, 211, 77, .5));
  animation: ncxGlint 3.4s ease-in-out infinite;
}
@keyframes ncxGlint { 0% { background-position: 150% 0, 0 0; } 55%, 100% { background-position: -50% 0, 0 0; } }
.pname.it-c_gold::after {
  content: "\2726"; position: absolute; right: -.5em; top: -.45em; font-size: .6em; line-height: 1;
  color: #fff6c4; -webkit-text-fill-color: #fff6c4; text-shadow: 0 0 4px #ffd34d;
  transform: scale(0); animation: ncxSparkle 3.4s ease-in-out infinite;
}
@keyframes ncxSparkle { 0%, 40%, 70%, 100% { transform: scale(0) rotate(0); } 52% { transform: scale(1.1) rotate(90deg); } }

/* ---------- Fire: colors rise up through the letters with a flickering heat glow above. ---------- */
.pname.it-c_fire {
  background-image: linear-gradient(0deg, #ff2d2d 0%, #ff7a1a 20%, #ffe94d 35%, #ff7a1a 50%, #ff2d2d 65%, #ff7a1a 80%, #ffe94d 100%);
  background-size: 100% 300%;
  animation: ncxFireUp 1.1s linear infinite, ncxFlicker .9s steps(3) infinite;
}
@keyframes ncxFireUp { from { background-position: 0 0; } to { background-position: 0 100%; } }
@keyframes ncxFlicker {
  0% { filter: drop-shadow(0 -2px 3px rgba(255, 122, 26, .8)); }
  50% { filter: drop-shadow(0 -3px 5px rgba(255, 60, 20, .9)); }
  100% { filter: drop-shadow(0 -1px 2px rgba(255, 200, 60, .7)); }
}

/* ---------- Ice: cold blue, and white frost creeps up the letters then shatters off. ---------- */
.pname.it-c_ice {
  background-image: linear-gradient(180deg, #e8fbff 0%, #7fe3ff 50%, #3fa8ff 100%); background-size: 100% 100%;
  filter: drop-shadow(0 0 3px rgba(127, 227, 255, .55)); animation: none;
}
.pname.it-c_ice::after {
  content: attr(data-text); position: absolute; left: 0; top: 0;
  color: #fff; -webkit-text-fill-color: #fff; text-shadow: 0 0 5px #bff4ff, 0 0 1px #fff;
  clip-path: inset(100% 0 0 0); animation: ncxFrost 5s ease-in-out infinite;
}
@keyframes ncxFrost {
  0% { clip-path: inset(100% 0 0 0); opacity: 1; }
  45% { clip-path: inset(0 0 0 0); opacity: 1; }
  75% { clip-path: inset(0 0 0 0); opacity: 1; }
  80%, 100% { clip-path: inset(0 0 0 0); opacity: 0; }
}

/* ---------- Tomato Red: juicy splat, with drops dripping off the bottom. ---------- */
.pname.it-c_tomato { color: #ff4b3e; text-shadow: 0 1px 0 #9a170d, 0 0 6px rgba(255, 75, 62, .45); animation: none; }
.pname.it-c_tomato::before, .pname.it-c_tomato::after {
  content: ""; position: absolute; top: 72%; left: 28%; width: .2em; height: .28em; z-index: -1;
  background: #ff4b3e; border-radius: 50% 50% 50% 50% / 35% 35% 65% 65%;
  opacity: 0; animation: ncxDrip 2.6s ease-in infinite;
}
.pname.it-c_tomato::after { left: 68%; animation-delay: 1.3s; width: .16em; height: .22em; }
@keyframes ncxDrip {
  0% { opacity: 0; transform: translateY(-.1em) scaleY(.4); }
  15% { opacity: 1; transform: translateY(0) scaleY(1.2); }
  70% { opacity: 1; transform: translateY(.35em) scaleY(1); }
  100% { opacity: 0; transform: translateY(.7em) scaleY(.8); }
}

/* ---------- Sing or Scream: brand colours with a live equalizer bouncing under the name. ---------- */
.pname.it-c_brand { filter: drop-shadow(0 0 2px rgba(255, 45, 149, .45)); }
.pname.it-c_brand::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -.12em; height: .3em; z-index: -1; opacity: .9;
  background: linear-gradient(90deg, #27e8ff, #ffe94d, #ff2d95, #27e8ff);
  -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 .12em, transparent .12em .22em),
    radial-gradient(.38em .3em at 50% 100%, #000 98%, transparent 100%);
  -webkit-mask-size: auto, .9em 100%; -webkit-mask-repeat: repeat, repeat-x;
  -webkit-mask-composite: source-in;
  mask-image: repeating-linear-gradient(90deg, #000 0 .12em, transparent .12em .22em),
    radial-gradient(.38em .3em at 50% 100%, #000 98%, transparent 100%);
  mask-size: auto, .9em 100%; mask-repeat: repeat, repeat-x; mask-composite: intersect;
  animation: ncxEq .9s linear infinite;
}
@keyframes ncxEq { from { -webkit-mask-position: 0 0, 0 0; mask-position: 0 0, 0 0; } to { -webkit-mask-position: 0 0, .9em 0; mask-position: 0 0, .9em 0; } }

/* ---------- Aurora: curtains of light drifting diagonally, with a soft colour-shifting halo. ---------- */
.pname.it-c_aurora {
  background-image: linear-gradient(125deg, #3dff9a, #27e8ff, #8a5cff, #ff2d95, #3dff9a, #27e8ff);
  background-size: 300% 300%; animation: ncxAurora 7s ease-in-out infinite alternate;
}
@keyframes ncxAurora { 0% { background-position: 0% 0%; } 50% { background-position: 60% 100%; } 100% { background-position: 100% 30%; } }
.pname.it-c_aurora::before {
  content: attr(data-text); position: absolute; left: 0; top: 0; z-index: -1;
  color: transparent; -webkit-text-fill-color: transparent;
  text-shadow: 0 0 8px rgba(61, 255, 154, .8), 0 -2px 14px rgba(138, 92, 255, .7);
  animation: ncxHalo 5s linear infinite;
}
@keyframes ncxHalo { from { filter: hue-rotate(0deg); } to { filter: hue-rotate(360deg); } }

/* ---------- Sunset: the sun slowly sinks through the letters, gold top fading to dusk. ---------- */
.pname.it-c_sunset {
  background-image: linear-gradient(180deg, #fff3a0 0%, #ffe94d 20%, #ff8a3d 45%, #ff2d95 70%, #c75cff 100%);
  background-size: 100% 260%; filter: drop-shadow(0 1px 3px rgba(255, 110, 60, .45));
  animation: ncxSink 8s ease-in-out infinite alternate;
}
@keyframes ncxSink { from { background-position: 0 0; } to { background-position: 0 100%; } }

/* ---------- Ocean: a water line bobbing inside the letters, foam sheen rolling across. ---------- */
.pname.it-c_ocean {
  background-image: linear-gradient(90deg, transparent 30%, rgba(225, 255, 255, .55) 50%, transparent 70%),
    linear-gradient(180deg, #c8f7ff 0%, #c8f7ff 42%, #27e8ff 46%, #2d8bff 70%, #3dffd0 100%);
  background-size: 200% 100%, 100% 160%; background-repeat: repeat-x, no-repeat;
  animation: ncxFoam 3.2s linear infinite, ncxTide 2.6s ease-in-out infinite alternate;
}
@keyframes ncxFoam { from { background-position-x: 100%, 0; } to { background-position-x: -100%, 0; } }
@keyframes ncxTide { from { background-position-y: 0, 15%; } to { background-position-y: 0, 85%; } }

/* ---------- Galaxy: a nebula with stars twinkling inside the letters. ---------- */
.pname.it-c_galaxy {
  background-image:
    radial-gradient(1.2px 1.2px at 15% 30%, #fff 99%, transparent),
    radial-gradient(1px 1px at 55% 70%, #fff 99%, transparent),
    radial-gradient(1.4px 1.4px at 85% 20%, #fff 99%, transparent),
    radial-gradient(1px 1px at 35% 85%, #dff 99%, transparent),
    linear-gradient(90deg, #a07bff, #ff6bd6, #6ad7ff, #a07bff);
  background-size: 1.6em 1em, 1.6em 1em, 1.6em 1em, 1.6em 1em, 200% 100%;
  animation: ncxStars 9s linear infinite, ncxTwinkle 2.2s ease-in-out infinite;
}
@keyframes ncxStars {
  from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0; }
  to { background-position: 1.6em 0, 3.2em 0, 1.6em 0, 4.8em 0, -200% 0; }
}
@keyframes ncxTwinkle {
  0%, 100% { filter: brightness(1) drop-shadow(0 0 3px rgba(138, 92, 255, .6)); }
  50% { filter: brightness(1.25) drop-shadow(0 0 6px rgba(255, 107, 214, .7)); }
}

/* ---------- Rainbow: a striped rainbow trail streaming behind the name, wiggling. ---------- */
.pname.it-c_rainbow::before {
  content: attr(data-text); position: absolute; left: 0; top: 0; z-index: -1;
  color: transparent; -webkit-text-fill-color: transparent;
  opacity: .55; animation: ncxTrail .5s steps(2) infinite alternate;
}
@keyframes ncxTrail {
  from { text-shadow: -.06em .06em 0 #ff3d3d, -.12em .1em 0 #ffe94d, -.18em .14em 0 #3dff9a, -.24em .18em 0 #8a5cff; }
  to { text-shadow: -.06em .1em 0 #ff3d3d, -.12em .06em 0 #ffe94d, -.18em .18em 0 #3dff9a, -.24em .14em 0 #8a5cff; }
}

/* ---------- Glitch: RGB-split slices that tear and jump. ---------- */
.pname.it-c_glitch::before, .pname.it-c_glitch::after {
  content: attr(data-text); position: absolute; left: 0; top: 0; background: none;
}
.pname.it-c_glitch::before { color: #27e8ff; -webkit-text-fill-color: #27e8ff; clip-path: inset(0 0 100% 0); animation: ncxSliceA 1.8s steps(1) infinite; }
.pname.it-c_glitch::after { color: #ff2d95; -webkit-text-fill-color: #ff2d95; clip-path: inset(0 0 100% 0); animation: ncxSliceB 1.8s steps(1) infinite; }
@keyframes ncxSliceA {
  0%, 30%, 55%, 100% { clip-path: inset(0 0 100% 0); transform: none; }
  32% { clip-path: inset(10% 0 60% 0); transform: translateX(-2px); }
  36% { clip-path: inset(55% 0 20% 0); transform: translateX(2px); }
  40% { clip-path: inset(30% 0 45% 0); transform: translateX(-3px); }
  85% { clip-path: inset(70% 0 5% 0); transform: translateX(2px); }
  88% { clip-path: inset(0 0 100% 0); transform: none; }
}
@keyframes ncxSliceB {
  0%, 30%, 55%, 100% { clip-path: inset(0 0 100% 0); transform: none; }
  33% { clip-path: inset(60% 0 10% 0); transform: translateX(2px); }
  37% { clip-path: inset(20% 0 55% 0); transform: translateX(-2px); }
  41% { clip-path: inset(45% 0 30% 0); transform: translateX(3px); }
  86% { clip-path: inset(5% 0 70% 0); transform: translateX(-2px); }
  89% { clip-path: inset(0 0 100% 0); transform: none; }
}

/* ---------- Cotton Candy: pastel barber-pole stripes swirling through soft fluff. ---------- */
.pname.it-c_candy {
  background-image: repeating-linear-gradient(45deg, #ff8fd0 0 .2em, #fff0fa .2em .35em, #b3a8ff .35em .55em, #fff0fa .55em .7em, #7fe3ff .7em .9em, #fff0fa .9em 1.05em);
  background-size: auto; filter: drop-shadow(0 0 3px rgba(255, 143, 208, .65));
  animation: ncxCandy 1.6s linear infinite;
}
@keyframes ncxCandy { from { background-position: 0 0; } to { background-position: 1.485em 0; } }

/* ---------- Lava: molten blobs rising inside dark-red rock, a slow heat throb. ---------- */
.pname.it-c_lava {
  background-image:
    radial-gradient(.28em .22em at 30% 50%, #ffe34d 40%, #ff9a1a 70%, transparent 100%),
    radial-gradient(.22em .3em at 75% 50%, #ffd23d 40%, #ff7a1a 70%, transparent 100%),
    linear-gradient(180deg, #ff6a1a, #e0301a 60%, #ff4b1a);
  background-size: 1.3em 1.6em, 1.7em 2.1em, 100% 100%;
  animation: ncxBlobs 4s linear infinite, ncxHeat 2.4s ease-in-out infinite;
}
@keyframes ncxBlobs { from { background-position: 0 1.6em, .4em 2.1em, 0 0; } to { background-position: 0 0, .4em 0, 0 0; } }
@keyframes ncxHeat {
  0%, 100% { filter: drop-shadow(0 0 2px rgba(255, 90, 26, .5)); }
  50% { filter: drop-shadow(0 0 7px rgba(255, 60, 20, .85)); }
}

/* ---------- Toxic: radioactive wobble, with bubbles boiling off the top. ---------- */
.pname.it-c_toxic { animation: ncSlide 2.6s linear infinite, ncxOoze 1.8s ease-in-out infinite alternate; }
@keyframes ncxOoze {
  from { filter: hue-rotate(-12deg) drop-shadow(0 0 3px rgba(125, 255, 61, .5)); }
  to { filter: hue-rotate(14deg) drop-shadow(0 0 7px rgba(125, 255, 61, .85)); }
}
.pname.it-c_toxic::before, .pname.it-c_toxic::after {
  content: ""; position: absolute; top: 0; left: 22%; width: .26em; height: .26em; box-sizing: border-box;
  border: 1.5px solid #9dff3d; border-radius: 50%; opacity: 0; animation: ncxBubble 2s ease-out infinite;
}
.pname.it-c_toxic::after { left: 64%; width: .18em; height: .18em; animation-delay: .9s; }
@keyframes ncxBubble {
  0% { opacity: 0; transform: translateY(.2em) scale(.4); }
  20% { opacity: 1; }
  80% { opacity: .8; transform: translateY(-.45em) scale(1); }
  100% { opacity: 0; transform: translateY(-.55em) scale(1.4); }
}

/* ---------- Liquid Chrome: 80s mirror metal, its horizon line rippling up and down. ---------- */
.pname.it-c_chrome {
  background-image: linear-gradient(180deg, #ffffff 0%, #dfe6f2 30%, #9aa6ba 46%, #4f5b70 50%, #c3ccda 54%, #ffffff 75%, #b4bfd0 100%);
  background-size: 100% 180%; filter: drop-shadow(0 1px 0 #2a3140) drop-shadow(0 0 3px rgba(195, 204, 218, .45));
  animation: ncxLiquid 2.8s ease-in-out infinite alternate;
}
@keyframes ncxLiquid { from { background-position: 0 20%; } to { background-position: 0 80%; } }

/* ---------- Staff Gold: authority. Gold-red flow, with an outline ping rippling outward. ---------- */
.pname.it-c_staff { filter: drop-shadow(0 0 3px rgba(255, 211, 77, .6)); }
.pname.it-c_staff::before {
  content: attr(data-text); position: absolute; left: 0; top: 0; z-index: -1;
  color: transparent; -webkit-text-fill-color: transparent; -webkit-text-stroke: 1px rgba(255, 211, 77, .9);
  opacity: 0; animation: ncxPing 2.2s ease-out infinite;
}
@keyframes ncxPing {
  0% { opacity: 1; -webkit-text-stroke: 1px rgba(255, 211, 77, .9); }
  80%, 100% { opacity: 0; -webkit-text-stroke: .32em rgba(255, 61, 61, .5); }
}

/* ---------- Less motion: everything holds still in its best-looking frame. ---------- */
@media (prefers-reduced-motion: reduce) {
  .pname[class*="it-c_"], .pname[class*="it-c_"]::before, .pname[class*="it-c_"]::after { animation: none !important; }
  .pname[class*="it-c_"]::before, .pname[class*="it-c_"]::after { opacity: 0; }
  .pname.it-c_cyan { text-shadow: 0 0 2px #dffcff, 0 0 7px #27e8ff; color: #7ff3ff; }
  .pname.it-c_orange { text-shadow: 1px 1px 0 #e0621c, 2px 2px 0 #b03c0f, 3px 3px 0 #6e2208; }
  .pname.it-c_rainbow::before { opacity: .55; text-shadow: -.06em .06em 0 #ff3d3d, -.12em .1em 0 #ffe94d, -.18em .14em 0 #3dff9a, -.24em .18em 0 #8a5cff; }
  .pname.it-c_lava { filter: drop-shadow(0 0 4px rgba(255, 70, 20, .7)); }
  .pname.it-c_galaxy { filter: drop-shadow(0 0 4px rgba(138, 92, 255, .6)); }
}
