/* ==========================================================================
   PIXEL MINERS ("MINERS") - CYBERPUNK RETRO SHOWCASE
   High-performance, ultra-smooth 60fps CSS with responsive layout & neon accents.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:ital,wght@0,400;0,600;0,700;1,700&family=Press+Start+2P&family=Space+Mono:wght@400;700&family=Syne:wght@700;800&display=swap');

:root {
  --bg-primary: #06070a;
  --bg-secondary: #0b0d14;
  --bg-card: #101420;
  --bg-card-hover: #161c2e;
  --bg-glass: rgba(16, 20, 32, 0.75);
  
  --neon-cyan: #00f3ff;
  --neon-gold: #ffb700;
  --neon-purple: #c026d3;
  --neon-pink: #f43f5e;
  --neon-green: #10b981;
  --neon-blue: #3b82f6;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-cyan: rgba(0, 243, 255, 0.3);
  --border-glow: rgba(0, 243, 255, 0.7);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --font-pixel: 'Press Start 2P', monospace;
  --font-heading: 'Chakra Petch', sans-serif;
  --font-display: 'Syne', sans-serif;
  --font-mono: 'Space Mono', monospace;

  /* Rarity Colors */
  --rarity-legendary-bg: linear-gradient(135deg, #fbbf24 0%, #b45309 100%);
  --rarity-legendary-glow: rgba(251, 191, 36, 0.6);
  
  --rarity-epic-bg: linear-gradient(135deg, #c084fc 0%, #7e22ce 100%);
  --rarity-epic-glow: rgba(192, 132, 252, 0.5);

  --rarity-rare-bg: linear-gradient(135deg, #38bdf8 0%, #0369a1 100%);
  --rarity-rare-glow: rgba(56, 189, 248, 0.5);

  --rarity-uncommon-bg: linear-gradient(135deg, #4ade80 0%, #15803d 100%);
  --rarity-uncommon-glow: rgba(74, 222, 128, 0.4);

  --rarity-common-bg: linear-gradient(135deg, #94a3b8 0%, #475569 100%);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-heading);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(0, 243, 255, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 90% 60%, rgba(192, 38, 211, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 50% 90%, rgba(255, 183, 0, 0.05) 0%, transparent 50%);
  background-attachment: fixed;
}

/* CRT SCANLINE OVERLAY */
body.crt-active::after {
  content: " ";
  display: block;
  position: fixed;
  top: 0; left: 0; bottom: 0; right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.35) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.05), rgba(0, 255, 0, 0.02), rgba(0, 255, 0, 0.05));
  z-index: 9999;
  background-size: 100% 4px, 6px 100%;
  pointer-events: none;
  opacity: 0.8;
}

/* SCROLLBAR */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--neon-cyan);
  border-radius: 4px;
}

/* CONTAINER */
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* TYPOGRAPHY HELPERS */
.pixel-text {
  font-family: var(--font-pixel);
  letter-spacing: 0.5px;
}

.text-cyan {
  color: var(--neon-cyan);
  text-shadow: 0 0 12px rgba(0, 243, 255, 0.6);
}

.text-gold {
  color: var(--neon-gold);
  text-shadow: 0 0 12px rgba(255, 183, 0, 0.6);
}

.text-purple {
  color: var(--neon-purple);
  text-shadow: 0 0 12px rgba(192, 38, 211, 0.6);
}

/* NAVBAR */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(6, 7, 10, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-cyan);
  padding: 0.9rem 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-badge {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--neon-cyan), #0284c7);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.5);
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-menu a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.nav-menu a:hover {
  color: var(--neon-cyan);
  text-shadow: 0 0 10px rgba(0, 243, 255, 0.6);
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

/* BUTTONS */
.btn {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-cyan {
  background: var(--neon-cyan);
  color: #000;
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
}

.btn-cyan:hover {
  background: #38f8ff;
  box-shadow: 0 0 30px rgba(0, 243, 255, 0.8);
  transform: translateY(-2px);
}

.btn-gold {
  background: var(--neon-gold);
  color: #000;
  box-shadow: 0 0 20px rgba(255, 183, 0, 0.4);
}

.btn-gold:hover {
  background: #ffc933;
  box-shadow: 0 0 30px rgba(255, 183, 0, 0.8);
  transform: translateY(-2px);
}

.btn-outline-cyan {
  background: rgba(0, 243, 255, 0.05);
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
}

.btn-outline-cyan:hover {
  background: rgba(0, 243, 255, 0.15);
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
  transform: translateY(-2px);
}

.btn-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s;
}

.btn-icon:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
}

/* HERO SECTION */
.hero {
  padding: 5rem 0 3rem;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}

@media (max-width: 968px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.hero-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 243, 255, 0.08);
  border: 1px solid var(--border-cyan);
  padding: 0.45rem 1.1rem;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--neon-cyan);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5.5vw, 4.4rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 1.4rem;
  text-transform: uppercase;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2.2rem;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

@media (max-width: 968px) {
  .hero-actions, .hero-description {
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
  }
}

/* HERO STATS BAR */
.hero-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-cyan);
  border-radius: 14px;
  padding: 1.2rem 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

@media (max-width: 600px) {
  .hero-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.hero-stat-item {
  text-align: left;
}

.stat-val {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.1;
}

.stat-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.2rem;
}

