:root {
  --neon-pink:  #ff00d4;
  --neon-green: #39ff14;
  --neon-yellow:#fff700;
  --neon-blue:  #00c3ff;
  --hot-red:    #ff2a2a;
}

/* Page background: colorful, bright gradient + animated emoji tiles */
html, body {
  margin: 0;
  padding: 0;
  /* Layer order: emojis (top), radial highlight, multi-color base gradient (bottom) */
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 160'><g opacity='0.6'><text x='12' y='70' font-size='56'>💥</text><text x='100' y='48' font-size='40'>🛒</text><text x='70' y='140' font-size='48'>🤑</text></g></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 220'><g opacity='0.55'><text x='10' y='80' font-size='54'>🌈</text><text x='120' y='120' font-size='44'>✨</text><text x='160' y='70' font-size='52'>🔥</text></g></svg>"),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.12) 0 12%, transparent 60%),
    conic-gradient(from 0deg at 50% 50%, #ff00d4, #fff700, #00c3ff, #39ff14, #ff2a2a, #ff00d4);
  background-size: 160px 160px, 220px 220px, 100% 100%, 100% 100%;
  background-repeat: repeat, repeat, no-repeat, no-repeat;
  background-position: 0 0, 0 0, 50% 50%, 50% 50%;
  animation: emojiDrift 70s linear infinite;
  font-family: "Comic Sans MS","Comic Sans",cursive;
  color: #111;
}

@keyframes emojiDrift {
  0%   { background-position: 0px 0px,    0px 0px,    50% 50%, 50% 50%; }
  100% { background-position: 1400px 1200px, -1000px 1200px, 50% 50%, 50% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  html, body { animation: none; }
}

/* Utility */
.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* Layout wrapper */
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 14px;
}

/* Title styling */
.title {
  font-size: clamp(32px, 6vw, 64px);
  color: #fff;
  text-shadow:
    2px 2px 0 #000,
    0 0 12px var(--neon-pink),
    0 0 22px var(--neon-yellow),
    0 0 36px var(--neon-green);
  letter-spacing: 1px;
  text-align: center;
  margin: 12px 0 8px;
}

/* Subtitle marquee panel */
.sub {
  border: 5px ridge #eee;
  background: rgba(255,255,255,0.8);
  box-shadow: 0 0 12px #000, 0 0 24px rgba(255, 0, 212, 0.5);
  padding: 6px;
}
.marquee {
  overflow: hidden;
  white-space: nowrap;
  font-weight: 800;
  color: #111;
  text-shadow: 0 0 6px var(--neon-yellow);
}
.marquee__track {
  display: inline-block;
  padding-left: 100%;
  animation: marquee 18s linear infinite;
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* Grid layout */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

/* Card styles */
.card {
  position: relative;
  border: 4px outset #ccc;
  background: none;
  box-shadow: 0 0 10px #000, 0 0 20px var(--neon-green);
  transition: transform .08s ease-in, box-shadow .08s ease-in, filter .08s ease-in;
  overflow: hidden; cursor: pointer;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: scale(1.03) rotate(-0.5deg);
  box-shadow: 0 0 12px #000, 0 0 26px var(--neon-pink), 0 0 40px var(--neon-yellow);
  filter: saturate(1.3);
}

/* Tag/ribbon */
.card .tag {
  position: absolute; top: 8px; left: 8px;
  background: linear-gradient(45deg, var(--neon-pink), var(--neon-yellow));
  color: #000; padding: 4px 8px; font-weight: 900; border: 3px groove #000;
  text-shadow: 0 1px 0 #fff; font-size: 13px;
}

/* Text overlay */
.card .text {
  position: static;
  width: 100%;
  backdrop-filter: blur(2px);
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.98));
  padding: 10px;
  border-top: 3px ridge #000;
}
.card .text h3 { margin: 0 0 4px 0; font-size: 20px; color: var(--hot-red);
  text-shadow: 1px 1px 0 #000, 0 0 8px var(--neon-yellow); }
.card .text p { margin: 0; font-size: 14px; color: #111; }

/* Links & focus */
.card-link { text-decoration: none; color: inherit; display: block; }
.card-link:focus-visible .card { outline: 4px dashed var(--neon-blue); outline-offset: 3px; }

/* Footer */
.footer { text-align: center; color: #fff; text-shadow: 0 0 8px var(--neon-blue); }

/* Responsive tweaks */
@media (max-width: 480px) {
  .title { font-size: clamp(28px, 9vw, 44px); }
}

/* Dedicated square media area for card images */
.card .art {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: center/contain no-repeat;
  background-color: rgba(255,255,255,0.6);
}

/* Retro confirm modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(2px);
}
.modal-overlay.hidden { display: none; }

.modal {
  width: min(520px, 92vw);
  border: 6px ridge #eee;
  background: linear-gradient(180deg, #ffffff, #f7f7ff 60%, #fff0ff);
  box-shadow: 0 0 18px #000, 0 0 28px rgba(255, 0, 212, 0.6), 0 0 40px rgba(255, 247, 0, 0.6);
  color: #111;
}
.modal__titlebar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 8px 10px;
  background: linear-gradient(180deg, #00c3ff, #0066ff);
  color: #fff;
  text-shadow: 1px 1px 0 #000, 0 0 8px var(--neon-yellow);
}
.modal__icon { filter: drop-shadow(0 0 4px #000); }
.modal__close {
  border: 3px outset #eee; background: #ffd9ff; cursor: pointer;
  padding: 2px 8px; font-weight: 900; color: #000;
}
.modal__content { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 14px; }
.modal__text { margin: 0; font-weight: 700; }
.modal__preview { font-size: 40px; text-shadow: 0 0 10px var(--neon-pink); }
.modal__actions { display: flex; gap: 10px; justify-content: flex-end; padding: 10px 14px 14px; }

.btn { border: 4px outset #ddd; background: linear-gradient(180deg, #fff, #eee); padding: 8px 12px; font-weight: 800; cursor: pointer; }
.btn:hover { filter: saturate(1.3) brightness(1.05); }
.btn:active { border-style: inset; }
.btn-primary { background: linear-gradient(180deg, #fff700, #ff00d4); color: #000; text-shadow: 0 1px 0 #fff; border-color: #000; }

/* Shiny info button */
.info-wrap { display: flex; justify-content: center; margin: 6px 0 12px; }
.info-btn {
  position: relative;
  border: 5px outset #eee;
  color: #000;
  font-weight: 900;
  letter-spacing: .3px;
  padding: 10px 16px;
  cursor: pointer;
  text-shadow: 0 1px 0 #fff, 0 0 6px var(--neon-yellow);
  box-shadow: 0 0 10px #000, 0 0 18px var(--neon-pink), 0 0 28px var(--neon-yellow);
  background: linear-gradient(120deg, #fff700 0%, #ff00d4 50%, #00c3ff 100%);
  background-size: 200% auto;
  animation: shimmer 3s linear infinite, pulse 2.8s ease-in-out infinite alternate;
}
.info-btn:hover { filter: saturate(1.25) brightness(1.05); }
.info-btn:active { border-style: inset; }
.info-btn:focus-visible { outline: 4px dashed var(--neon-blue); outline-offset: 3px; }

@keyframes shimmer {
  from { background-position: 0% 50%; }
  to   { background-position: 200% 50%; }
}
@keyframes pulse {
  from { transform: scale(1); }
  to   { transform: scale(1.03); }
}

@media (max-width: 480px) {
  .info-btn { width: 100%; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .info-btn { animation: none; }
}

/* Disabled (sold out) state styles */
.card.is-disabled {
  filter: grayscale(0.9) contrast(0.9);
  opacity: 0.9;
}
.card.is-disabled:hover {
  transform: none;
  box-shadow: 0 0 10px #000, 0 0 20px var(--neon-green);
  filter: grayscale(1);
}
.card-link.is-disabled { cursor: not-allowed; }

/* SOLD OUT ribbon */
.soldout {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(-18deg);
  background: linear-gradient(120deg, #fff700, #ff00d4);
  color: #000;
  padding: 8px 14px;
  font-weight: 900;
  letter-spacing: 1px;
  text-shadow: 0 1px 0 #fff, 0 0 6px var(--neon-yellow);
  border: 4px ridge #000;
  box-shadow: 0 0 10px #000, 0 0 16px rgba(255,0,212,0.7);
  z-index: 2;
  pointer-events: none;
}
@media (max-width: 480px) {
  .soldout { font-size: 14px; padding: 6px 10px; }
}
