/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #0a0a0f;
  --bg-card:    #111118;
  --bg-card2:   #16161f;
  --border:     #1e1e2e;
  --border-h:   #3a3a5c;
  --purple:     #7c3aed;
  --purple-l:   #a855f7;
  --blue:       #3b82f6;
  --cyan:       #06b6d4;
  --pink:       #ec4899;
  --text:       #f0f0f8;
  --text-muted: #8888aa;
  --radius:     16px;
  --radius-sm:  10px;
  --shadow:     0 8px 32px rgba(0,0,0,0.4);
  --trans:      0.25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.hidden { display: none !important; }

.gradient-text {
  background: linear-gradient(135deg, var(--purple-l), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   Header
   ============================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.logo-icon {
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--purple-l), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--trans);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: var(--bg-card2);
}

.opensea-link {
  color: #2081e2 !important;
  background: rgba(32, 129, 226, 0.08) !important;
  border: 1px solid rgba(32, 129, 226, 0.2) !important;
}
.opensea-link:hover {
  background: rgba(32, 129, 226, 0.18) !important;
  border-color: rgba(32, 129, 226, 0.4) !important;
}

.nav-social {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--text-muted);
  transition: all var(--trans);
}
.social-link:hover {
  background: var(--bg-card2);
  color: var(--text);
}
.social-link[title*="Twitter"]:hover,
.social-link[title*="X ("]:hover { color: #fff; }
.social-link[title*="Instagram"]:hover { color: #e1306c; }
.social-link[title*="Discord"]:hover { color: #5865f2; }

.social-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.menu-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--trans);
}

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative;
  padding: 52px 0 64px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 30% 50%, rgba(124, 58, 237, 0.15) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 70% 30%, rgba(6, 182, 212, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

/* Two-column layout */
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 48px;
  align-items: center;
  position: relative;
}

.hero-content {
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: var(--purple-l);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 24px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 36px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 36px;
}

.stat { text-align: center; }
.stat-value {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--purple-l), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ============================================
   Hero Chart
   ============================================ */
.hero-chart {
  position: relative;
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(130, 71, 229, 0.15);
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  gap: 12px;
}

.chart-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chart-coin-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
}
.chart-coin-icon svg { width: 100%; height: 100%; }

.chart-coin-name {
  font-size: 0.95rem;
  font-weight: 700;
}
.chart-coin-name span {
  font-size: 0.72rem;
  background: rgba(130, 71, 229, 0.2);
  color: #a855f7;
  border-radius: 4px;
  padding: 2px 6px;
  font-weight: 600;
  margin-left: 4px;
  vertical-align: middle;
}

.chart-coin-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.chart-price-wrap { text-align: right; }

.chart-price {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.chart-change {
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 2px;
}
.chart-change.up   { color: #22c55e; }
.chart-change.down { color: #ef4444; }

.tradingview-wrap {
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--trans);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--purple-l));
  color: #fff;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(124, 58, 237, 0.6);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-h);
}
.btn-outline:hover {
  border-color: var(--purple-l);
  color: var(--purple-l);
  transform: translateY(-2px);
}

/* ============================================
   Filters
   ============================================ */
.filters-section {
  padding: 20px 0 12px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 68px;
  z-index: 50;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(20px);
}

.filters-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
  pointer-events: none;
}
.search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
  padding: 10px 14px 10px 38px;
  outline: none;
  transition: border-color var(--trans);
}
.search-input:focus { border-color: var(--purple-l); }
.search-input::placeholder { color: var(--text-muted); }

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  padding: 7px 16px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all var(--trans);
}
.pill:hover { border-color: var(--border-h); color: var(--text); }
.pill.active {
  background: linear-gradient(135deg, var(--purple), var(--purple-l));
  border-color: transparent;
  color: #fff;
}

.sort-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
  padding: 10px 14px;
  outline: none;
  cursor: pointer;
  transition: border-color var(--trans);
}
.sort-select:focus { border-color: var(--purple-l); }

/* ============================================
   NFT Grid
   ============================================ */
