/* ═══════════════════════════════════════════════
   NFTX — NFT Collection Viewer
   Design: Neon-Brutalist Web3 Aesthetic
   ═══════════════════════════════════════════════ */

/* ── CSS VARIABLES ───────────────────────────── */
:root {
  --bg: #0a0a0a;
  --bg2: #0f0f0f;
  --bg3: #141414;
  --card-bg: rgba(16, 16, 20, 0.85);
  --glass: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.07);

  --cyan: #00f0ff;
  --pink: #ff00e5;
  --green: #00ffa3;
  --orange: #ff6b35;
  --text: #eaeaea;
  --text-muted: #666;
  --text-dim: #999;

  --font-display: "Orbitron", monospace;
  --font-body: "Rajdhani", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --r-sm: 8px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  --shadow-cyan:
    0 0 20px rgba(0, 240, 255, 0.3), 0 0 60px rgba(0, 240, 255, 0.1);
  --shadow-pink:
    0 0 20px rgba(255, 0, 229, 0.3), 0 0 60px rgba(255, 0, 229, 0.1);
  --shadow-green: 0 0 20px rgba(0, 255, 163, 0.3);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.6);

  --transition: cubic-bezier(0.4, 0, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── RESET & BASE ─────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  cursor: none;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  animation: bodyFadeIn 0.8s ease forwards;
}

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

a {
  color: inherit;
  text-decoration: none;
}
button {
  cursor: none;
  font-family: inherit;
  border: none;
  background: none;
}
img {
  max-width: 100%;
  display: block;
}
canvas {
  display: block;
}

/* ── SCROLLBAR ────────────────────────────────── */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: var(--bg2);
}
::-webkit-scrollbar-thumb {
  background: var(--cyan);
  border-radius: 2px;
}

/* ── CUSTOM CURSOR ────────────────────────────── */
.cursor-dot {
  position: fixed;
  z-index: 9999;
  width: 6px;
  height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: none;
  mix-blend-mode: screen;
}

.cursor-ring {
  position: fixed;
  z-index: 9998;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(0, 240, 255, 0.5);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition:
    transform 0.12s var(--transition),
    width 0.2s var(--transition),
    height 0.2s var(--transition),
    border-color 0.2s;
}

.cursor-ring.hovering {
  width: 48px;
  height: 48px;
  border-color: var(--pink);
  mix-blend-mode: screen;
}

/* ── PARTICLES CANVAS ─────────────────────────── */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

/* ── NOISE OVERLAY ────────────────────────────── */
.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.4;
}

