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

:root {
  --bg-dark: #0a0e17;
  --bg-mid: #141b2d;
  --sol-purple: #9945ff;
  --sol-green: #14f195;
  --sol-purple-dark: #7c3aed;
  --accent: #14f195;
  --accent-dark: #0fd87a;
  --gold: #fbbf24;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --pixel-border: 4px;
}

html {
  scroll-behavior: smooth;
  background: var(--bg-dark);
}

body {
  font-family: 'VT323', monospace;
  font-size: 1.25rem;
  background: transparent;
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Pixel background — see css/pixel-bg.css */

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid rgba(153, 69, 255, 0.3);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.75rem;
  color: var(--sol-green);
}

.logo-img {
  height: 40px;
  width: auto;
  image-rendering: pixelated;
  object-fit: contain;
}

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

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--sol-green);
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.65rem;
  padding: 1rem 1.5rem;
  text-decoration: none;
  border: var(--pixel-border) solid #000;
  box-shadow: 4px 4px 0 #000;
  transition: transform 0.1s, box-shadow 0.1s;
  cursor: pointer;
  text-align: center;
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #000;
}

.btn-primary {
  background: linear-gradient(180deg, var(--sol-green) 0%, var(--accent-dark) 100%);
  color: #0a0e17;
}

.btn-primary:hover {
  background: linear-gradient(180deg, #2dffb0 0%, var(--sol-green) 100%);
}

.btn-secondary {
  background: var(--bg-mid);
  color: var(--text);
  border-color: var(--sol-purple);
}

.btn-secondary:hover {
  background: #1e2640;
  color: var(--sol-green);
}

.btn-buy {
  background: linear-gradient(180deg, var(--sol-purple) 0%, var(--sol-purple-dark) 100%);
  color: #fff;
}

.btn-buy:hover {
  background: linear-gradient(180deg, #b06aff 0%, var(--sol-purple) 100%);
}

.btn-small {
  font-size: 0.55rem;
  padding: 0.6rem 1rem;
}

.btn-large {
  font-size: 0.8rem;
  padding: 1.25rem 2.5rem;
}

.btn-glow {
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from { box-shadow: 4px 4px 0 #000, 0 0 12px rgba(20, 241, 149, 0.4); }
  to   { box-shadow: 4px 4px 0 #000, 0 0 24px rgba(153, 69, 255, 0.6); }
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  min-height: calc(100vh - 80px);
  padding: 3rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-tag {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.55rem;
  color: var(--sol-purple);
  margin-bottom: 1.5rem;
  letter-spacing: 1px;
  text-shadow: 0 0 12px rgba(153, 69, 255, 0.5);
}

.hero h1 {
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(1rem, 3vw, 1.6rem);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.hero h1 .highlight {
  color: var(--sol-green);
  text-shadow: 0 0 16px rgba(20, 241, 149, 0.4);
}

.hero-desc {
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
}

/* Contract address box */
.ca-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: rgba(20, 27, 45, 0.9);
  border: 3px solid #000;
  box-shadow: 4px 4px 0 #000, inset 0 0 0 1px rgba(153, 69, 255, 0.3);
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  max-width: 520px;
}

.ca-label {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.5rem;
  color: var(--gold);
  background: rgba(153, 69, 255, 0.2);
  padding: 0.35rem 0.5rem;
  border: 2px solid #000;
}

.ca-value {
  flex: 1;
  font-family: 'VT323', monospace;
  font-size: 1.3rem;
  color: var(--sol-green);
  word-break: break-all;
  min-width: 0;
}

.btn-copy {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.45rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-mid);
  color: var(--text);
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
  cursor: pointer;
  transition: transform 0.1s, background 0.2s;
}

.btn-copy:hover {
  background: var(--sol-purple-dark);
  color: #fff;
}

.btn-copy:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 #000;
}

.copy-toast {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.45rem;
  color: var(--sol-green);
  margin-bottom: 1rem;
}

.copy-toast.hidden {
  visibility: hidden;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(20, 27, 45, 0.8);
  border: 2px solid #000;
  box-shadow: 3px 3px 0 #000;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1.1rem;
  transition: color 0.2s, transform 0.1s;
}

.social-link:hover {
  color: var(--sol-green);
  transform: translateY(-2px);
}

.social-icon {
  font-size: 1.2rem;
}

/* Pixel scene illustration */
.hero-visual {
  display: flex;
  justify-content: center;
}

.pixel-scene {
  width: 360px;
  height: 280px;
  position: relative;
  border: 4px solid #000;
  box-shadow: 8px 8px 0 #000, 0 0 30px rgba(153, 69, 255, 0.2);
  overflow: hidden;
  image-rendering: pixelated;
}

.scene-sky {
  position: absolute;
  inset: 0 0 40%;
  background: linear-gradient(180deg, #2d1b69 0%, #9945ff 50%, #14f195 100%);
}

.scene-ground {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 45%;
  background:
    repeating-linear-gradient(
      90deg,
      #166534 0px, #166534 16px,
      #14532d 16px, #14532d 32px
    );
}

.scene-house {
  position: absolute;
  bottom: 28%;
  right: 15%;
  width: 64px;
  height: 56px;
  background: #92400e;
  border: 3px solid #000;
}

.scene-house::before {
  content: '';
  position: absolute;
  top: -28px;
  left: -8px;
  width: 0;
  height: 0;
  border-left: 40px solid transparent;
  border-right: 40px solid transparent;
  border-bottom: 32px solid #9945ff;
}

.scene-player {
  position: absolute;
  bottom: 24%;
  left: 30%;
  animation: bounce 1s ease-in-out infinite;
}

.hero-character {
  height: 72px;
  width: auto;
  image-rendering: pixelated;
  object-fit: contain;
  filter: drop-shadow(2px 4px 0 rgba(0, 0, 0, 0.35));
}

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

.scene-crops .crop {
  position: absolute;
  bottom: 34%;
  width: 12px;
  height: 16px;
  background: #15803d;
  border: 2px solid #000;
}

.scene-crops .c1 { left: 15%; }
.scene-crops .c2 { left: 23%; height: 20px; }
.scene-crops .c3 { left: 45%; }
.scene-crops .c4 { left: 53%; height: 22px; background: #eab308; }
.scene-crops .c5 { left: 65%; height: 18px; background: #14f195; }

.scene-sol-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.4rem;
  color: #0a0e17;
  background: linear-gradient(180deg, #9945ff, #14f195);
  padding: 4px 8px;
  border: 2px solid #000;
}

/* Chart section */
.chart-section {
  max-width: 100%;
  background: rgba(10, 14, 23, 0.55);
  border-top: 2px solid rgba(153, 69, 255, 0.25);
  border-bottom: 2px solid rgba(20, 241, 149, 0.15);
}

.chart-frame {
  max-width: 900px;
  margin: 0 auto 2rem;
  border: 4px solid #000;
  box-shadow: 8px 8px 0 #000, 0 0 20px rgba(153, 69, 255, 0.15);
  background: #0d1117;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.chart-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
}

.buy-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* Sections */
.section {
  padding: 5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(0.8rem, 2.5vw, 1.1rem);
  text-align: center;
  margin-bottom: 1rem;
  color: var(--sol-green);
}

.section-sub {
  text-align: center;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 3rem;
  font-size: 1.4rem;
}

/* Features */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: rgba(20, 27, 45, 0.85);
  border: 3px solid #000;
  box-shadow: 5px 5px 0 #000;
  padding: 1.5rem;
  transition: transform 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 5px 9px 0 #000, 0 0 16px rgba(153, 69, 255, 0.2);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.6rem;
  margin-bottom: 0.75rem;
  color: var(--gold);
}

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

/* Gameplay section */
.gameplay {
  max-width: 100%;
  background: rgba(10, 14, 23, 0.45);
  border-top: 2px solid rgba(20, 241, 149, 0.15);
  border-bottom: 2px solid rgba(153, 69, 255, 0.15);
}

.gameplay-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.gameplay-text h2 {
  font-family: 'Press Start 2P', cursive;
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--gold);
}

.gameplay-text p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
}

.gameplay-list {
  list-style: none;
  margin-bottom: 2rem;
}

.gameplay-list li {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

kbd {
  display: inline-block;
  background: var(--bg-mid);
  border: 2px solid #000;
  padding: 0.15rem 0.5rem;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.5rem;
  box-shadow: 2px 2px 0 #000;
}

.preview-frame {
  position: relative;
  border: 4px solid #000;
  box-shadow: 8px 8px 0 #000;
  background: #000;
}

.preview-frame canvas {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.preview-label {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.45rem;
  color: var(--sol-green);
  background: rgba(0, 0, 0, 0.7);
  padding: 4px 8px;
}

/* Community */
.community {
  text-align: center;
}

.social-cards {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.social-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 2rem;
  background: rgba(20, 27, 45, 0.9);
  border: 3px solid #000;
  box-shadow: 5px 5px 0 #000;
  text-decoration: none;
  color: var(--text);
  min-width: 180px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.social-card:hover {
  transform: translateY(-4px);
  box-shadow: 5px 9px 0 #000;
  color: var(--sol-green);
}

.social-card-icon {
  font-size: 2rem;
}

.social-card-label {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.5rem;
  color: var(--gold);
}

.social-card-handle {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.social-card:hover .social-card-handle {
  color: var(--sol-green);
}

.stats-row {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.stat-num {
  display: block;
  font-family: 'Press Start 2P', cursive;
  font-size: 1.5rem;
  color: var(--sol-purple);
}

.stat-label {
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem;
  border-top: 2px solid rgba(153, 69, 255, 0.2);
  color: var(--text-muted);
  font-size: 1rem;
}

.footer-links {
  margin-top: 0.75rem;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

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

/* Responsive */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
  }

  .hero,
  .gameplay-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-desc,
  .ca-box {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions,
  .social-row,
  .buy-row {
    justify-content: center;
  }

  .gameplay-list {
    text-align: left;
  }

  .chart-frame {
    aspect-ratio: 4 / 3;
  }
}
