/* ========== FONTS ========== */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600;700&family=Share+Tech+Mono&display=swap');

/* ========== CSS VARIABLES ========== */
:root {
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-terminal: #050505;
  --bg-card: #0d0d0d;
  --border-color: #1a1a1a;
  --border-glow: #00ff4120;
  --text-primary: #c8d6c5;
  --text-secondary: #5a6e58;
  --text-dim: #2a3a28;
  --accent: #00ff41;
  --accent-dim: #00cc33;
  --accent-glow: #00ff4140;
  --accent-bright: #33ff66;
  --danger: #ff3333;
  --warning: #ffcc00;
  --font-mono: 'JetBrains Mono', 'Share Tech Mono', 'Courier New', monospace;
  --scanline-opacity: 0.03;
}

/* ========== RESET & BASE ========== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

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

::selection {
  background: var(--accent);
  color: var(--bg-primary);
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-dim);
  border-radius: 3px;
}

/* ========== SCANLINE OVERLAY ========== */
.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 65, var(--scanline-opacity)) 2px,
    rgba(0, 255, 65, var(--scanline-opacity)) 4px
  );
}

.crt-flicker {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
  animation: crtFlicker 0.15s infinite;
  background: transparent;
}

@keyframes crtFlicker {
  0% { opacity: 0.97; }
  50% { opacity: 1; }
  100% { opacity: 0.98; }
}

/* ========== MATRIX RAIN CANVAS ========== */
#matrix-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.07;
}