.main { padding: 40px 0 80px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

/* ============================================
   NFT Card
   ============================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--trans);
  cursor: pointer;
  position: relative;
}

.card:hover {
  border-color: var(--border-h);
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 0 1px rgba(124, 58, 237, 0.2);
}

.card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-card2);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card-media img { transform: scale(1.06); }

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-h);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.card-like {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: opacity var(--trans);
}
.card:hover .card-like { opacity: 1; }

.card-body {
  padding: 16px;
}

.card-collection {
  font-size: 0.72rem;
  color: var(--purple-l);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.card-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 4px;
}

.card-price-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card-price {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 1rem;
  font-weight: 700;
}

.eth-icon {
  width: 14px;
  height: 14px;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

.card-price-usd {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.card-btn {
  background: linear-gradient(135deg, var(--purple), var(--purple-l));
  color: #fff;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  transition: all var(--trans);
  flex-shrink: 0;
}
.card-btn:hover {
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.5);
  transform: translateY(-1px);
}

/* Skeleton loader */
.card-skeleton .card-media {
  background: linear-gradient(90deg, var(--bg-card2) 25%, #1a1a28 50%, var(--bg-card2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.skeleton-line {
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--bg-card2) 25%, #1a1a28 50%, var(--bg-card2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  margin-bottom: 8px;
}
.skeleton-line.w80 { width: 80%; }
.skeleton-line.w60 { width: 60%; }
.skeleton-line.w40 { width: 40%; }

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================
   Empty & Loader
   ============================================ */
.empty-state {
  text-align: center;
  padding: 80px 0;
  color: var(--text-muted);
}
.empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.3;
}

.loader {
  text-align: center;
  padding: 80px 0;
  color: var(--text-muted);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--purple-l);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   About
   ============================================ */
.about {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 80px 0;
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.about-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.about-card-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.about-stat {
  padding: 20px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
}
.about-stat span {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.about-stat strong {
  font-size: 1.1rem;
  font-weight: 700;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1rem;
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 16px;
}
.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color var(--trans);
}
.footer-links a:hover { color: var(--purple-l); }

/* ============================================
   Modal
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-h);
  border-radius: 20px;
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.25s ease;
  scrollbar-width: thin;
  scrollbar-color: var(--border-h) transparent;
}

.modal-close {
  position: sticky;
  top: 0;
  float: right;
  margin: 16px 16px 0 0;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  z-index: 1;
  transition: all var(--trans);
}
.modal-close:hover { color: var(--text); border-color: var(--border-h); }

.modal-inner {
  padding: 24px 32px 32px;
  clear: both;
}

.modal-img {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 24px;
  aspect-ratio: 1/1;
  object-fit: cover;
}

.modal-collection {
  font-size: 0.75rem;
  color: var(--purple-l);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.modal-name {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.modal-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
  line-height: 1.7;
}

.modal-attrs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.modal-attr {
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}
.modal-attr-type {
  font-size: 0.65rem;
  color: var(--purple-l);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.modal-attr-value {
  font-size: 0.85rem;
  font-weight: 600;
}

.modal-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 16px;
}

.modal-price-info {}
.modal-price-label { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 4px; }
.modal-price-eth {
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
}
.modal-price-usd { font-size: 0.8rem; color: var(--text-muted); }

.modal-actions {
  display: flex;
  gap: 12px;
}
.modal-actions .btn { flex: 1; justify-content: center; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .nav { display: none; }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    gap: 4px;
  }
  .menu-toggle { display: flex; }

  .hero { padding: 32px 0 40px; }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hero-chart { order: -1; } /* chart on top on mobile */
  .hero-stats { gap: 16px; }
  .stat-value { font-size: 1.4rem; }

  .filters-bar { gap: 12px; }
  .search-wrap { max-width: 100%; }

  .about-inner { grid-template-columns: 1fr; gap: 40px; }

  .modal-inner { padding: 16px 20px 24px; }
  .modal-attrs { grid-template-columns: repeat(2, 1fr); }

  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2.2rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
  .modal-actions { flex-direction: column; }
}
