/*
 * traffic-art.css — premium "game poster" art for category-page cards.
 * Layered ON TOP of traffic-pages.css (link this file after it) so it
 * replaces the old generic orb/target/line look with a clean, animated,
 * per-game neon poster. No markup changes required.
 */

/* ---- Poster canvas ---------------------------------------------------- */
.traffic-game-art {
  min-height: 210px;
  background:
    radial-gradient(120% 95% at 50% 6%, color-mix(in srgb, var(--game-a), transparent 52%), transparent 60%),
    radial-gradient(95% 85% at 86% 94%, color-mix(in srgb, var(--game-b), transparent 58%), transparent 60%),
    radial-gradient(60% 60% at 16% 28%, rgba(255, 255, 255, .07), transparent 60%),
    linear-gradient(160deg, #0b1030 0%, #0a0820 46%, #05060f 100%) !important;
  box-shadow: inset 0 -70px 90px rgba(2, 4, 14, .6), inset 0 0 0 1px rgba(255, 255, 255, .05);
}

/* Perspective neon floor (replaces the old inset framed grid). */
.traffic-game-art::before {
  content: "";
  position: absolute;
  inset: auto;
  left: -20%;
  right: -20%;
  bottom: -16%;
  top: auto;
  height: 60%;
  border: 0;
  border-radius: 0;
  opacity: .55;
  transform: perspective(440px) rotateX(64deg);
  transform-origin: bottom center;
  background:
    linear-gradient(color-mix(in srgb, var(--game-a), transparent 40%) 2px, transparent 2px) 0 0 / 100% 30px,
    linear-gradient(90deg, color-mix(in srgb, var(--game-b), transparent 50%) 2px, transparent 2px) 0 0 / 46px 100%;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 42%);
  mask-image: linear-gradient(180deg, transparent, #000 42%);
  animation: taFloor 6s linear infinite;
}
@keyframes taFloor {
  to { background-position: 0 30px, 46px 0; }
}

/* Diagonal light sweep (replaces the conic orbit). */
.traffic-game-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .16) 50%, transparent 62%);
  transform: translateX(-120%);
  opacity: .85;
  animation: taSweep 5.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes taSweep {
  0%, 55%, 100% { transform: translateX(-120%); }
  76% { transform: translateX(120%); }
}

/* ---- Central glowing emblem (repurposes <b>) ------------------------- */
.traffic-game-art b {
  left: 50%;
  top: 45%;
  right: auto;
  width: 124px;
  height: 124px;
  z-index: 2;
  border-radius: 28px;
  border: 1px solid color-mix(in srgb, var(--game-a), #ffffff 25%);
  background:
    radial-gradient(120% 120% at 28% 18%, color-mix(in srgb, var(--game-a), transparent 28%), transparent 62%),
    radial-gradient(120% 120% at 82% 88%, color-mix(in srgb, var(--game-b), transparent 32%), transparent 62%),
    linear-gradient(160deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .03));
  box-shadow:
    0 20px 44px rgba(0, 0, 0, .5),
    0 0 40px color-mix(in srgb, var(--game-a), transparent 48%),
    inset 0 0 30px rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transform: translate(-50%, -50%);
  animation: taEmblem 4.6s ease-in-out infinite;
}
.traffic-game-art b::after {
  content: var(--icon-code);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: clamp(20px, 2.3vw, 30px);
  font-weight: 1000;
  letter-spacing: .03em;
  text-shadow:
    0 0 16px color-mix(in srgb, var(--game-a), #ffffff 12%),
    0 0 30px color-mix(in srgb, var(--game-b), transparent 30%);
}
@keyframes taEmblem {
  0%, 100% { transform: translate(-50%, -50%); }
  50% { transform: translate(-50%, -55%); }
}

/* Orbiting ring behind the emblem (repurposes the diagonal <em>). */
.traffic-game-art em {
  left: 50%;
  top: 45%;
  width: 184px !important;
  height: 184px !important;
  z-index: 0;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--game-a), transparent 62%);
  border-top-color: color-mix(in srgb, var(--game-b), transparent 30%);
  border-right-color: color-mix(in srgb, var(--game-b), transparent 55%);
  background: none;
  box-shadow: 0 0 30px color-mix(in srgb, var(--game-a), transparent 70%);
  transform: translate(-50%, -50%);
  transform-origin: center;
  animation: taOrbit 9s linear infinite;
}
.traffic-game-art em::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 14px var(--game-a), 0 0 24px var(--game-b);
}
.traffic-game-art em::after {
  content: "";
  position: absolute;
  bottom: -5px;
  right: 16%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--game-b), #fff 20%);
  box-shadow: 0 0 14px var(--game-b);
  left: auto;
  top: auto;
}
@keyframes taOrbit {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Floating accent spark (repurposes the <i> orb). */
.traffic-game-art i {
  left: auto;
  right: 22px;
  bottom: auto;
  top: 26px;
  width: 26px;
  height: 26px;
  z-index: 1;
  background: radial-gradient(circle, #fff, var(--game-a) 46%, transparent 70%);
  box-shadow: 0 0 26px color-mix(in srgb, var(--game-a), transparent 35%);
  animation: taSpark 3.6s ease-in-out infinite;
}
.traffic-game-art i::after {
  inset: 9px;
  background: rgba(255, 255, 255, .5);
  filter: blur(5px);
}
@keyframes taSpark {
  0%, 100% { transform: translateY(0); opacity: .85; }
  50% { transform: translateY(10px); opacity: 1; }
}

/* ---- Hover: bring the poster to life --------------------------------- */
.traffic-game-card:hover .traffic-game-art b,
.traffic-game-card:focus-within .traffic-game-art b {
  transform: translate(-50%, -55%) scale(1.05);
  box-shadow:
    0 24px 50px rgba(0, 0, 0, .55),
    0 0 56px color-mix(in srgb, var(--game-a), transparent 32%),
    inset 0 0 34px rgba(255, 255, 255, .16);
}
.traffic-game-card:hover .traffic-game-art::before { opacity: .72; animation-duration: 2.6s; }
.traffic-game-card:hover .traffic-game-art em { animation-duration: 4s; }
.traffic-game-card:hover .traffic-game-art i { animation-duration: 1.6s; filter: brightness(1.2); }

/* Keep the social-proof pills clear of the emblem. */
.traffic-game-card .ns-hot { top: 12px; right: 12px; }
.traffic-game-card .ns-live { bottom: 12px; right: 12px; }

@media (max-width: 760px) {
  .traffic-game-art { min-height: 188px; }
  .traffic-game-art b { width: 108px; height: 108px; }
  .traffic-game-art em { width: 162px !important; height: 162px !important; }
}
