:root {
  color-scheme: dark;
  --bg: #0b0b0b;
  --bg-2: #141414;
  --surface: #1a1a1a;
  --surface-hover: #232323;
  --text: #f5f5f5;
  --muted: #a3a3a3;
  --dim: #6b6b6b;
  --accent: #e50914;
  --accent-hi: #ff1c26;
  --radius: 6px;
  --shadow-card: 0 18px 40px rgba(0, 0, 0, 0.6);
  --max-width: 1500px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    "Netflix Sans", "Helvetica Neue", Helvetica, Arial,
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* ---------- Top bar ---------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 4vw;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0) 100%
  );
  transition: background 0.25s ease;
}

.topbar.scrolled {
  background: rgba(0, 0, 0, 0.92);
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand img {
  height: 28px;
  width: auto;
}

.buy-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 6px 20px rgba(229, 9, 20, 0.35);
  transition:
    background 0.15s ease,
    transform 0.05s ease,
    box-shadow 0.2s ease;
}

.buy-button:hover {
  background: var(--accent-hi);
  box-shadow: 0 10px 26px rgba(229, 9, 20, 0.55);
}

.buy-button:active {
  transform: translateY(1px);
}

.buy-ticker {
  font-weight: 900;
}

.copy-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0.95;
}

.buy-button.copied {
  background: #1a8f3c;
  box-shadow: 0 6px 20px rgba(26, 143, 60, 0.4);
}

.buy-button.copied .copy-icon {
  opacity: 0;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  padding: 0 4vw 80px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  filter: brightness(1) saturate(1.05);
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(11, 11, 11, 0.45) 0%,
      rgba(11, 11, 11, 0) 25%,
      rgba(11, 11, 11, 0) 55%,
      rgba(11, 11, 11, 0.85) 92%,
      var(--bg) 100%
    ),
    linear-gradient(
      90deg,
      rgba(11, 11, 11, 0.78) 0%,
      rgba(11, 11, 11, 0.4) 30%,
      rgba(11, 11, 11, 0) 60%
    );
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 640px;
  padding-bottom: 40px;
}

.kicker {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #e5e5e5;
  text-transform: uppercase;
}

.kicker::before {
  content: "U";
  display: inline-block;
  margin-right: 8px;
  padding: 2px 6px;
  background: var(--accent);
  color: #fff;
  border-radius: 2px;
  font-weight: 900;
  letter-spacing: 0;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(48px, 7vw, 96px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.7);
}

.hero-text {
  margin: 0 0 24px;
  font-size: clamp(15px, 1.2vw, 18px);
  color: #e5e5e5;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
  max-width: 560px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 26px;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 700;
  transition:
    background 0.15s ease,
    transform 0.05s ease;
}

.primary-action {
  background: #fff;
  color: #000;
}

.primary-action:hover {
  background: rgba(255, 255, 255, 0.78);
}

.secondary-action {
  background: rgba(109, 109, 110, 0.7);
  color: #fff;
}

.secondary-action:hover {
  background: rgba(109, 109, 110, 0.45);
}

.play-icon,
.info-icon {
  font-size: 18px;
}

.meta-strip {
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}

.meta-strip > div {
  display: flex;
  flex-direction: column;
}

.meta-strip dt {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.meta-strip dd {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ---------- Shelf ---------- */
.shelf {
  position: relative;
  margin: 0 auto;
  padding: 0 4vw 60px;
  max-width: var(--max-width);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

.episode-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: transparent;
  transition: transform 0.2s ease;
}

.episode-card:hover {
  transform: translateY(-4px);
}

.episode-button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow-card);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.episode-button:hover {
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.75);
}

.episode-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.2s ease;
}

.episode-button:hover img {
  transform: scale(1.05);
  filter: brightness(1.06);
}

.episode-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 60%,
    rgba(0, 0, 0, 0.85) 100%
  );
  pointer-events: none;
}

.episode-code-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  color: #fff;
}

.play-dot {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 2;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  color: #fff;
  font-size: 16px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.episode-button:hover .play-dot {
  opacity: 1;
  transform: translateY(0);
}

.episode-copy {
  padding: 14px 4px 0;
}

.episode-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.episode-meta span:first-child {
  color: var(--accent);
  font-weight: 700;
}

.episode-copy h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.005em;
}

.episode-copy p {
  margin: 0 0 10px;
  font-size: 13.5px;
  color: #c8c8c8;
  line-height: 1.5;
}

