@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@300;400;500;600;700&family=Orbitron:wght@400;500;600;700&display=swap');

:root {
  --color-primary: #8b5cf6;
  --color-secondary: #a78bfa;
  --color-cta: #fbbf24;
  --color-background: #0f0f23;
  --color-text: #f8fafc;
  --color-muted: #9aa3b2;
  --color-surface: #13132b;
  --color-surface-2: #171733;
  --color-border: #232347;
  --pixel-size: 6px;
  --pixel-line: rgba(255, 255, 255, 0.05);
  --pixel-line-strong: rgba(167, 139, 250, 0.25);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.45);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.5);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: 'Exo 2', sans-serif;
}

body {
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(139, 92, 246, 0.18), transparent 45%),
    radial-gradient(circle at 80% 10%, rgba(251, 191, 36, 0.12), transparent 40%),
    radial-gradient(circle at 70% 80%, rgba(139, 92, 246, 0.18), transparent 45%),
    linear-gradient(160deg, #0b0b1a 0%, #0f0f23 45%, #0c0c1a 100%);
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(transparent 0 1px, rgba(255, 255, 255, 0.02) 1px 2px) 0 0 / 18px 18px;
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, var(--pixel-line) 0 1px, transparent 1px var(--pixel-size)),
    repeating-linear-gradient(90deg, var(--pixel-line) 0 1px, transparent 1px var(--pixel-size));
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}

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

h1,
h2,
h3,
h4 {
  font-family: 'Orbitron', sans-serif;
  margin: 0 0 12px;
  letter-spacing: 0.5px;
}

p {
  margin: 0 0 16px;
  color: var(--color-muted);
  line-height: 1.6;
}

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  margin-top: 0;
  background: rgba(15, 15, 35, 0.92);
  border-bottom: 1px solid rgba(139, 92, 246, 0.25);
  backdrop-filter: blur(10px);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  position: relative;
  overflow: visible;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-family: 'Orbitron', sans-serif;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: transparent url("assets/logo.png") center / contain no-repeat;
  transition: transform 200ms ease;
}

.brand:hover .brand-icon {
  transform: translateY(-1px) rotate(-4deg) scale(1.04);
}

.nav-links {
  display: flex;
  gap: 18px;
  flex-wrap: nowrap;
  font-size: 14px;
}

.nav-links a {
  color: var(--color-muted);
  padding: 6px 10px;
  border-radius: 999px;
  transition: color 200ms ease, background 200ms ease;
  cursor: pointer;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--color-text);
  background: rgba(139, 92, 246, 0.18);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background 200ms ease, border-color 200ms ease;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  background: var(--color-text);
  border-radius: 999px;
  transition: transform 200ms ease, opacity 200ms ease;
}

.nav-toggle[aria-expanded=\"true\"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded=\"true\"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded=\"true\"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  padding: 12px;
  border-radius: 16px;
  background: rgba(19, 19, 43, 0.92);
  border: 1px solid rgba(139, 92, 246, 0.3);
  box-shadow: var(--shadow-lg);
  gap: 8px;
  width: min(240px, 90vw);
  z-index: 60;
  backdrop-filter: blur(12px);
  pointer-events: auto;
}

.mobile-menu a {
  color: var(--color-muted);
  padding: 10px 12px;
  border-radius: 10px;
  transition: color 200ms ease, background 200ms ease;
}

.mobile-menu a:hover,
.mobile-menu a.active {
  color: var(--color-text);
  background: rgba(139, 92, 246, 0.18);
}

.mobile-menu.open {
  display: grid;
}

.navbar.nav-compact .nav-links {
  display: none;
}

.navbar.nav-compact .nav-toggle {
  display: flex;
  margin-left: auto;
}

.nav-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  border: none;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--color-cta);
  color: #111827;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.35);
}

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

.btn-secondary {
  background: rgba(139, 92, 246, 0.15);
  color: var(--color-text);
  border: 1px solid rgba(139, 92, 246, 0.4);
}

.btn-secondary:hover {
  background: rgba(139, 92, 246, 0.25);
}

