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

:root {
  --bg: #050208;
  --bg-card: #0d0618;
  --bg-elevated: #140b22;
  --purple: #7b2fff;
  --purple-light: #a855f7;
  --purple-glow: rgba(123, 47, 255, 0.4);
  --red: #dc2626;
  --red-heart: #ef4444;
  --gold: #fbbf24;
  --text: #e8e0f0;
  --text-muted: #9b8fb0;
  --border: rgba(123, 47, 255, 0.2);
  --solana: #14f195;
  --font-display: Georgia, 'Times New Roman', serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

#darkness-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

a {
  color: var(--purple-light);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--gold);
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: rgba(5, 2, 8, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}

.nav-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--purple);
  object-fit: cover;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  background: linear-gradient(135deg, var(--purple), var(--red));
  color: white !important;
  padding: 8px 20px;
  border-radius: 999px;
  font-weight: 600 !important;
}

.nav-cta:hover {
  color: white !important;
  filter: brightness(1.15);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: 0.3s;
}

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
  padding: 120px 48px 80px;
  max-width: 1400px;
  margin: 0 auto;
}

.hero-glow {
  position: absolute;
  top: 20%;
  left: 30%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--purple-glow) 0%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(20, 241, 149, 0.1);
  border: 1px solid rgba(20, 241, 149, 0.3);
  color: var(--solana);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  background: linear-gradient(135deg, #fff 0%, var(--purple-light) 50%, var(--red-heart) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
}

.hero-title-sub {
  display: block;
  font-size: 0.45em;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  -webkit-text-fill-color: var(--text-muted);
  background: none;
}

.hero-tagline {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 480px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, filter 0.2s, box-shadow 0.2s;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple) 0%, #5b1fcc 50%, var(--red) 100%);
  color: white;
  box-shadow: 0 4px 24px var(--purple-glow);
}

.btn-primary:hover {
  filter: brightness(1.1);
  color: white;
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--purple);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--purple-light);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1rem;
}

.btn-heart {
  color: var(--red-heart);
}

.hero-stats {
  display: flex;
  gap: 40px;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--purple-light);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image-ring {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 2px solid var(--border);
  animation: ring-pulse 4s ease-in-out infinite;
}

.hero-image-ring::before {
  content: '';
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  border: 1px solid rgba(123, 47, 255, 0.1);
}

@keyframes ring-pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.05); opacity: 1; }
}

.hero-image {
  width: 360px;
  height: 360px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--purple);
  box-shadow: 0 0 60px var(--purple-glow), 0 0 120px rgba(220, 38, 38, 0.2);
  animation: float 6s ease-in-out infinite;
}

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

.hero-float {
  position: absolute;
  color: var(--red-heart);
  font-size: 1.5rem;
  opacity: 0.6;
  animation: float-heart 5s ease-in-out infinite;
}

.ansem-float-1 { top: 10%; left: 10%; animation-delay: 0s; }
.ansem-float-2 { bottom: 20%; right: 5%; animation-delay: 1.5s; font-size: 2rem; }
.ansem-float-3 { top: 40%; right: 0; animation-delay: 3s; font-size: 1rem; }

@keyframes float-heart {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.4; }
  50% { transform: translateY(-20px) rotate(15deg); opacity: 0.8; }
}

/* Sections */
.section {
  position: relative;
  z-index: 1;
  padding: 100px 0;
}

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

.section-tag {
  display: inline-block;
  color: var(--purple-light);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 12px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
}

/* Tweet */
.tweet-wrapper {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: start;
}

.tweet-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.tweet-card:hover {
  border-color: var(--purple);
  box-shadow: 0 8px 40px rgba(123, 47, 255, 0.15);
}

.tweet-header {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
}

.tweet-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid var(--border);
}

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