.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 3px 8px;
  border-radius: 999px;
}

/* ---------- Support ---------- */
.support {
  padding: 70px 4vw 90px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background:
    radial-gradient(
      80% 60% at 50% 0%,
      rgba(229, 9, 20, 0.12) 0%,
      rgba(229, 9, 20, 0) 70%
    ),
    var(--bg);
}

.support-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.support h2 {
  margin: 0 0 14px;
  font-size: clamp(24px, 2.4vw, 34px);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.support-text {
  margin: 0 auto 28px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  max-width: 560px;
}

.donate-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 56px 18px 22px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.05s ease;
}

.donate-card:hover {
  border-color: rgba(229, 9, 20, 0.55);
  background: var(--surface-hover);
}

.donate-card:active {
  transform: translateY(1px);
}

.donate-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.donate-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.donate-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.donate-hint {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--dim);
  text-transform: uppercase;
}

.donate-address {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  color: #f5f5f5;
  word-break: break-all;
  line-height: 1.5;
}

.donate-copy {
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #d6d6d6;
  transition: background 0.15s ease, color 0.15s ease, opacity 0.2s ease;
}

.donate-card:hover .donate-copy {
  background: rgba(229, 9, 20, 0.18);
  color: #fff;
}

.donate-card.copied {
  border-color: rgba(26, 143, 60, 0.6);
}

.donate-card.copied .donate-copy {
  background: rgba(26, 143, 60, 0.25);
  color: #6dffa0;
}

.donate-card.copied .donate-hint::after {
  content: " — copied";
  color: #6dffa0;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 32px 4vw 60px;
  text-align: center;
  color: var(--dim);
  font-size: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* ---------- Player modal ---------- */
.player-modal {
  border: none;
  padding: 0;
  background: transparent;
  color: var(--text);
  width: min(1100px, 96vw);
  max-width: 96vw;
  max-height: 96vh;
  border-radius: 8px;
  overflow: visible;
}

.player-modal::backdrop {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
}

.player-shell {
  position: relative;
  background: #0a0a0a;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.close-player {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 22px;
  line-height: 1;
}

.close-player:hover {
  background: rgba(0, 0, 0, 0.95);
}

.player-frame {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
}

.player-frame video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-info {
  padding: 22px 28px 26px;
}

.player-info .eyebrow {
  margin-bottom: 6px;
}

.player-info h2 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
}

.player-info p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  max-width: 760px;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .topbar {
    padding: 12px 4vw;
  }

  .brand img {
    height: 22px;
  }

  .buy-button {
    padding: 7px 14px;
    font-size: 11px;
    gap: 8px;
  }

  .donate-card {
    padding: 16px 50px 16px 18px;
  }

  .donate-address {
    font-size: 12.5px;
  }

  .hero {
    min-height: 80vh;
    padding-bottom: 60px;
  }

  .hero-copy {
    padding-bottom: 12px;
  }

  .meta-strip {
    gap: 18px;
  }

  .meta-strip dd {
    font-size: 16px;
  }

  .episode-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .player-info {
    padding: 18px 18px 22px;
  }
}

/* ---------- Top nav buttons (NFT → PFP) ---------- */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  background: rgba(20, 20, 20, 0.85);
  white-space: nowrap;
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}

.nav-link:hover {
  background: rgba(40, 40, 40, 0.95);
  border-color: rgba(255, 255, 255, 0.45);
}

.nav-link:active { transform: translateY(1px); }

.nav-link-active {
  background: rgba(229, 9, 20, 0.20);
  border-color: rgba(229, 9, 20, 0.60);
}

.nav-link-active:hover {
  background: rgba(229, 9, 20, 0.32);
  border-color: rgba(229, 9, 20, 0.85);
}

/* ===================== PFP page (cinematic premium) ===================== */
.pfp-body {
  background: #050505;
  overflow-x: hidden;
}

.pfp-page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 90px 4vw 30px;
  box-sizing: border-box;
  overflow: hidden;
}

/* --- Background layer (becomes blurred PFP on match) --- */
.pfp-page-bg {
  position: absolute;
  inset: -100px;
  background-color: #050505;
  background-size: cover;
  background-position: center;
  background-image:
    radial-gradient(circle at 25% 20%, rgba(229, 9, 20, 0.25), transparent 55%),
    radial-gradient(circle at 75% 80%, rgba(229, 9, 20, 0.15), transparent 60%),
    radial-gradient(circle at 50% 100%, rgba(120, 0, 10, 0.20), transparent 65%);
  filter: blur(0);
  transform: scale(1.05);
  transition: background-image 0.5s ease, filter 0.5s ease;
  z-index: 0;
  animation: pfp-bg-shift 22s ease-in-out infinite alternate;
}

