/* ===== TEKSCAN — Black-Orange Terminal/Hacker Theme ===== */
@font-face {
  font-family: 'Negan';
  src: url('Negan.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

:root{
  --bg: #000000;
  --bg-card: #0a0a0a;
  --ink: #ff9500;
  --ink-dim: #ff8800;
  --muted: #cc6600;
  --primary: #ff9500;
  --primary-dark: #cc6600;
  --secondary: #ffaa33;
  --grid: rgba(255, 149, 0, 0.05);
  --glow: rgba(255, 149, 0, 0.6);
  --danger: #ff0040;
  --border: #663300;
}

*{box-sizing:border-box; margin: 0; padding: 0;}
html,body{height:100%; scroll-behavior: smooth;}
body{
  color: var(--ink);
  background: #000000;
  font-family: 'Courier New', 'Consolas', monospace;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  text-shadow: 0 0 2px rgba(255, 149, 0, 0.3);
}

/* CRT grid overlay */
body::before{
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(transparent 0 1px, var(--grid) 1px 2px, transparent 2px 100%),
    linear-gradient(90deg, transparent 0 1px, var(--grid) 1px 2px, transparent 2px 100%);
  background-size: 40px 40px;
  opacity: 0.4;
  animation: gridFlow 30s linear infinite;
}
@keyframes gridFlow{
  to{ background-position: 80px 40px, 40px 80px; }
}

/* Noise texture */
.noise{
  position: fixed;
  inset: -200px;
  pointer-events: none;
  z-index: 9998;
  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAACq6DbKAAAAPklEQVR4Ae3NsQkAMAwEQc5/6XM2yqfQqgq7oA2D2b0HAAAAAB8Kqgk1n3a0m2+0X2j2H8v8mUDFf0K3i7av0t3Q0A7nF8kPp6t5eGgAAAABJRU5ErkJggg==');
  opacity: 0.08;
  mix-blend-mode: overlay;
  animation: noise 0.15s steps(10) infinite;
}
@keyframes noise{
  to{ transform: translate3d(-5px, 5px, 0); }
}

/* Scanlines */
.scanlines{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9997;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 149, 0, 0.02) 0 1px,
    transparent 1px 2px
  );
  opacity: 0.5;
}

/* Glowing scan line */
.glitch-scan{
  position: fixed;
  left: 0;
  right: 0;
  height: 3px;
  top: 40%;
  background: linear-gradient(90deg, transparent, var(--primary), var(--primary), transparent);
  box-shadow: 
    0 0 30px var(--glow),
    0 0 60px rgba(255, 149, 0, 0.4);
  opacity: 0.6;
  pointer-events: none;
  z-index: 9996;
  filter: blur(2px);
}

/* Navigation */
.nav{
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.95);
  border-bottom: 2px solid var(--primary);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  box-shadow: 0 0 20px rgba(255, 149, 0, 0.3);
}

.logo{
  font-weight: 900;
  font-size: 24px;
  letter-spacing: 3px;
  color: var(--primary);
  text-shadow: 
    0 0 10px var(--glow),
    0 0 20px var(--glow),
    2px 2px 0px var(--primary-dark);
  font-family: 'Negan', 'Courier New', monospace;
}

.logo-bracket{
  color: var(--secondary);
  font-size: 28px;
}

.version{
  font-size: 10px;
  color: var(--muted);
  margin-left: 8px;
  vertical-align: super;
}

.links{
  display: flex;
  gap: 16px;
  align-items: center;
}

.nav-link{
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  padding: 6px 12px;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  position: relative;
  text-transform: lowercase;
}

.nav-link:hover{
  color: var(--secondary);
  border: 1px solid var(--primary);
  box-shadow: 0 0 15px var(--glow);
  text-shadow: 0 0 8px var(--glow);
}

/* Buttons */
.button{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: 2px solid var(--primary);
  color: var(--primary);
  background: rgba(255, 149, 0, 0.05);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-transform: uppercase;
  font-family: 'Courier New', monospace;
  text-decoration: none;
}