/* ── TOAST ────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--bg3);
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--cyan);
  border-radius: var(--r-md);
  font-size: 14px;
  font-family: var(--font-mono);
  color: var(--text);
  box-shadow: var(--shadow-card), var(--shadow-cyan);
  pointer-events: auto;
  transform: translateX(120%);
  opacity: 0;
  animation: toastIn 0.4s var(--spring) forwards;
  max-width: 320px;
}

.toast.success {
  border-left-color: var(--green);
}
.toast.error {
  border-left-color: var(--pink);
}
.toast.warn {
  border-left-color: var(--orange);
}

.toast i {
  font-size: 16px;
  flex-shrink: 0;
}
.toast.success i {
  color: var(--green);
}
.toast.error i {
  color: var(--pink);
}
.toast.warn i {
  color: var(--orange);
}
.toast i:not([class*="fa-"]) {
  color: var(--cyan);
}

.toast.out {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes toastOut {
  to {
    transform: translateX(120%);
    opacity: 0;
  }
}

/* ── SITE HEADER ──────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 40px;
  height: 70px;
  display: flex;
  align-items: center;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  transition: all 0.3s var(--transition);
}

.site-header.scrolled {
  background: rgba(10, 10, 10, 0.9);
  border-bottom-color: rgba(0, 240, 255, 0.15);
}

.header-inner {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.1em;
}

.logo-bracket {
  color: var(--cyan);
}
.logo-text {
  color: var(--text);
}
.logo-tag {
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.2em;
  margin-left: 8px;
  padding: 2px 6px;
  border: 1px solid var(--glass-border);
  border-radius: 4px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
  transition:
    color 0.2s,
    text-shadow 0.2s;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--cyan);
}
.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

#hero,
#gallery,
#insights,
#charts {
  scroll-margin-top: 96px;
}

.network-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.network-dot {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

/* ── HERO SECTION ─────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 40px 80px;
  overflow: hidden;
  z-index: 2;
}

/* Grid lines background */
.grid-lines {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.grid-h,
.grid-v {
  position: absolute;
  background: rgba(255, 255, 255, 0.025);
}

.grid-h {
  width: 100%;
  height: 1px;
  left: 0;
}
.grid-h:nth-child(1) {
  top: 33%;
}
.grid-h:nth-child(2) {
  top: 66%;
}

.grid-v {
  height: 100%;
  width: 1px;
  top: 0;
}
.grid-v:nth-child(3) {
  left: 20%;
}
.grid-v:nth-child(4) {
  left: 50%;
}
.grid-v:nth-child(5) {
  left: 80%;
}

/* Floating orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: orbFloat 10s ease-in-out infinite;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.12), transparent 70%);
  top: -10%;
  left: -10%;
  animation-delay: 0s;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 0, 229, 0.1), transparent 70%);
  bottom: -5%;
  right: 5%;
  animation-delay: -4s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(0, 255, 163, 0.08), transparent 70%);
  top: 40%;
  right: 20%;
  animation-delay: -7s;
}

@keyframes orbFloat {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -20px) scale(1.05);
  }
  66% {
    transform: translate(-20px, 15px) scale(0.97);
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 780px;
  width: 100%;
  animation: heroReveal 0.9s var(--spring) 0.2s both;
}

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

.hero-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.eyebrow-line {
  display: block;
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan));
}

.eyebrow-line:last-child {
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.eyebrow-text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--cyan);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 80px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

.title-line {
  display: block;
}

.gradient-text {
  background: linear-gradient(120deg, var(--cyan), var(--pink), var(--green));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s linear infinite;
}

@keyframes gradientShift {
  to {
    background-position: 200% center;
  }
}

.hero-subtitle {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 520px;
  margin: 0 auto 40px;
  font-weight: 400;
  line-height: 1.7;
}

/* ── SEARCH INPUT ─────────────────────────────── */
.search-container {
  display: flex;
  align-items: stretch;
  gap: 0;
  max-width: 640px;
  margin: 0 auto 20px;
  border-radius: var(--r-md);
  overflow: visible;
  position: relative;
}

.search-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-right: none;
  border-radius: var(--r-md) 0 0 var(--r-md);
  padding: 0 16px;
  position: relative;
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}

.search-wrapper:focus-within {
  border-color: rgba(0, 240, 255, 0.4);
  box-shadow: var(--shadow-cyan);
}

.search-icon {
  color: var(--cyan);
  margin-right: 12px;
  font-size: 16px;
  flex-shrink: 0;
}

.search-input {
  width: 100%;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 18px 0;
  z-index: 1;
  position: relative;
}

.input-label {
  position: absolute;
  left: 52px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  pointer-events: none;
  transition: opacity 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 80px);
}

.input-label.hidden {
  opacity: 0;
}

.copy-btn {
  color: var(--text-muted);
  padding: 8px;
  font-size: 14px;
  border-radius: var(--r-sm);
  transition: color 0.2s;
  flex-shrink: 0;
}

.copy-btn:hover {
  color: var(--cyan);
}

.explore-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 28px;
  background: linear-gradient(135deg, var(--cyan), #0088cc);
  color: #000;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.2s var(--spring),
    box-shadow 0.3s;
  white-space: nowrap;
}

.explore-btn:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-cyan);
}

.explore-btn:active {
  transform: scale(0.97);
}

.btn-ripple {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.3) 0%,
    transparent 70%
  );
  transform: scale(0);
  opacity: 0;
  border-radius: inherit;
  transition:
    transform 0.5s,
    opacity 0.5s;
}

.explore-btn:active .btn-ripple {
  transform: scale(2);
  opacity: 0;
  transition: none;
}

/* ── CHAIN SELECT ─────────────────────────────── */
.chain-select {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.chain-select-label {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.chain-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-dim);
  transition: all 0.2s;
  user-select: none;
}

.chain-chip input {
  accent-color: var(--cyan);
}

.chain-chip:hover,
.chain-chip.active {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0, 240, 255, 0.08);
}

/* ── HERO STATS ───────────────────────────────── */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  animation: fadeUp 0.6s var(--spring) both;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 40px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.stat-pill i {
  color: var(--cyan);
  font-size: 14px;
}
.stat-num {
  font-weight: 700;
  color: var(--text);
}
.stat-lbl {
  color: var(--text-muted);
  font-size: 11px;
}