@keyframes pfp-bg-shift {
  0%   { transform: scale(1.05) translate(0, 0); }
  50%  { transform: scale(1.08) translate(-12px, 8px); }
  100% { transform: scale(1.05) translate(8px, -10px); }
}

.pfp-page-bg-active {
  filter: blur(60px) saturate(1.5) brightness(0.45) contrast(1.0);
  transform: scale(1.18);
  animation: pfp-bg-active-drift 28s ease-in-out infinite alternate;
  opacity: 0.85;
}

@keyframes pfp-bg-active-drift {
  0%   { transform: scale(1.18) translate(0, 0); }
  50%  { transform: scale(1.22) translate(-18px, 12px); }
  100% { transform: scale(1.18) translate(14px, -10px); }
}

/* --- Scrolling token-ID marquee in BG --- */
.pfp-page-marquee {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  pointer-events: none;
  opacity: 0.08;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
}

.pfp-marquee-row {
  white-space: nowrap;
  font-family: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.04em;
  color: #fff;
  line-height: 1;
}

.pfp-marquee-track {
  display: inline-flex;
  animation: pfp-marquee var(--speed, 80s) linear infinite;
  animation-direction: calc(var(--dir, 1) * 1) reverse;
}

.pfp-marquee-row:nth-child(odd) .pfp-marquee-track {
  animation-direction: normal;
}

.pfp-marquee-row:nth-child(even) .pfp-marquee-track {
  animation-direction: reverse;
}

@keyframes pfp-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* --- Overlay gradient for legibility --- */
.pfp-page-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 5, 5, 0.55) 0%, rgba(5, 5, 5, 0.78) 50%, rgba(5, 5, 5, 0.95) 100%),
    radial-gradient(circle at 50% 50%, transparent 0%, rgba(5, 5, 5, 0.55) 75%);
  z-index: 2;
  transition: background 0.6s ease;
}

/* When a PFP is on the BG, slightly lighten the overlay so the image whispers through */
.pfp-page:has(.pfp-page-bg-active) .pfp-page-overlay {
  background:
    linear-gradient(180deg, rgba(5, 5, 5, 0.42) 0%, rgba(5, 5, 5, 0.65) 55%, rgba(5, 5, 5, 0.88) 100%),
    radial-gradient(circle at 50% 45%, transparent 20%, rgba(5, 5, 5, 0.60) 95%);
}