.tweet-meta {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.tweet-names strong {
  display: block;
  font-size: 1rem;
}

.tweet-handle {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.tweet-link {
  font-size: 0.85rem;
  white-space: nowrap;
}

.tweet-body p {
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.tweet-text {
  color: var(--text) !important;
  font-size: 1.05rem !important;
  line-height: 1.7 !important;
}

.tweet-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.tweet-footer time {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.tweet-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.tweet-stats span {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.tweet-stats strong {
  color: var(--text);
}

.origin-aside {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.origin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.origin-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: var(--purple-light);
}

.dual-ansem {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ansem-type {
  padding: 14px;
  border-radius: 12px;
  background: var(--bg-elevated);
}

.ansem-type.wise {
  border-left: 3px solid var(--gold);
}

.ansem-type.dark {
  border-left: 3px solid var(--red-heart);
}

.ansem-type-icon {
  font-size: 1.2rem;
  margin-right: 8px;
}

.ansem-type strong {
  display: block;
  margin-bottom: 4px;
}

.ansem-type p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.ansem-divider {
  text-align: center;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
}

.source-links {
  list-style: none;
}

.source-links li {
  margin-bottom: 10px;
}

.source-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border-radius: 8px;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.source-links a:hover {
  background: rgba(123, 47, 255, 0.15);
}

/* Lore */
.lore {
  background: linear-gradient(180deg, transparent 0%, rgba(123, 47, 255, 0.03) 50%, transparent 100%);
}

.lore-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.lore-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  transition: transform 0.3s, border-color 0.3s;
}

.lore-card:hover {
  transform: translateY(-4px);
  border-color: var(--purple);
}

.lore-card.featured {
  background: linear-gradient(135deg, rgba(123, 47, 255, 0.15), rgba(220, 38, 38, 0.1));
  border-color: var(--purple);
}

.lore-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: var(--purple);
  opacity: 0.4;
  margin-bottom: 12px;
}

.lore-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.lore-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.lore-quote {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  padding: 40px;
  border-left: 3px solid var(--purple);
  background: var(--bg-card);
  border-radius: 0 16px 16px 0;
}

.lore-quote p {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.8;
  margin-bottom: 16px;
}

.lore-quote cite {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-style: normal;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.gallery-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1;
  border: 1px solid var(--border);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.gallery-item:hover {
  transform: scale(1.03);
  border-color: var(--purple);
  box-shadow: 0 12px 40px var(--purple-glow);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 2, 8, 0.9) 0%, transparent 50%);
  display: flex;
  align-items: flex-end;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}

.gallery-item-caption {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(5, 2, 8, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 90vw;
  max-height: 75vh;
  border-radius: 12px;
  border: 2px solid var(--purple);
  box-shadow: 0 0 60px var(--purple-glow);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.lightbox-close:hover {
  color: var(--red-heart);
}

#lightbox-caption {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Buy */
.buy-card {
  text-align: center;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 60px 40px;
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.buy-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, var(--purple-glow) 0%, transparent 50%);
  opacity: 0.3;
  pointer-events: none;
}

.buy-logo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid var(--purple);
  margin: 0 auto 24px;
  object-fit: cover;
}

.buy-card h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin-bottom: 12px;
}

.buy-card > p {
  color: var(--text-muted);
  margin-bottom: 32px;
}

.buy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 32px;
}

.contract-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  max-width: 500px;
  margin: 0 auto;
}

.contract-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.contract-address {
  flex: 1;
  font-size: 0.85rem;
  color: var(--purple-light);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-btn:hover {
  border-color: var(--purple);
  color: var(--text);
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 48px 0;
}

.footer-inner {
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.footer-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.footer-disclaimer {
  color: var(--text-muted);
  font-size: 0.8rem;
  max-width: 600px;
  margin: 0 auto 20px;
}

.footer-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-bottom: 20px;
}

.footer-links a {
  font-size: 0.9rem;
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 100px 24px 60px;
  }

  .hero-content {
    order: 2;
  }

  .hero-visual {
    order: 1;
  }

  .hero-tagline {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-image {
    width: 280px;
    height: 280px;
  }

  .hero-image-ring {
    width: 320px;
    height: 320px;
  }

  .tweet-wrapper {
    grid-template-columns: 1fr;
  }

  .lore-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(5, 2, 8, 0.98);
    padding: 20px;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .buy-card {
    padding: 40px 20px;
  }

  .contract-box {
    flex-wrap: wrap;
  }
}