/* ── SCROLL HINT ──────────────────────────────── */
.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.2em;
  animation: fadeUp 1s var(--transition) 1s both;
  z-index: 2;
}

.scroll-arrow {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--cyan), transparent);
  animation: scrollArrow 1.5s ease-in-out infinite;
}

@keyframes scrollArrow {
  0%,
  100% {
    transform: scaleY(1);
    opacity: 1;
  }
  50% {
    transform: scaleY(0.5);
    opacity: 0.3;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px) translateX(-50%);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateX(-50%);
  }
}

/* ── FILTER SECTION ───────────────────────────── */
.filter-section {
  position: sticky;
  top: 70px;
  z-index: 90;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: 14px 40px;
}

.filter-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-sm);
  padding: 8px 14px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.filter-search-wrap:focus-within {
  border-color: rgba(0, 240, 255, 0.3);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
}

.filter-search-wrap i {
  color: var(--text-muted);
  font-size: 13px;
}

.filter-input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  width: 200px;
}

.collection-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}

.chain-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-tag {
  padding: 5px 14px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  transition: all 0.2s;
}

.filter-tag.active,
.filter-tag:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0, 240, 255, 0.08);
}

.view-toggle {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.view-btn {
  padding: 8px 12px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-size: 13px;
  transition: all 0.2s;
}

.view-btn.active,
.view-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0, 240, 255, 0.08);
}

/* ── SECTION COMMON ───────────────────────────── */
.gallery-section,
.charts-section {
  position: relative;
  z-index: 2;
  padding: 80px 40px;
  max-width: 1400px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.4em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.label-line {
  display: block;
  width: 30px;
  height: 1px;
  background: var(--glass-border);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ── EMPTY STATE ──────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 80px 40px;
  text-align: center;
  gap: 16px;
}

.empty-icon {
  font-size: 56px;
  color: var(--text-muted);
  opacity: 0.4;
  animation: emptyFloat 3s ease-in-out infinite;
}

@keyframes emptyFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--text-dim);
}

.empty-state p {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 300px;
  font-family: var(--font-mono);
}

/* ── SKELETON LOADER ──────────────────────────── */
.loading-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.skeleton-card {
  height: 360px;
  background: var(--bg3);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
  animation: skeletonFade 0.4s var(--transition) calc(var(--i) * 0.08s) both;
}

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

.skeleton-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.05) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  from {
    background-position: -200% 0;
  }
  to {
    background-position: 200% 0;
  }
}

/* ── NFT GRID ─────────────────────────────────── */
.nft-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  position: relative;
}

.nft-grid.list-view {
  grid-template-columns: 1fr;
}

/* ── NFT CARD ─────────────────────────────────── */
.nft-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
  cursor: none;
  transition:
    transform 0.35s var(--spring),
    border-color 0.35s,
    box-shadow 0.35s;
  animation: cardReveal 0.6s var(--spring) calc(var(--delay, 0) * 1ms) both;
}

@keyframes cardReveal {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.nft-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(0, 240, 255, 0.05),
    transparent 60%,
    rgba(255, 0, 229, 0.04)
  );
  opacity: 0;
  transition: opacity 0.35s;
  z-index: 1;
  pointer-events: none;
}

.nft-card:hover {
  transform: translateY(-8px) scale(1.015);
  border-color: rgba(0, 240, 255, 0.4);
  box-shadow: var(--shadow-card), var(--shadow-cyan);
}

.nft-card:hover::before {
  opacity: 1;
}

.card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg2);
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--transition);
}

.nft-card:hover .card-img {
  transform: scale(1.07);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 50%);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 12px;
  opacity: 0;
  transition: opacity 0.3s;
}

.nft-card:hover .card-overlay {
  opacity: 1;
}

.card-view-btn {
  padding: 6px 14px;
  background: rgba(0, 240, 255, 0.15);
  border: 1px solid var(--cyan);
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--cyan);
  font-weight: 600;
  transition: background 0.2s;
}

.card-view-btn:hover {
  background: rgba(0, 240, 255, 0.3);
}

.card-collection-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  z-index: 2;
}

.card-chain-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  background: rgba(0, 240, 255, 0.14);
  border: 1px solid rgba(0, 240, 255, 0.28);
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--cyan);
  z-index: 2;
}