/* --- Subtle film grain --- */
.pfp-page-noise {
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: 0.04;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

/* --- Content stack --- */
.pfp-page-content {
  position: relative;
  z-index: 4;
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: stretch;
  animation: pfp-rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes pfp-rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Intro --- */
.pfp-intro {
  text-align: center;
}

.pfp-kicker {
  margin: 0 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

.pfp-kicker-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(229, 9, 20, 0.85);
  animation: pfp-pulse 1.6s ease-in-out infinite;
}

@keyframes pfp-pulse {
  0%, 100% { opacity: 0.5; transform: scale(0.8); }
  50%      { opacity: 1; transform: scale(1.2); }
}

.pfp-title {
  margin: 0;
  font-family: "Archivo Black", "Helvetica Neue", sans-serif;
  font-size: clamp(46px, 7vw, 84px);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 0.92;
  color: #fff;
  text-transform: uppercase;
  text-shadow:
    0 4px 22px rgba(0, 0, 0, 0.75),
    0 0 60px rgba(229, 9, 20, 0.20);
  background: linear-gradient(180deg, #fff 0%, #c8c8c8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pfp-title-arrow {
  display: inline-block;
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
  text-shadow: 0 0 30px rgba(229, 9, 20, 0.70);
  animation: pfp-arrow-pulse 2.4s ease-in-out infinite;
}

@keyframes pfp-arrow-pulse {
  0%, 100% { transform: translateX(0); opacity: 0.85; }
  50%      { transform: translateX(4px); opacity: 1; }
}

.pfp-sub {
  margin: 14px auto 0;
  max-width: 460px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  line-height: 1.55;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

/* --- Search --- */
.pfp-search {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.pfp-search-field {
  flex: 1;
  display: flex;
  align-items: stretch;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.pfp-search-field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(229, 9, 20, 0.18);
}

.pfp-search-prefix {
  display: inline-flex;
  align-items: center;
  padding: 0 4px 0 16px;
  font-family: "JetBrains Mono", monospace;
  font-size: 16px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.45);
  user-select: none;
}

.pfp-search-field input[type="number"] {
  flex: 1;
  min-width: 0;
  padding: 14px 16px 14px 0;
  background: transparent;
  border: none;
  color: #fff;
  font-family: "JetBrains Mono", monospace;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  outline: none;
  -moz-appearance: textfield;
}

.pfp-search-field input::-webkit-outer-spin-button,
.pfp-search-field input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.pfp-search-field input::placeholder {
  color: rgba(255, 255, 255, 0.30);
  font-weight: 600;
}

.pfp-find {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 26px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--accent-hi) 0%, var(--accent) 100%);
  color: #fff;
  font-family: "Archivo Black", sans-serif;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    0 10px 28px rgba(229, 9, 20, 0.50),
    inset 0 1px 0 rgba(255, 255, 255, 0.20);
  transition: transform 0.05s ease, box-shadow 0.18s ease, filter 0.15s ease;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.pfp-find::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.pfp-find:hover::after {
  transform: translateX(100%);
}

.pfp-find:hover {
  filter: brightness(1.05);
  box-shadow:
    0 14px 36px rgba(229, 9, 20, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.pfp-find:active { transform: translateY(1px); }

.pfp-find-icon {
  display: inline-flex;
  align-items: center;
}

/* --- Canvas (fixed height, dramatic states) --- */
.pfp-canvas {
  position: relative;
  width: 100%;
  max-width: 520px;
  height: 360px;
  margin: 0 auto;
  background:
    linear-gradient(180deg, rgba(26, 26, 26, 0.85) 0%, rgba(15, 15, 15, 0.92) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.70),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

.pfp-canvas-found {
  border-color: rgba(229, 9, 20, 0.40);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.70),
    0 0 60px rgba(229, 9, 20, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.pfp-canvas-warn { border-color: rgba(229, 9, 20, 0.40); }

.pfp-canvas-state {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 22px 24px 20px;
  box-sizing: border-box;
  animation: pfp-state-in 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes pfp-state-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Empty state */
.pfp-canvas-empty .pfp-canvas-glyph {
  color: rgba(255, 255, 255, 0.18);
  animation: pfp-spin-slow 24s linear infinite;
}

@keyframes pfp-spin-slow { to { transform: rotate(360deg); } }

.pfp-canvas-hint {
  margin: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  text-align: center;
}

.pfp-canvas-hint-active { color: rgba(255, 255, 255, 0.75); }

/* Loading state — triple concentric ring */
.pfp-loader {
  position: relative;
  width: 86px;
  height: 86px;
}

.pfp-loader-ring {
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: pfp-loader-spin 1.4s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.pfp-loader-ring:nth-child(1) { inset: 0; animation-duration: 1.2s; }
.pfp-loader-ring:nth-child(2) { inset: 8px; animation-duration: 1.7s; animation-direction: reverse; border-top-color: rgba(229, 9, 20, 0.55); }
.pfp-loader-ring:nth-child(3) { inset: 16px; animation-duration: 1.0s; border-top-color: rgba(255, 255, 255, 0.4); }

@keyframes pfp-loader-spin { to { transform: rotate(360deg); } }

/* Found state */
.pfp-canvas-found-state { gap: 8px; }

.pfp-canvas-kicker {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  animation: pfp-fade-in 0.5s ease 0.1s both;
}

.pfp-canvas-kicker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pfp-pulse 1.2s ease-in-out infinite;
}

.pfp-canvas-id {
  margin: 0 0 4px;
  font-family: "Archivo Black", sans-serif;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #fff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 30px rgba(229, 9, 20, 0.40);
  animation: pfp-fade-in 0.5s ease 0.2s both;
}

@keyframes pfp-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* PFP image with rotating conic glow */
.pfp-canvas-image {
  position: relative;
  width: 150px;
  height: 150px;
  border-radius: 14px;
  animation: pfp-image-pop 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

@keyframes pfp-image-pop {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

.pfp-canvas-image-glow {
  position: absolute;
  inset: -6px;
  border-radius: 18px;
  background: conic-gradient(
    from 0deg,
    var(--accent) 0deg,
    var(--accent-hi) 60deg,
    transparent 120deg,
    transparent 180deg,
    var(--accent) 240deg,
    var(--accent-hi) 300deg,
    transparent 360deg
  );
  filter: blur(14px);
  opacity: 0.85;
  animation: pfp-conic-rotate 4.5s linear infinite;
  z-index: -1;
}

@keyframes pfp-conic-rotate { to { transform: rotate(360deg); } }

.pfp-canvas-image-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

.pfp-canvas-image-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pfp-canvas-actions {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 360px;
  margin-top: 6px;
  animation: pfp-fade-in 0.5s ease 0.35s both;
}

.pfp-action {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  font-family: "Archivo Black", sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.05s ease, filter 0.15s ease, box-shadow 0.18s ease;
  position: relative;
  overflow: hidden;
}

.pfp-action::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.30) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.55s ease;
}

.pfp-action:hover::after { transform: translateX(100%); }

.pfp-action-primary {
  background: linear-gradient(180deg, #fff 0%, #e8e8e8 100%);
  color: #000;
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.50),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.pfp-action-primary:hover { filter: brightness(1.02); }
.pfp-action-primary:active { transform: translateY(1px); }

.pfp-action-secondary {
  background: rgba(60, 60, 60, 0.85);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.10);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.pfp-action-secondary:hover {
  background: rgba(80, 80, 80, 0.95);
  border-color: rgba(255, 255, 255, 0.20);
}

.pfp-action-secondary:active { transform: translateY(1px); }

/* Error states */
.pfp-error-shape {
  color: var(--accent);
  filter: drop-shadow(0 0 24px rgba(229, 9, 20, 0.50));
  animation: pfp-error-bounce 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes pfp-error-bounce {
  0%   { opacity: 0; transform: scale(0.6); }
  60%  { opacity: 1; transform: scale(1.08); }
  100% { transform: scale(1); }
}

.pfp-canvas-error-msg {
  margin: 0;
  font-family: "Archivo Black", sans-serif;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
}

.pfp-canvas-error-sub {
  margin: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.pfp-canvas-error-btn {
  margin-top: 8px;
  flex: 0 0 auto;
  min-width: 160px;
}

/* --- How it works strip --- */
.pfp-howto { width: 100%; }

.pfp-howto-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.pfp-howto-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(15, 15, 15, 0.70);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  min-width: 0;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.pfp-howto-step::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(229, 9, 20, 0.05) 50%, transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pfp-howto-step:hover {
  border-color: rgba(229, 9, 20, 0.35);
  background: rgba(20, 20, 20, 0.85);
}

.pfp-howto-step:hover::before { opacity: 1; }

.pfp-howto-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--accent-hi) 0%, var(--accent) 100%);
  color: #fff;
  font-family: "Archivo Black", sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(229, 9, 20, 0.45);
  position: relative;
  z-index: 1;
}

.pfp-howto-text {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.pfp-howto-text h3 {
  margin: 0;
  font-family: "Archivo Black", sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #fff;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pfp-howto-text p {
  margin: 3px 0 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.50);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pfp-howto-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(229, 9, 20, 0.14);
  border: 1px solid rgba(229, 9, 20, 0.40);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Responsive --- */
@media (max-width: 720px) {
  .pfp-page { padding: 84px 16px 22px; }
  .pfp-page-content { gap: 18px; }
  .pfp-howto-grid { grid-template-columns: 1fr; gap: 8px; }
  .pfp-canvas { height: 380px; }
}

@media (max-width: 480px) {
  .pfp-page { padding: 76px 14px 16px; }
  .pfp-title { font-size: clamp(34px, 11vw, 52px); }
  .pfp-sub { font-size: 13px; }
  .pfp-search { flex-direction: column; gap: 8px; }
  .pfp-find { justify-content: center; width: 100%; }
  .pfp-canvas { height: 400px; }
  .pfp-canvas-image { width: 140px; height: 140px; }
  .pfp-canvas-actions { flex-direction: column; }
  .pfp-marquee-row { font-size: 16px; }
  .nav-link {
    padding: 8px 12px;
    font-size: 11px;
    letter-spacing: 0.06em;
  }
  .topbar-actions { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .pfp-canvas-image-glow,
  .pfp-canvas-empty .pfp-canvas-glyph,
  .pfp-loader-ring,
  .pfp-marquee-track,
  .pfp-page-bg,
  .pfp-arrow-pulse,
  .pfp-kicker-dot,
  .pfp-canvas-kicker-dot { animation: none !important; }
  .pfp-canvas-state, .pfp-page-content { animation: none !important; }
}
