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

:root {
  --neon-cyan: #00FFFF;
  --neon-pink: #FF00FF;
  --neon-green: #00FF00;
  --neon-orange: #FF6600;
  --neon-purple: #AA00FF;
  --dark-bg: #0a0a0a;
  --darker-bg: #050505;
  --terminal-green: #00FF41;
  --matrix-green: #008F11;
  --retro-blue: #0066FF;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'JetBrains Mono', monospace;
  background: var(--dark-bg);
  color: #ffffff;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Animated background grid */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: -2;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

/* Glitch text effect */
.glitch {
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  text-transform: uppercase;
  position: relative;
  color: var(--neon-cyan);
  font-size: 4rem;
  letter-spacing: 0.2em;
  animation: glitch-skew 1s infinite linear alternate-reverse;
}

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

.glitch::before {
  animation: glitch-anim 2s infinite linear alternate-reverse;
  color: var(--neon-pink);
  z-index: -1;
}

.glitch::after {
  animation: glitch-anim2 1s infinite linear alternate-reverse;
  color: var(--neon-green);
  z-index: -2;
}

@keyframes glitch-anim {
  0% { clip: rect(31px, 9999px, 94px, 0); transform: skew(0.85deg); }
  5% { clip: rect(70px, 9999px, 18px, 0); transform: skew(0.17deg); }
  10% { clip: rect(79px, 9999px, 50px, 0); transform: skew(0.98deg); }
  15% { clip: rect(25px, 9999px, 99px, 0); transform: skew(0.07deg); }
  20% { clip: rect(90px, 9999px, 78px, 0); transform: skew(0.18deg); }
  25% { clip: rect(33px, 9999px, 43px, 0); transform: skew(1.06deg); }
  30% { clip: rect(53px, 9999px, 42px, 0); transform: skew(0.69deg); }
  35% { clip: rect(86px, 9999px, 82px, 0); transform: skew(0.74deg); }
  40% { clip: rect(10px, 9999px, 85px, 0); transform: skew(0.61deg); }
  45% { clip: rect(59px, 9999px, 65px, 0); transform: skew(0.78deg); }
  50% { clip: rect(59px, 9999px, 65px, 0); transform: skew(0.78deg); }
  55% { clip: rect(86px, 9999px, 82px, 0); transform: skew(0.74deg); }
  60% { clip: rect(10px, 9999px, 85px, 0); transform: skew(0.61deg); }
  65% { clip: rect(33px, 9999px, 43px, 0); transform: skew(1.06deg); }
  70% { clip: rect(53px, 9999px, 42px, 0); transform: skew(0.69deg); }
  75% { clip: rect(25px, 9999px, 99px, 0); transform: skew(0.07deg); }
  80% { clip: rect(90px, 9999px, 78px, 0); transform: skew(0.18deg); }
  85% { clip: rect(79px, 9999px, 50px, 0); transform: skew(0.98deg); }
  90% { clip: rect(70px, 9999px, 18px, 0); transform: skew(0.17deg); }
  95% { clip: rect(31px, 9999px, 94px, 0); transform: skew(0.85deg); }
  100% { clip: rect(31px, 9999px, 94px, 0); transform: skew(0.85deg); }
}

@keyframes glitch-anim2 {
  0% { clip: rect(65px, 9999px, 119px, 0); transform: skew(0.05deg); }
  5% { clip: rect(52px, 9999px, 36px, 0); transform: skew(0.87deg); }
  10% { clip: rect(79px, 9999px, 77px, 0); transform: skew(0.22deg); }
  15% { clip: rect(31px, 9999px, 17px, 0); transform: skew(0.95deg); }
  20% { clip: rect(68px, 9999px, 98px, 0); transform: skew(0.41deg); }
  25% { clip: rect(10px, 9999px, 49px, 0); transform: skew(0.33deg); }
  30% { clip: rect(69px, 9999px, 84px, 0); transform: skew(0.96deg); }
  35% { clip: rect(92px, 9999px, 27px, 0); transform: skew(0.24deg); }
  40% { clip: rect(41px, 9999px, 65px, 0); transform: skew(0.89deg); }
  45% { clip: rect(11px, 9999px, 45px, 0); transform: skew(0.16deg); }
  50% { clip: rect(11px, 9999px, 45px, 0); transform: skew(0.16deg); }
  55% { clip: rect(92px, 9999px, 27px, 0); transform: skew(0.24deg); }
  60% { clip: rect(41px, 9999px, 65px, 0); transform: skew(0.89deg); }
  65% { clip: rect(10px, 9999px, 49px, 0); transform: skew(0.33deg); }
  70% { clip: rect(69px, 9999px, 84px, 0); transform: skew(0.96deg); }
  75% { clip: rect(31px, 9999px, 17px, 0); transform: skew(0.95deg); }
  80% { clip: rect(68px, 9999px, 98px, 0); transform: skew(0.41deg); }
  85% { clip: rect(79px, 9999px, 77px, 0); transform: skew(0.22deg); }
  90% { clip: rect(52px, 9999px, 36px, 0); transform: skew(0.87deg); }
  95% { clip: rect(65px, 9999px, 119px, 0); transform: skew(0.05deg); }
  100% { clip: rect(65px, 9999px, 119px, 0); transform: skew(0.05deg); }
}

@keyframes glitch-skew {
  0% { transform: skew(5deg); }
  10% { transform: skew(-5deg); }
  20% { transform: skew(2deg); }
  30% { transform: skew(-1deg); }
  40% { transform: skew(3deg); }
  50% { transform: skew(-2deg); }
  60% { transform: skew(4deg); }
  70% { transform: skew(-1deg); }
  80% { transform: skew(1deg); }
  90% { transform: skew(-3deg); }
  100% { transform: skew(2deg); }
}

/* Terminal window styling */
.terminal {
  background: linear-gradient(145deg, rgba(0, 0, 0, 0.9), rgba(0, 20, 20, 0.9));
  border: 2px solid var(--neon-cyan);
  border-radius: 8px;
  box-shadow: 
    0 0 20px rgba(0, 255, 255, 0.3),
    inset 0 0 20px rgba(0, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.terminal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-pink), var(--neon-cyan));
  opacity: 0.8;
}

