:root {
  --bg: #000000;
  --panel: #0b0b0b;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.22);
  --text: #ffffff;
  --muted: #8a8a8a;
  --muted-2: #5a5a5a;
  --radius: 16px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.modal-open { overflow: hidden; }

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(700px 420px at 50% -8%, rgba(255, 255, 255, 0.10), transparent 70%);
  animation: fadeIn 1.4s ease .1s both;
}

.grid-lines {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 60px 60px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 15%, transparent 72%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000 15%, transparent 72%);
  animation: fadeIn 1.4s ease .2s both;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  animation: fadeUp .8s cubic-bezier(.2, .8, .2, 1) both;
}

.nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.logo span {
  color: var(--muted);
  font-weight: 500;
}

.nav-right { display: flex; gap: 6px; }

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color .2s, background .2s, border-color .2s;
}

.nav-link:hover {
  color: #fff;
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.04);
}

main {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  animation: fadeUp 1s cubic-bezier(.2, .8, .2, 1) .12s both;
}

.hero {
  padding: 96px 0 72px;
  text-align: center;
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(38px, 7vw, 74px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.045em;
  background: linear-gradient(180deg, #ffffff 25%, #8a8a8a 135%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  max-width: 540px;
  margin: 0 auto;
  font-size: 16px;
  color: var(--muted);
}

.stats {
  display: flex;
  justify-content: center;
  gap: 56px;
  margin-top: 54px;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat strong {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.stat span {
  margin-top: 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--muted-2);
}

.listings { padding: 24px 0 80px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.section-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.section-sub {
  font-size: 12px;
  color: var(--muted-2);
  letter-spacing: 0.02em;
}

.grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 18px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  overflow: hidden;
  cursor: pointer;
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), border-color .25s, box-shadow .25s;
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(420px 130px at 50% -20%, rgba(255, 255, 255, 0.10), transparent 70%);
  opacity: 0;
  transition: opacity .3s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55);
}

.card:hover::after { opacity: 1; }

.card.sold {
  opacity: 0.45;
  cursor: not-allowed;
}

.card.sold:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border);
}

.card.sold:hover::after { opacity: 0; }

.cape-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0 4px;
  min-height: 108px;
}

.cape-visual::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 110px;
  height: 110px;
  transform: translate(-50%, -50%);
  background: var(--cape-glow, #ffffff);
  opacity: 0.15;
  border-radius: 50%;
  filter: blur(42px);
  pointer-events: none;
  transition: opacity .35s;
}

.card:hover .cape-visual::before { opacity: 0.28; }

.card.sold .cape-visual::before { opacity: 0.08; }

.cape-svg {
  position: relative;
  width: 72px;
  height: auto;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.55));
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}

.cape-img {
  position: relative;
  width: 92px;
  height: 92px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.55));
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}

.card:hover .cape-svg,
.card:hover .cape-img {
  transform: translateY(-4px) scale(1.05);
}

.card.sold:hover .cape-svg,
.card.sold:hover .cape-img {
  transform: none;
}

.cape-visual-lg {
  padding: 20px 0 14px;
  min-height: 190px;
}

.cape-visual-lg::before {
  width: 180px;
  height: 180px;
  opacity: 0.2;
  filter: blur(60px);
}

.cape-visual-lg .cape-svg {
  width: 122px;
}

.cape-visual-lg .cape-img {
  width: 168px;
  height: 168px;
}

.card-info {
  display: flex;
  justify-content: center;
}

.card-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  word-break: break-word;
  line-height: 1.3;
}

.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}

.price {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s, opacity .2s;
}

.btn.primary {
  background: #fff;
  color: #000;
}