.card-body {
  padding: 16px;
  position: relative;
  z-index: 2;
}

.card-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-collection {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}

.card-token {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan);
  opacity: 0.8;
}

/* List view card */
.nft-grid.list-view .nft-card {
  display: grid;
  grid-template-columns: 100px 1fr;
  border-radius: var(--r-md);
}

.nft-grid.list-view .card-img-wrap {
  aspect-ratio: auto;
  height: 100px;
}

/* ── PAGINATION ───────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 48px;
}

.page-btn {
  width: 44px;
  height: 44px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0, 240, 255, 0.08);
}

.page-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.page-info {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  display: flex;
  gap: 6px;
  align-items: center;
}

.page-sep {
  color: var(--text-muted);
}

/* ── CHARTS SECTION ───────────────────────────── */
.charts-section {
  padding-top: 40px;
  border-top: 1px solid var(--glass-border);
}

/* ── INSIGHTS SECTION ─────────────────────────── */
.insights-section {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 40px 30px;
}

.insight-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.metric-card {
  background: linear-gradient(
    145deg,
    rgba(0, 240, 255, 0.08),
    rgba(255, 0, 229, 0.04)
  );
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  padding: 14px;
}

.metric-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.metric-value {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.1;
  color: var(--cyan);
  margin: 4px 0;
}

.metric-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}

.insights-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  margin-bottom: 24px;
}

.insights-grid.secondary {
  grid-template-columns: 1.3fr 1fr;
}

.insight-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  padding: 24px;
}

.insight-card.full-width {
  width: 100%;
}

.insight-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 18px;
}

.insight-title i {
  color: var(--cyan);
}

.chain-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.chain-overview-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  padding: 12px;
}

.chain-overview-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.chain-overview-value {
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--cyan);
}

.chain-overview-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

.table-wrap {
  overflow-x: auto;
}

.collection-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 12px;
}

.collection-table th,
.collection-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--glass-border);
}

.collection-table th {
  color: var(--text-muted);
  font-weight: 500;
}

.collection-table td {
  color: var(--text-dim);
}

.activity-feed {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
}

.activity-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(0, 255, 163, 0.8);
  margin-top: 6px;
}

.activity-title {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
}

.activity-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.trait-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trait-cloud-chip {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  animation: cloudReveal 0.35s var(--spring) both;
}

.trait-cloud-chip.w2 {
  color: var(--cyan);
  border-color: rgba(0, 240, 255, 0.3);
}

.trait-cloud-chip.w3 {
  color: #9dffde;
  border-color: rgba(0, 255, 163, 0.3);
}

.trait-cloud-chip.w4 {
  color: #ffc6f5;
  border-color: rgba(255, 0, 229, 0.35);
}

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

.opportunity-list,
.playbook-list {
  display: grid;
  gap: 10px;
}

.opportunity-item {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-sm);
  padding: 12px;
}

.opportunity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.opportunity-score {
  color: var(--cyan);
}

.opportunity-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  overflow: hidden;
}

.opportunity-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--cyan));
}

.opportunity-meta {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

.playbook-item {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-sm);
  padding: 12px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
}

.playbook-index {
  font-family: var(--font-display);
  color: var(--cyan);
  font-size: 14px;
  line-height: 1;
}

.playbook-item p {
  font-size: 13px;
  color: var(--text-dim);
  font-family: var(--font-body);
  line-height: 1.45;
}

.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 24px;
}

.chart-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}

.chart-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  opacity: 0;
  transition: opacity 0.3s;
}

.chart-card:hover {
  border-color: rgba(0, 240, 255, 0.2);
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.05);
}

.chart-card:hover::before {
  opacity: 1;
}

.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.chart-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chart-title i {
  color: var(--cyan);
}

.chart-badge {
  padding: 3px 10px;
  background: rgba(0, 255, 163, 0.1);
  border: 1px solid rgba(0, 255, 163, 0.25);
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--green);
}

.chart-wrap {
  position: relative;
  height: 280px;
}