.terminal::after {
  content: '● ● ●';
  position: absolute;
  top: 8px;
  left: 15px;
  color: var(--neon-green);
  font-size: 12px;
  z-index: 1;
}

.terminal-content {
  padding: 40px 20px 20px;
  position: relative;
}

/* Neon glow button */
.neon-btn {
  background: transparent;
  border: 2px solid var(--neon-cyan);
  color: var(--neon-cyan);
  padding: 12px 24px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.neon-btn:hover {
  background: var(--neon-cyan);
  color: var(--dark-bg);
  box-shadow: 
    0 0 20px var(--neon-cyan),
    0 0 40px var(--neon-cyan),
    0 0 60px var(--neon-cyan);
  text-shadow: none;
}

.neon-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.neon-btn:hover::before {
  left: 100%;
}

/* Section styling */
section {
  min-height: 100vh;
  padding: 80px 20px;
  position: relative;
}

.section-title {
  font-family: 'Orbitron', monospace;
  font-size: 3rem;
  font-weight: 900;
  text-align: center;
  margin-bottom: 3rem;
  background: linear-gradient(45deg, var(--neon-cyan), var(--neon-pink), var(--neon-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-pink));
  box-shadow: 0 0 10px var(--neon-cyan);
}

/* Card styling */
.retro-card {
  background: linear-gradient(145deg, rgba(0, 20, 20, 0.8), rgba(20, 0, 20, 0.8));
  border: 1px solid var(--neon-cyan);
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.retro-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-pink), var(--neon-green), var(--neon-cyan));
  animation: borderFlow 3s linear infinite;
}

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

.retro-card:hover {
  border-color: var(--neon-pink);
  box-shadow: 
    0 0 20px rgba(255, 0, 255, 0.3),
    inset 0 0 20px rgba(255, 0, 255, 0.1);
  transform: translateY(-5px);
}

/* Form styling */
.retro-form {
  max-width: 500px;
  margin: 0 auto;
}

.retro-input {
  width: 100%;
  padding: 12px;
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid var(--terminal-green);
  border-radius: 4px;
  color: var(--terminal-green);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

.retro-input:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
  color: var(--neon-cyan);
}

.retro-input::placeholder {
  color: rgba(0, 255, 65, 0.6);
}

/* Table styling */
.cyber-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid var(--neon-cyan);
  border-radius: 8px;
  overflow: hidden;
}

.cyber-table th {
  background: linear-gradient(45deg, var(--neon-cyan), var(--neon-pink));
  color: var(--dark-bg);
  padding: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cyber-table td {
  padding: 12px 15px;
  border-bottom: 1px solid rgba(0, 255, 255, 0.2);
  color: #ffffff;
}

.cyber-table tr:hover {
  background: rgba(0, 255, 255, 0.1);
}

/* Hero section specific */
#hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 100vh;
  overflow: hidden;
}

#hero video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  opacity: 0.3;
}

/* Overlay ASCII logo fixed at top without pushing layout */
#header-logo {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  margin: 0;
  pointer-events: none;
}

.hero-content {
  z-index: 10;
  max-width: 800px;
  padding: 0 20px;
}

.hero-subtitle {
  font-size: 1.5rem;
  margin: 2rem 0;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

/* Actions row and full-video layout */
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* Ensure action buttons share equal height */
.hero-actions .neon-btn {
  line-height: 1;
  height: 44px;
  display: inline-flex;
  align-items: center;
}

#hero.full-video .hero-actions {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  z-index: 21;
}

#hero.full-video .hero-content {
  max-width: 100%;
}

/* ASCII art styling */
.ascii-art {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--terminal-green);
  white-space: pre;
  text-align: center;
  margin: 20px 0;
  opacity: 0.8;
}

/* Scanlines effect */
.scanlines::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(transparent 50%, rgba(0, 255, 0, 0.03) 50%);
  background-size: 100% 4px;
  pointer-events: none;
  animation: scanlines 0.1s linear infinite;
}

@keyframes scanlines {
  0% { transform: translateY(0); }
  100% { transform: translateY(4px); }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .glitch {
    font-size: 2.5rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
  }
  
  section {
    padding: 60px 15px;
  }

  /* Reduce header ASCII size on mobile */
  #header-logo {
    top: 6px;
    transform: translateX(-50%) scale(0.7);
    transform-origin: top center;
    font-size: 8px;
  }

  /* Avoid header overlap with hero text */
  .hero-content {
    padding-top: 120px;
  }

  /* Stack action buttons on mobile */
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .neon-btn {
    width: 100%;
    height: 48px;
  }

  /* Make wide tables scrollable on small screens */
  .cyber-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}