.btn.primary:hover { background: #d8d8d8; }

.btn.primary:disabled {
  background: #2a2a2a;
  color: #666;
  cursor: not-allowed;
}

.card .btn.primary {
  padding: 8px 14px;
  font-size: 13px;
}

.btn.ghost {
  background: transparent;
  color: #fff;
  border-color: var(--border-strong);
}

.btn.ghost:hover { background: rgba(255, 255, 255, 0.07); }

.btn-block {
  width: 100%;
  padding: 14px 18px;
  font-size: 15px;
  border-radius: 12px;
}

.contact-strip {
  padding: 64px 0;
  margin-bottom: 64px;
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.contact-strip h3 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.contact-strip p {
  margin: 0 0 26px;
  font-size: 14px;
  color: var(--muted);
}

.contact-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

footer {
  position: relative;
  z-index: 1;
  padding: 32px 24px;
  text-align: center;
  border-top: 1px solid var(--border);
  animation: fadeUp .9s cubic-bezier(.2, .8, .2, 1) 1s both;
}

footer p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted-2);
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}

.overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 34px 28px 28px;
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  opacity: 0;
  transform: translateY(12px) scale(.98);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .25s ease;
}

.overlay.open .modal {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal::-webkit-scrollbar { width: 6px; }
.modal::-webkit-scrollbar-track { background: transparent; }
.modal::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 99px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: background .2s, color .2s, transform .2s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  transform: rotate(90deg);
}

.modal-head h3 {
  margin: 8px 0 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.035em;
  word-break: break-word;
}

.modal-head.center { text-align: center; }

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted-2);
}

.modal-price {
  margin-top: 6px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.modal-text {
  margin: 14px 0 20px;
  font-size: 14px;
  color: var(--muted);
}

.modal-text.center { text-align: center; }

.modal-text strong { color: #fff; font-weight: 600; }

.info-box {
  padding: 4px 14px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}

.info-row:last-child { border-bottom: none; }

.info-row span { color: var(--muted); }

.info-row strong { color: #fff; font-weight: 600; }

.email-input {
  width: 100%;
  padding: 14px 18px;
  margin-bottom: 14px;
  font-family: inherit;
  font-size: 15px;
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  transition: border-color .2s, background .2s;
}

.email-input::placeholder {
  color: var(--muted-2);
}

.email-input:focus {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.07);
}

.check {
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: #000;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.06);
  animation: popCheck .5s cubic-bezier(.2, .85, .25, 1) both;
}

@keyframes popCheck {
  0% { transform: scale(.4); opacity: 0; }
  60% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.modal-actions .btn { flex: 1; }

.modal-note {
  margin: 16px 0 0;
  font-size: 12px;
  color: var(--muted-2);
  text-align: center;
  line-height: 1.55;
}

.contact-list {
  display: grid;
  gap: 10px;
  margin-bottom: 4px;
}

.contact-card {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  font-family: inherit;
  font-size: 14px;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}

.contact-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-strong);
}

.contact-platform { font-weight: 600; }

.contact-handle {
  font-size: 13px;
  color: var(--muted);
}

.mono { font-family: var(--mono); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 200;
  padding: 11px 20px;
  font-size: 13px;
  font-weight: 600;
  color: #000;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 20px);
  transition: opacity .3s, transform .3s;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1080px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cape-visual { min-height: 118px; }
  .cape-svg { width: 82px; }
  .cape-img { width: 104px; height: 104px; }
}

@media (max-width: 560px) {
  .nav { padding: 14px 18px; }
  .nav-link { padding: 7px 10px; font-size: 13px; }
  main { padding: 0 18px; }
  .hero { padding: 72px 0 56px; }
  .stats { gap: 34px; }
  .section-head { gap: 6px; }
  .grid { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  .cape-visual { min-height: 128px; }
  .cape-svg { width: 92px; }
  .cape-img { width: 118px; height: 118px; }
  .card-name { font-size: 16px; }
  .modal { padding: 30px 20px 24px; border-radius: 16px; }
  .overlay { padding: 14px; }
  .cape-visual-lg { min-height: 160px; }
  .cape-visual-lg .cape-svg { width: 108px; }
  .cape-visual-lg .cape-img { width: 144px; height: 144px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}