/* HERO INTERACTIVE MINER CARD */
.hero-miner-card {
  background: var(--bg-card);
  border: 2px solid var(--border-cyan);
  border-radius: 20px;
  padding: 1.8rem;
  position: relative;
  box-shadow: 0 0 50px rgba(0, 243, 255, 0.2), inset 0 0 20px rgba(0, 243, 255, 0.05);
  transition: all 0.3s;
}

.hero-miner-card:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 70px rgba(0, 243, 255, 0.35);
}

.hero-miner-display {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
}

.hero-miner-display img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.hero-card-meta {
  margin-top: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hero-card-title {
  font-size: 1.3rem;
  font-weight: 700;
}

.hero-traits-mini {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
}

.mini-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* LIVE MARQUEE STRIP */
.marquee-section {
  padding: 1.5rem 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-cyan);
  overflow: hidden;
  position: relative;
  white-space: nowrap;
}

.marquee-track {
  display: inline-flex;
  gap: 1.2rem;
  animation: marquee-scroll 45s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-miner-thumb {
  width: 90px;
  height: 90px;
  background: #000;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
  display: inline-block;
  cursor: pointer;
  transition: all 0.2s;
}

.marquee-miner-thumb:hover {
  transform: scale(1.1);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.6);
}

.marquee-miner-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

/* SECTION STRUCTURE */
.section {
  padding: 5rem 0;
  position: relative;
}

.section-title-wrap {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.6rem;
}

.section-sub {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 650px;
  margin: 0 auto;
}

/* SPOTLIGHT NFT GRID */
.nft-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.8rem;
}

.nft-card {
  background: var(--bg-card);
  border: 1px solid var(--border-cyan);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.nft-card:hover {
  transform: translateY(-8px);
  border-color: var(--neon-gold);
  box-shadow: 0 12px 35px rgba(255, 183, 0, 0.25);
}

.nft-thumb-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #000;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nft-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  transition: transform 0.3s;
}

.nft-card:hover .nft-thumb-box img {
  transform: scale(1.05);
}

/* RARITY BADGES */
.rarity-tag {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.7rem;
  font-weight: 750;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.6);
}

.tag-legendary { background: var(--rarity-legendary-bg); color: #000; box-shadow: 0 0 15px var(--rarity-legendary-glow); }
.tag-epic { background: var(--rarity-epic-bg); color: #fff; box-shadow: 0 0 15px var(--rarity-epic-glow); }
.tag-rare { background: var(--rarity-rare-bg); color: #000; }
.tag-uncommon { background: var(--rarity-uncommon-bg); color: #000; }
.tag-common { background: var(--rarity-common-bg); color: #000; }

.nft-details {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nft-name {
  font-size: 1.15rem;
  font-weight: 700;
}

.nft-traits-row {
  display: flex;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* TECH ENGINE SECTION */
.tech-box {
  background: var(--bg-card);
  border: 1px solid var(--border-cyan);
  border-radius: 20px;
  padding: 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 900px) {
  .tech-box {
    grid-template-columns: 1fr;
    padding: 2rem;
  }
}

.code-terminal {
  background: #040508;
  border: 1px solid var(--border-cyan);
  border-radius: 12px;
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--neon-cyan);
  overflow-x: auto;
  box-shadow: 0 0 25px rgba(0, 243, 255, 0.1);
}

/* TRAIT MATRIX SECTION */
.trait-tabs-container {
  background: var(--bg-card);
  border: 1px solid var(--border-cyan);
  border-radius: 20px;
  padding: 2rem;
}

.trait-tabs {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.2rem;
  margin-bottom: 1.5rem;
}

.trait-tab-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.trait-tab-btn:hover {
  color: #fff;
  border-color: var(--neon-cyan);
}

.trait-tab-btn.active {
  background: var(--neon-cyan);
  color: #000;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 243, 255, 0.4);
}

.trait-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.trait-item-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.5rem;
  transition: all 0.2s;
}

.trait-item-card:hover {
  border-color: var(--neon-cyan);
  background: rgba(0, 243, 255, 0.04);
}

.trait-item-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.trait-item-count {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--neon-cyan);
}

/* RARITY BARS */
.rarity-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-cyan);
  border-radius: 20px;
  padding: 2.5rem;
}

.rarity-meter-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.rarity-meter-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.meter-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  font-weight: 700;
}

.meter-track {
  height: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  overflow: hidden;
}

.meter-bar {
  height: 100%;
  border-radius: 6px;
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* MODAL INSPECTOR */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 8, 0.88);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-card);
  border: 2px solid var(--border-cyan);
  border-radius: 20px;
  box-shadow: 0 0 60px rgba(0, 243, 255, 0.3);
  max-width: 900px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 2.5rem;
}

@media (max-width: 768px) {
  .modal-card {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }
}

.modal-close-btn {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-subtle);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: var(--neon-pink);
  border-color: var(--neon-pink);
}

.modal-img-container {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.traits-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.trait-cell {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  transition: all 0.2s;
}

.trait-cell:hover {
  border-color: var(--neon-cyan);
  background: rgba(0, 243, 255, 0.04);
}

.trait-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.trait-val {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--neon-cyan);
  margin-top: 0.2rem;
}

/* FOOTER */
.site-footer {
  border-top: 1px solid var(--border-cyan);
  background: var(--bg-secondary);
  padding: 4rem 0 2rem;
  margin-top: 6rem;
  text-align: center;
}

.footer-socials {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.social-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 1.2rem;
  transition: color 0.2s;
}

.social-link:hover {
  color: var(--neon-cyan);
}