.btn-ghost {
  background: transparent;
  color: var(--color-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-ghost:hover {
  color: var(--color-text);
  border-color: rgba(255, 255, 255, 0.2);
}

main {
  padding: var(--space-3xl) 0 var(--space-3xl);
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-2xl);
  align-items: center;
}

.hero-title {
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 16px;
  max-width: 500px;
}

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

.egg-orb {
  width: min(360px, 70vw);
  aspect-ratio: 3 / 4;
  border-radius: 55% 55% 45% 45% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 35% 30%, rgba(251, 191, 36, 0.75), transparent 55%),
    radial-gradient(circle at 60% 70%, rgba(139, 92, 246, 0.9), transparent 60%),
    linear-gradient(160deg, rgba(20, 20, 50, 0.9), rgba(10, 10, 30, 0.9));
  border: 1px solid rgba(251, 191, 36, 0.4);
  box-shadow: 0 0 40px rgba(139, 92, 246, 0.45), inset 0 0 30px rgba(251, 191, 36, 0.2);
  position: relative;
  margin: 0 auto;
  animation: eggPulse 5s ease-in-out infinite;
}

.egg-orb::before,
.egg-orb::after {
  content: '';
  position: absolute;
  inset: 12% 10% 8% 10%;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.08);
  filter: blur(0.5px);
}

.egg-orb::after {
  inset: 22% 20% 18% 20%;
  border: 1px dashed rgba(139, 92, 246, 0.35);
}

@keyframes eggPulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-6px) scale(1.02);
  }
}

.section {
  margin-top: var(--space-3xl);
}

.section-title {
  font-size: clamp(24px, 3vw, 36px);
}

.card-grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(139, 92, 246, 0.4);
}

.card-title {
  font-size: 18px;
  margin-bottom: 8px;
}

.card-meta {
  font-size: 13px;
  color: var(--color-muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(139, 92, 246, 0.18);
  color: var(--color-text);
  border: 1px solid rgba(139, 92, 246, 0.4);
}

.list {
  display: grid;
  gap: 12px;
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}

.list-item strong {
  font-size: 14px;
}

.stat-grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.stat {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  position: relative;
  overflow: hidden;
}

.stat h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.stat p {
  margin: 0;
  color: var(--color-text);
  font-weight: 600;
}

.timeline {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 16px;
  align-items: start;
}

.timeline-step {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-secondary);
}

.divider {
  height: 1px;
  background: rgba(139, 92, 246, 0.2);
  margin: var(--space-2xl) 0;
}

.footer {
  margin-top: var(--space-3xl);
  padding: var(--space-2xl) 0;
  border-top: 1px solid rgba(139, 92, 246, 0.2);
  color: var(--color-muted);
  font-size: 13px;
}

.page-hero {
  display: grid;
  gap: var(--space-lg);
}

.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px;
  border-radius: 999px;
  background: rgba(19, 19, 43, 0.65);
  border: 1px solid rgba(139, 92, 246, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.filter-chip {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  color: var(--color-muted);
  cursor: pointer;
  transition: all 200ms ease;
  position: relative;
  overflow: hidden;
}

.filter-chip.active,
.filter-chip:hover {
  color: var(--color-text);
  border-color: rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.18);
}

.nft-grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.nft-grid.enhanced-cards {
  gap: 40px;
  max-width: 1050px;
  width: min(1050px, 92vw);
  justify-content: center;
  grid-template-columns: repeat(4, minmax(0, 230px));
}

.nft-card {
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, rgba(19, 19, 43, 0.8), rgba(23, 23, 51, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease;
  position: relative;
  overflow: hidden;
}

.nft-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.nft-art {
  width: 100%;
  aspect-ratio: 1 / 1.2;
  border-radius: 14px;
  background: radial-gradient(circle at 20% 20%, rgba(251, 191, 36, 0.4), transparent 45%),
    radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.5), transparent 45%),
    linear-gradient(140deg, rgba(10, 10, 30, 0.9), rgba(30, 30, 70, 0.9));
  border: 1px solid rgba(139, 92, 246, 0.4);
  margin-bottom: 12px;
}

.nft-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--color-muted);
}

/* Enhanced NFT Card Styles */
.nft-card-enhanced {
  position: relative;
  perspective: 1200px;
}

.card-wrap {
  transform-style: preserve-3d;
  animation: cardIn 0.8s ease forwards;
  opacity: 0;
  transform: translateY(28px) scale(0.96);
}

.card {
  width: 100%;
  min-height: 400px;
  position: relative;
  border-radius: 16px;
  transform-style: preserve-3d;
  transition: transform 0.1s linear;
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.15), rgba(0,0,0,0.3));
}

.card-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(139, 92, 246, 0.1), transparent 35%),
    linear-gradient(145deg, #1b1b2d, #0c0c1f);
  border-radius: 16px;
}