/* ========== GLITCH TEXT ========== */
.glitch {
  position: relative;
  display: inline-block;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch::before {
  color: var(--danger);
  animation: glitch1 3s infinite;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
  transform: translate(-2px);
}

.glitch::after {
  color: #0ff;
  animation: glitch2 3s infinite;
  clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
  transform: translate(2px);
}

@keyframes glitch1 {
  0%, 90%, 100% { transform: translate(0); }
  92% { transform: translate(-3px, 1px); }
  94% { transform: translate(3px, -1px); }
  96% { transform: translate(-1px, 2px); }
}

@keyframes glitch2 {
  0%, 88%, 100% { transform: translate(0); }
  90% { transform: translate(2px, -1px); }
  93% { transform: translate(-2px, 1px); }
  96% { transform: translate(1px, -2px); }
}

/* ========== CURSOR BLINK ========== */
.cursor-blink {
  display: inline-block;
  width: 10px;
  height: 1.1em;
  background: var(--accent);
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 2px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ========== TYPING EFFECT ========== */
.typing-line {
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid var(--accent);
  animation: typing 2s steps(40) forwards, blinkCaret 0.75s step-end infinite;
  width: 0;
}

.typing-line.done {
  width: 100%;
  border-right: none;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blinkCaret {
  50% { border-color: transparent; }
}

/* ========== NAV ========== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.9);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}

.nav-brand img {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  border: 1px solid var(--accent-dim);
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.3s, text-shadow 0.3s;
  position: relative;
}

.nav-links a:hover {
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent-glow);
}

.nav-links a::before {
  content: '> ';
  opacity: 0;
  transition: opacity 0.3s;
}

.nav-links a:hover::before {
  opacity: 1;
}

/* ========== MAIN CONTAINER ========== */
.main-container {
  position: relative;
  z-index: 1;
}

/* ========== HERO SECTION ========== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 60px;
  position: relative;
}

.hero-grid {
  max-width: 1100px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-terminal {
  background: var(--bg-terminal);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0, 255, 65, 0.05), inset 0 0 60px rgba(0, 0, 0, 0.5);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #111;
  border-bottom: 1px solid var(--border-color);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }

.terminal-title {
  flex: 1;
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
}

.terminal-body {
  padding: 24px;
  font-size: 13px;
  line-height: 1.8;
  min-height: 300px;
}

.terminal-body .prompt {
  color: var(--accent);
}

.terminal-body .command {
  color: var(--text-primary);
}

.terminal-body .output {
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: block;
}

.terminal-body .highlight {
  color: var(--accent-bright);
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(0, 255, 65, 0.05);
  border: 1px solid rgba(0, 255, 65, 0.15);
  border-radius: 20px;
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  width: fit-content;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 4px var(--accent); }
  50% { opacity: 0.4; box-shadow: none; }
}

.hero-title {
  font-size: 48px;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 20px var(--accent-glow), 0 0 40px rgba(0, 255, 65, 0.1);
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 450px;
  line-height: 1.8;
}

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

/* ========== BUTTONS ========== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--accent);
  color: var(--bg-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-primary:hover {
  background: var(--accent-bright);
  box-shadow: 0 0 20px var(--accent-glow), 0 0 40px rgba(0, 255, 65, 0.15);
  transform: translateY(-2px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: transparent;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--accent-dim);
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-secondary:hover {
  background: rgba(0, 255, 65, 0.1);
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
  transform: translateY(-2px);
}

/* ========== CONTRACT SECTION ========== */
.contract-section {
  padding: 40px 24px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.contract-inner {
  max-width: 900px;
  margin: 0 auto;
}

.contract-box {
  background: var(--bg-terminal);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.contract-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: scanLine 3s linear infinite;
}

@keyframes scanLine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.contract-label {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.contract-label .icon {
  color: var(--accent);
}

.contract-address-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 14px 18px;
  cursor: pointer;
  transition: all 0.3s;
}

.contract-address-wrapper:hover {
  border-color: var(--accent-dim);
  box-shadow: 0 0 10px var(--accent-glow);
}

.contract-address {
  flex: 1;
  font-size: 13px;
  color: var(--accent);
  word-break: break-all;
  font-family: var(--font-mono);
}

.copy-btn {
  background: rgba(0, 255, 65, 0.1);
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  padding: 8px 16px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}

.copy-btn:hover {
  background: var(--accent);
  color: var(--bg-primary);
}

/* ========== ABOUT SECTION ========== */
.about-section {
  padding: 100px 24px;
}

.about-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 60px;
}

.section-label {
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 8px;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.section-divider {
  width: 60px;
  height: 2px;
  background: var(--accent);
  margin-top: 16px;
  box-shadow: 0 0 8px var(--accent-glow);
}

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

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 32px 24px;
  transition: all 0.4s;
  position: relative;
  overflow: hidden;
}

.about-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.4s;
}

.about-card:hover::before {
  transform: scaleX(1);
}

.about-card:hover {
  border-color: rgba(0, 255, 65, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 20px var(--accent-glow);
}

.card-icon {
  font-size: 28px;
  margin-bottom: 16px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
}

.card-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ========== LORE SECTION ========== */
.lore-section {
  padding: 100px 24px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.lore-inner {
  max-width: 900px;
  margin: 0 auto;
}

.lore-terminal {
  background: var(--bg-terminal);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 40px;
}

.lore-body {
  padding: 32px;
  font-size: 13px;
  line-height: 2;
}

.lore-body .comment {
  color: var(--text-dim);
}

.lore-body .string {
  color: var(--accent);
}

.lore-body .keyword {
  color: #ff79c6;
}

.lore-body .variable {
  color: #8be9fd;
}

.lore-body .function-name {
  color: #f1fa8c;
}

/* ========== ASCII ART SECTION ========== */
.ascii-section {
  padding: 80px 24px;
  text-align: center;
}

.ascii-art {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.3;
  color: var(--accent);
  white-space: pre;
  display: inline-block;
  text-shadow: 0 0 10px var(--accent-glow);
  opacity: 0.8;
  animation: asciiPulse 4s ease-in-out infinite;
}

@keyframes asciiPulse {
  0%, 100% { opacity: 0.7; text-shadow: 0 0 10px var(--accent-glow); }
  50% { opacity: 1; text-shadow: 0 0 20px var(--accent-glow), 0 0 40px rgba(0, 255, 65, 0.1); }
}

/* ========== LOGO SECTION ========== */
.logo-showcase {
  padding: 60px 24px;
  text-align: center;
}

.logo-image {
  max-width: 320px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: 0 0 60px rgba(0, 255, 65, 0.08), 0 20px 60px rgba(0, 0, 0, 0.5);
  transition: all 0.4s;
  animation: logoFloat 6s ease-in-out infinite;
}

.logo-image:hover {
  box-shadow: 0 0 80px rgba(0, 255, 65, 0.15), 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(1.02);
}

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

/* ========== FOOTER ========== */
.footer {
  padding: 40px 24px;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
}

.footer-text {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 16px;
}

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

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 12px;
  transition: color 0.3s;
}

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

/* ========== FADE IN ANIMATION ========== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .hero {
    padding: 100px 16px 40px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-content {
    order: -1;
    text-align: center;
    align-items: center;
  }

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

  .nav-links {
    display: none;
  }

  .contract-address {
    font-size: 11px;
  }

  .ascii-art {
    font-size: 7px;
  }

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

  .section-title {
    font-size: 24px;
  }

  .terminal-body {
    font-size: 11px;
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 26px;
  }

  .contract-address-wrapper {
    flex-direction: column;
    align-items: stretch;
  }

  .copy-btn {
    text-align: center;
  }
}