/* ── MODAL ────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(5, 5, 8, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.3s var(--transition),
    backdrop-filter 0.3s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: #0d0d10;
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: var(--r-xl);
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.7),
    var(--shadow-cyan);
  transform: scale(0.88) translateY(20px);
  opacity: 0;
  transition:
    transform 0.45s var(--spring),
    opacity 0.35s;
}

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

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
  width: 36px;
  height: 36px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.modal-close:hover {
  background: rgba(255, 0, 229, 0.15);
  border-color: var(--pink);
  color: var(--pink);
  transform: rotate(90deg);
}

.modal-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.modal-left {
  padding: 32px;
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-img-wrap {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--bg2);
}

.modal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-img-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08) 0%,
    transparent 50%,
    rgba(0, 240, 255, 0.04) 100%
  );
  pointer-events: none;
}

.modal-img-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-token-id {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--cyan);
}

.modal-ext-link {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.modal-ext-link:hover {
  color: var(--cyan);
}

.modal-right {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.modal-collection {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.modal-name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 24px;
}

.modal-divider {
  height: 1px;
  background: var(--glass-border);
  margin-bottom: 24px;
}

.modal-traits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 28px;
  flex: 1;
}

.trait-item {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.trait-item:hover {
  border-color: rgba(0, 240, 255, 0.2);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.08);
}

.trait-type {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.trait-value {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.trait-rarity {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--cyan);
  margin-top: 2px;
}

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

.modal-action-btn {
  flex: 1;
  padding: 12px;
  border-radius: var(--r-md);
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.1em;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.modal-action-btn.primary {
  background: linear-gradient(135deg, var(--cyan), #0088cc);
  color: #000;
}

.modal-action-btn.primary:hover {
  box-shadow: var(--shadow-cyan);
  transform: translateY(-1px);
}

.modal-action-btn.secondary {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
}

.modal-action-btn.secondary:hover {
  border-color: var(--pink);
  color: var(--pink);
}

/* ── SITE FOOTER ──────────────────────────────── */
.site-footer {
  position: relative;
  z-index: 2;
  padding: 40px;
  border-top: 1px solid var(--glass-border);
  margin-top: 60px;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dim);
}

.footer-copy {
  flex: 1;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 16px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--cyan);
}

/* ── SCROLL REVEAL ────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.7s var(--transition),
    transform 0.7s var(--transition);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── SPINNER ──────────────────────────────────── */
.spinner {
  width: 40px;
  height: 40px;
  border: 2px solid var(--glass-border);
  border-top-color: var(--cyan);
  border-right-color: var(--pink);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ── RESPONSIVE ───────────────────────────────── */
@media (max-width: 900px) {
  .site-header {
    height: auto;
    padding: 10px 20px;
  }
  .header-inner {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px 14px;
  }
  .header-nav {
    display: flex;
    width: 100%;
    order: 3;
    justify-content: center;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .header-nav::-webkit-scrollbar {
    display: none;
  }
  .nav-link {
    font-size: 10px;
    white-space: nowrap;
  }
  .network-badge {
    margin-left: auto;
    font-size: 11px;
    padding: 5px 10px;
  }
  .hero {
    padding: 130px 20px 60px;
  }
  .search-container {
    flex-direction: column;
  }
  .search-wrapper {
    border-right: 1px solid var(--glass-border);
    border-radius: var(--r-md);
  }
  .explore-btn {
    border-radius: var(--r-md);
    padding: 16px 28px;
    justify-content: center;
  }
  .gallery-section,
  .charts-section {
    padding: 48px 20px;
  }
  .filter-section {
    padding: 12px 20px;
  }
  .charts-grid {
    grid-template-columns: 1fr;
  }
  .insights-section {
    padding: 10px 20px 24px;
  }
  .insight-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .insights-grid {
    grid-template-columns: 1fr;
  }
  .insights-grid.secondary {
    grid-template-columns: 1fr;
  }
  .modal-inner {
    grid-template-columns: 1fr;
  }
  .modal-left {
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
  }
  .nft-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

@media (max-width: 480px) {
  .site-header {
    padding: 8px 12px;
  }
  .header-nav {
    justify-content: flex-start;
    gap: 14px;
  }
  .network-badge {
    display: none;
  }
  .hero-title {
    font-size: 36px;
  }
  .nft-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .insight-metrics {
    grid-template-columns: 1fr;
  }
  .modal-traits {
    grid-template-columns: 1fr;
  }
  .toast-container {
    bottom: 16px;
    right: 16px;
    left: 16px;
  }
  .toast {
    max-width: 100%;
  }
}

/* ── UTILITY ──────────────────────────────────── */
.hidden {
  display: none !important;
}

/* Number counter animation */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.counting {
  animation: countUp 0.4s var(--spring) both;
  display: inline-block;
}