.card-frame {
  position: absolute;
  inset: 8px;
  border-radius: 12px;
  background:
    linear-gradient(120deg, rgba(251, 191, 36, 0.2), rgba(139, 92, 246, 0.2)),
    conic-gradient(from 120deg, rgba(139, 92, 246, 0.4), rgba(167, 139, 250, 0.35), rgba(251, 191, 36, 0.35), rgba(139, 92, 246, 0.4));
  mix-blend-mode: screen;
  filter: blur(0.2px);
  opacity: 0.8;
}

.card-holo {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(139, 92, 246, 0.4),
    rgba(167, 139, 250, 0.35),
    rgba(251, 191, 36, 0.35)
  );
  mix-blend-mode: screen;
  opacity: 0.6;
  background-size: 200% 200%;
  animation: holoMove 6s linear infinite;
  border-radius: 16px;
}

.card-glare {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background:
    radial-gradient(circle at 20% 0%, rgba(251, 191, 36, 0.4), transparent 45%),
    linear-gradient(120deg, rgba(139, 92, 246, 0.3), transparent 60%);
  mix-blend-mode: screen;
  opacity: 0.45;
  animation: glareSweep 4.5s ease-in-out infinite;
}

.card-noise {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0px, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 3px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0px, rgba(255, 255, 255, 0.02) 1px, transparent 1px, transparent 4px);
  mix-blend-mode: overlay;
  opacity: 0.35;
  pointer-events: none;
}

.card-art {
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.4);
  background: radial-gradient(circle at 20% 20%, rgba(251, 191, 36, 0.18), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(139, 92, 246, 0.25), transparent 40%),
    linear-gradient(140deg, rgba(12, 12, 31, 0.85), rgba(28, 28, 64, 0.85));
  transform: translateZ(24px);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.6);
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  margin-bottom: 12px;
}

.card-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: saturate(1.1) contrast(1.05);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  box-shadow:
    0 0 30px rgba(139, 92, 246, 0.3),
    0 20px 40px rgba(0,0,0,0.6),
    inset 0 0 35px rgba(255,255,255, 0.12);
}

.card-content {
  position: absolute;
  bottom: 14px;
  left: 20px;
  right: 20px;
  transform: translateZ(40px);
}

.card-content h3 {
  margin: 0 0 6px 0;
  font-size: 22px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card-content p {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0.7;
}

.card-meta {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.card-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.card-content .card-meta {
  flex-wrap: wrap;
  row-gap: 8px;
  column-gap: 8px;
  letter-spacing: 0.08em;
}

.card-content .card-meta span {
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes holoMove {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@keyframes glareSweep {
  0%, 100% { transform: translateX(-12%) translateY(-6%); opacity: 0.25; }
  50% { transform: translateX(12%) translateY(6%); opacity: 0.6; }
}

@keyframes cardIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.muted {
  color: var(--color-muted);
}

.split {
  display: grid;
  gap: var(--space-2xl);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: start;
}

.ritual-box {
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.25);
  position: relative;
  overflow: hidden;
}

:is(
  .card-grid .card,
  .split .card,
  .ritual-box,
  .list-item,
  .stat,
  .nft-card,
  .filter-chip,
  .btn-primary,
  .btn-secondary,
  .btn-ghost
) {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

:is(
  .card-grid .card,
  .split .card,
  .ritual-box,
  .list-item,
  .stat,
  .nft-card,
  .filter-chip,
  .btn-primary,
  .btn-secondary,
  .btn-ghost
)::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, var(--pixel-line) 0 1px, transparent 1px var(--pixel-size)),
    repeating-linear-gradient(90deg, var(--pixel-line) 0 1px, transparent 1px var(--pixel-size));
  opacity: 0.22;
  pointer-events: none;
}

.ritual-box h3 {
  margin-bottom: 8px;
}

.ritual-list {
  display: grid;
  gap: 10px;
}

.ritual-line {
  font-size: 14px;
  color: var(--color-text);
}

input,
select,
button {
  font-family: inherit;
}

input:focus,
button:focus,
select:focus,
.filter-chip:focus,
.nav-links a:focus {
  outline: 2px solid rgba(251, 191, 36, 0.6);
  outline-offset: 2px;
}

.lang-switcher {
  margin-right: 12px;
}

.lang-btn {
  min-width: 60px;
  text-align: center;
}

@media (max-width: 900px) {
  .navbar {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    border-radius: 24px;
    position: relative;
  }

  .nav-actions {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 720px) {
  .site-header {
    position: static;
  }

  main {
    padding-top: var(--space-2xl);
  }
}

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