.button::before{
  content: '';
  position: absolute;
  inset: 0;
  background: var(--primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.button:hover::before{
  opacity: 0.15;
}

.button:hover{
  transform: translateY(-2px);
  box-shadow: 0 0 25px var(--glow);
  color: var(--secondary);
  text-shadow: 0 0 10px var(--glow);
}

.button.primary{
  background: rgba(255, 149, 0, 0.1);
  box-shadow: 0 0 15px rgba(255, 149, 0, 0.3);
}

.button.primary:hover{
  box-shadow: 0 0 30px var(--glow);
}

.button[aria-disabled="true"]{
  opacity: 0.3;
  pointer-events: none;
}

/* Layout */
.wrap{
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px 80px;
  display: grid;
  grid-template-columns: 180px 1fr 180px;
  gap: 20px;
}

@media (max-width: 1100px){
  .wrap{
    grid-template-columns: 1fr;
  }
  .edge{
    display: none;
  }
}

.stage{
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Edge panels with ASCII art */
.edge{
  position: relative;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.ascii-art{
  margin-bottom: 20px;
  padding: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 149, 0, 0.02);
  text-align: center;
  font-family: monospace;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse{
  0%, 100%{ opacity: 0.6; }
  50%{ opacity: 1; }
}

.edge .panel{
  height: 150px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 149, 0, 0.03), rgba(255, 149, 0, 0.01));
  overflow: hidden;
  position: relative;
}

.edge .panel::before{
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0 4px,
    rgba(255, 149, 0, 0.05) 4px 8px
  );
  animation: panelFlow 6s linear infinite;
}

@keyframes panelFlow{
  to{ transform: translateY(8px); }
}

.edge .hud{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.edge .tick{
  height: 40px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.8);
  position: relative;
  overflow: hidden;
}

.edge .tick::after{
  content: "";
  position: absolute;
  left: -50%;
  top: 0;
  bottom: 0;
  width: 50%;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  animation: tickSweep 3s ease-in-out infinite;
  opacity: 0.3;
}

@keyframes tickSweep{
  to{ transform: translateX(300%); }
}

/* Scanner display (main container) */
.lizard-card{
  position: relative;
  width: min(86vw, 600px);
  aspect-ratio: 1/1;
  background: radial-gradient(circle at 50% 50%, rgba(255, 149, 0, 0.08), #000000);
  border: 3px solid var(--primary);
  overflow: hidden;
  transform-style: preserve-3d;
  box-shadow: 
    0 0 40px rgba(255, 149, 0, 0.4),
    inset 0 0 60px rgba(255, 149, 0, 0.1);
  transition: all 0.3s ease;
}

.lizard-card .frame{
  position: absolute;
  inset: -6px;
  pointer-events: none;
  border: 2px solid var(--primary);
  opacity: 0.3;
}

/* Scanner grid background */
.scanner-grid{
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.5;
}

/* Scan result display */
.scan-result{
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: clamp(60px, 12vw, 120px);
  font-weight: 900;
  z-index: 2;
  backdrop-filter: blur(3px);
  background: rgba(0, 0, 0, 0.7);
  font-family: 'Negan', 'Courier New', monospace;
}

.tek-label{
  font-size: 0.3em;
  color: var(--muted);
  margin-bottom: 10px;
  letter-spacing: 5px;
}

.scan-result .percentage{
  color: var(--primary);
  text-shadow: 
    0 0 20px var(--glow),
    0 0 40px var(--glow),
    0 0 60px var(--glow);
  animation: flicker 0.15s infinite alternate;
}

@keyframes flicker{
  0%{ opacity: 1; }
  100%{ opacity: 0.95; }
}

.scan-result.red .percentage{
  color: var(--danger);
  text-shadow: 
    0 0 20px rgba(255, 0, 64, 0.8),
    0 0 40px rgba(255, 0, 64, 0.6);
}

.scan-result.green .percentage{
  color: var(--secondary);
  text-shadow: 
    0 0 20px rgba(51, 255, 102, 0.8),
    0 0 40px rgba(51, 255, 102, 0.6),
    0 0 60px rgba(51, 255, 102, 0.4);
}

/* Text styling */
.undertext{
  text-align: center;
  margin: 24px 0 16px;
  max-width: 800px;
}

.title{
  margin: 0 0 12px;
  font-size: clamp(32px, 6vw, 72px);
  line-height: 1.2;
  font-weight: 900;
}

.gradient-text{
  color: var(--primary);
  display: block;
  letter-spacing: 4px;
  text-shadow: 
    0 0 20px var(--glow),
    2px 2px 0px var(--primary-dark);
  font-family: 'Negan', 'Courier New', monospace;
  font-size: 0.5em;
  margin-bottom: 5px;
}

.gradient-text-sub{
  color: var(--primary);
  display: block;
  letter-spacing: 8px;
  text-shadow: 
    0 0 30px var(--glow),
    3px 3px 0px var(--primary-dark);
  font-family: 'Negan', 'Courier New', monospace;
  font-size: 1.2em;
}

.subtitle{
  display: block;
  font-size: clamp(12px, 2.5vw, 16px);
  font-weight: 400;
  color: var(--muted);
  margin-top: 12px;
  letter-spacing: 2px;
  font-family: 'Courier New', monospace;
}

.tagline{
  color: var(--ink-dim);
  max-width: 70ch;
  margin: 16px auto 0;
  font-size: 14px;
  line-height: 1.9;
  text-align: left;
  font-family: 'Courier New', monospace;
}

/* Contract input section */
.contract{
  margin: 32px 0 20px;
  width: min(86vw, 700px);
}

.contract label{
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 10px;
  letter-spacing: 1px;
  text-shadow: 0 0 10px var(--glow);
}

.contract .row{
  display: flex;
  gap: 12px;
}

.contract input{
  flex: 1;
  padding: 14px 18px;
  border: 2px solid var(--primary);
  background: rgba(0, 0, 0, 0.9);
  color: var(--primary);
  outline: none;
  font-size: 14px;
  transition: all 0.3s ease;
  font-family: 'Courier New', monospace;
  box-shadow: inset 0 0 10px rgba(255, 149, 0, 0.1);
}

.contract input:focus{
  box-shadow: 
    0 0 20px var(--glow),
    inset 0 0 15px rgba(255, 149, 0, 0.2);
  text-shadow: 0 0 5px var(--glow);
}

.contract input::placeholder{
  color: var(--muted);
  opacity: 0.6;
}

.muted{
  color: var(--muted);
  font-size: 11px;
  margin-top: 8px;
  display: block;
}

/* Scan progress */
.scan-progress{
  width: min(86vw, 700px);
  margin: 24px 0;
  text-align: left;
  padding: 20px;
  background: rgba(0, 0, 0, 0.9);
  border: 2px solid var(--primary);
  box-shadow: 0 0 20px rgba(255, 149, 0, 0.3);
}

.scan-text{
  margin: 8px 0;
  font-size: 13px;
  color: var(--primary);
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  font-weight: 400;
  font-family: 'Courier New', monospace;
}

.scan-text::before{
  content: '█';
  animation: blink 1s infinite;
  margin-right: 5px;
}

@keyframes blink{
  0%, 49%{ opacity: 1; }
  50%, 100%{ opacity: 0; }
}

/* Holder metrics */
.holder-metrics{
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 16px;
  margin-top: 24px;
  width: min(86vw, 1100px);
}

@media (max-width: 900px){
  .holder-metrics{
    grid-template-columns: 1fr;
  }
}

.metric-col, .animation-col{
  background: rgba(0, 0, 0, 0.9);
  border: 2px solid var(--border);
  min-height: 220px;
}

.animation-col{
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 16px;
  border-color: var(--primary);
}

.holder-bar{
  background: linear-gradient(90deg, var(--primary-dark), var(--primary), var(--secondary));
  height: 4px;
  opacity: 0;
  transform: scaleX(0);
  animation: barGrow 0.6s ease-out forwards;
  box-shadow: 0 0 8px var(--glow);
}

@keyframes barGrow{
  to{
    opacity: 1;
    transform: scaleX(1);
  }
}

/* Terminal panels */
.term-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
  width: min(86vw, 1100px);
}

@media (max-width: 900px){
  .term-grid{
    grid-template-columns: 1fr;
  }
}

.term-card{
  background: rgba(0, 0, 0, 0.95);
  border: 2px solid var(--primary);
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(255, 149, 0, 0.2);
}

.term-card:hover{
  box-shadow: 0 0 30px var(--glow);
  transform: translateY(-2px);
}

.term-title{
  padding: 12px 16px;
  background: rgba(255, 149, 0, 0.1);
  border-bottom: 1px solid var(--primary);
  color: var(--primary);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: 'Courier New', monospace;
  text-shadow: 0 0 10px var(--glow);
}

.term-body{
  margin: 0;
  padding: 16px;
  color: var(--ink-dim);
  min-height: 140px;
  white-space: pre-wrap;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  line-height: 1.7;
  background: rgba(0, 0, 0, 0.9);
}

.bar{
  height: 8px;
  background: rgba(0, 0, 0, 0.95);
  border-top: 1px solid var(--primary);
  position: relative;
  overflow: hidden;
}

.fill{
  height: 100%;
  width: var(--p);
  background: linear-gradient(90deg, var(--primary-dark), var(--primary), var(--secondary));
  box-shadow: 0 0 15px var(--glow);
  position: relative;
  transition: width 0.3s ease;
}

.fill::after{
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer{
  to{ transform: translateX(100%); }
}

/* About section */
.about{
  width: min(86vw, 800px);
  text-align: left;
  margin-top: 48px;
  padding: 24px;
  background: rgba(0, 0, 0, 0.95);
  border: 2px solid var(--primary);
  box-shadow: 0 0 20px rgba(255, 149, 0, 0.3);
}

.section-title{
  font-size: clamp(20px, 4vw, 28px);
  margin: 0 0 20px;
  font-weight: 700;
  color: var(--primary);
  text-shadow: 0 0 15px var(--glow);
  font-family: 'Courier New', monospace;
  letter-spacing: 2px;
}

.about p{
  color: var(--ink-dim);
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.9;
  font-family: 'Courier New', monospace;
}

.prompt{
  color: var(--primary);
  font-weight: 700;
  margin-right: 5px;
}

.degen-warning{
  color: var(--danger);
  text-align: center;
  margin-top: 24px;
  padding: 12px;
  border: 2px solid var(--danger);
  background: rgba(255, 0, 64, 0.05);
  animation: warningPulse 2s ease-in-out infinite;
}

@keyframes warningPulse{
  0%, 100%{ box-shadow: 0 0 10px rgba(255, 0, 64, 0.3); }
  50%{ box-shadow: 0 0 25px rgba(255, 0, 64, 0.6); }
}

/* Footer */
.footer{
  background: rgba(0, 0, 0, 0.95);
  border-top: 2px solid var(--primary);
  padding: 20px;
  margin-top: 40px;
  box-shadow: 0 0 20px rgba(255, 149, 0, 0.3);
}

.footer .inner{
  max-width: 1400px;
  margin: 0 auto;
  text-align: center;
}

.footer-text{
  color: var(--muted);
  font-size: 12px;
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
}

/* Responsive adjustments */
@media (max-width: 768px){
  .nav{
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }
  
  .logo{
    font-size: 20px;
  }
  
  .contract .row{
    flex-direction: column;
  }
  
  .contract input,
  .contract .button{
    width: 100%;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  *{
    animation: none !important;
    transition: none !important;
  }
  .glitch-scan{
    display: none;
  }
}
