/* static/css/style.css */
:root {
  --bg-void: #050510;
  --surface-deep: #0a0a1a;
  --purple-neon: #8342de;
  --purple-glow: rgba(131, 66, 222, 0.5);
  --cream-soft: #f7f0e8;
  --yellow-accent: #faec71;
  --yellow-glow: rgba(250, 236, 113, 0.4);
  --text-main: #e8e8f0;
  --text-dim: #8888aa;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --font-mono: 'JetBrains Mono', monospace;
  --font-display: 'Plus Jakarta Sans', sans-serif;
}

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

body {
  background: var(--bg-void);
  color: var(--text-main);
  font-family: var(--font-display);
  overflow: hidden;
  height: 100vh;
}

/* Grid de fondo cyberpunk */
.cyber-grid {
  position: relative;
}
.cyber-grid::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(131, 66, 222, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(131, 66, 222, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Navegación HUD lateral */
.hud-nav {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: 80px;
  background: rgba(10, 10, 26, 0.9);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 0;
  z-index: 100;
  transition: width 0.3s ease;
}

.hud-nav:hover {
  width: 200px;
}

.hud-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.logo-hexagon {
  width: 78px;
  height: 78px;
  background: linear-gradient(135deg, var(--purple-neon), #020202);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px var(--purple-glow);
  animation: hexPulse 3s ease-in-out infinite;
}

@keyframes hexPulse {
  0%, 100% { box-shadow: 0 0 25px var(--purple-glow); }
  50% { box-shadow: 0 0 45px var(--purple-glow), 0 0 80px rgba(131, 66, 222, 0.3); }
}

.logo-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.brand-text {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  writing-mode: vertical-rl;
  letter-spacing: 0.2em;
  opacity: 0.7;
  white-space: nowrap;
}

.hud-nav:hover .brand-text {
  writing-mode: horizontal-tb;
  font-size: 0.7rem;
}

/* Links del HUD */
.hud-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  width: 100%;
  padding: 0 0.5rem;
}

.hud-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 12px;
  color: var(--text-dim);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.hud-link i {
  font-size: 1.2rem;
  min-width: 24px;
  text-align: center;
}

.hud-link .link-text {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  opacity: 0;
  transition: opacity 0.3s ease;
  white-space: nowrap;
}

.hud-nav:hover .hud-link .link-text {
  opacity: 1;
}

.hud-link:hover {
  background: rgba(131, 66, 222, 0.15);
  color: var(--cream-soft);
}

.hud-link.active {
  background: rgba(131, 66, 222, 0.25);
  color: var(--yellow-accent);
  box-shadow: inset 3px 0 0 var(--yellow-accent);
}

.hud-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--yellow-accent);
  border-radius: 0 3px 3px 0;
}

/* Footer del HUD */
.hud-footer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: auto;
}

.hud-social {
  color: var(--text-dim);
  font-size: 1.1rem;
  transition: all 0.3s ease;
  padding: 0.5rem;
  border-radius: 8px;
}

.hud-social:hover {
  color: var(--yellow-accent);
  background: rgba(250, 236, 113, 0.1);
}

/* Contenedor principal */
.main-stream {
  margin-left: 80px;
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  position: relative;
  z-index: 1;
}

.main-stream::-webkit-scrollbar {
  width: 0;
}

/* Secciones */
.stream-section {
  min-height: 100vh;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  position: relative;
  border-bottom: 1px solid var(--border-subtle);
}

.data-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 3rem;
  position: relative;
}

/* Línea de escaneo */
.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(250, 236, 113, 0.2);
  animation: scanDown 4s linear infinite;
  pointer-events: none;
  z-index: 10;
}

@keyframes scanDown {
  0% { top: 0; }
  100% { top: 100%; }
}

/* Partículas */
.floating-particles {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--purple-neon);
  border-radius: 50%;
  animation: floatUp linear infinite;
  opacity: 0.6;
}

@keyframes floatUp {
  0% { transform: translateY(0) scale(1); opacity: 0.8; }
  100% { transform: translateY(-100vh) scale(0); opacity: 0; }
}

/* Hero */
.hero-content {
  padding-right: 3rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  background: rgba(10, 10, 26, 0.8);
  border: 1px solid var(--border-subtle);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  margin-bottom: 1.5rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #00ff88;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 5px #00ff88; }
  50% { box-shadow: 0 0 20px #00ff88, 0 0 35px #00ff88; }
}

.hero-title {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--cream-soft);
}

.highlight-glitch {
  color: var(--yellow-accent);
  position: relative;
}

.hero-text-stream {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.hero-text-stream strong {
  color: var(--text-main);
}

/* CTAs */
.cta-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--purple-neon), #6b21d4);
  color: var(--cream-soft);
  padding: 0.8rem 1.8rem;
  border-radius: 30px;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 0 25px var(--purple-glow);
}

.cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px var(--purple-glow);
  color: var(--cream-soft);
}

.cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(250, 236, 113, 0.4);
  color: var(--yellow-accent);
  padding: 0.8rem 1.8rem;
  border-radius: 30px;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
}

.cta-secondary:hover {
  background: rgba(250, 236, 113, 0.1);
  border-color: var(--yellow-accent);
  color: var(--yellow-accent);
}

/* Hero visual */
.hero-visual {
  display: flex;
  justify-content: center;
}

.hex-card {
  position: relative;
  width: 350px;
  height: 350px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.hex-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hex-border {
  position: absolute;
  inset: 0;
  border: 2px solid var(--purple-neon);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  box-shadow: inset 0 0 30px rgba(131, 66, 222, 0.4);
  animation: hexGlow 2s ease-in-out infinite alternate;
}

@keyframes hexGlow {
  0% { box-shadow: inset 0 0 20px rgba(131, 66, 222, 0.3); }
  100% { box-shadow: inset 0 0 40px rgba(131, 66, 222, 0.6), 0 0 50px rgba(250, 236, 113, 0.3); }
}

/* Marcadores de sección */
.section-marker {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--purple-neon);
  letter-spacing: 0.2em;
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--cream-soft);
  margin-bottom: 1.5rem;
}

.content-stream {
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.7;
}

.content-stream strong {
  color: var(--text-main);
}

/* Glitch frame */
.glitch-frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
}

.frame-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
}

.frame-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, rgba(131, 66, 222, 0.2), transparent);
  border-radius: 16px;
}

/* Card stack */
.card-stack {
  position: relative;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stack-card {
  position: absolute;
  width: 280px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  transition: transform 0.3s ease;
}

.stack-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-back {
  transform: rotate(-6deg) translateX(-30px);
  z-index: 1;
  opacity: 0.5;
}

.card-middle {
  transform: rotate(3deg) translateY(-10px);
  z-index: 2;
  opacity: 0.7;
}

.card-front {
  transform: rotate(0deg);
  z-index: 3;
  box-shadow: 0 15px 50px rgba(131, 66, 222, 0.4);
}

.card-stack:hover .card-back {
  transform: rotate(-10deg) translateX(-50px);
}
.card-stack:hover .card-middle {
  transform: rotate(5deg) translateY(-20px);
}

/* Holograma */
.hologram-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
}

.holo-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 16px;
  filter: brightness(1.1) contrast(1.2) saturate(0.8);
  border: 1px solid rgba(131, 66, 222, 0.4);
}

.holo-scan {
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(250, 236, 113, 0.15), transparent);
  animation: holoScan 3s ease-in-out infinite;
}

@keyframes holoScan {
  0% { left: -50%; }
  100% { left: 150%; }
}

/* Network visual */
.network-visual {
  position: relative;
}

.network-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
}

.node {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--yellow-accent);
  border-radius: 50%;
  box-shadow: 0 0 15px var(--yellow-glow);
  animation: nodeBlink 2s ease-in-out infinite;
}

.node-1 { top: 15%; left: 20%; animation-delay: 0s; }
.node-2 { top: 60%; right: 15%; animation-delay: 0.5s; }
.node-3 { bottom: 20%; left: 30%; animation-delay: 1s; }
.node-4 { top: 40%; right: 30%; animation-delay: 1.5s; }

@keyframes nodeBlink {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.8); }
}

/* Terminal */
.terminal-window {
  background: rgba(5, 5, 16, 0.95);
  border: 1px solid rgba(131, 66, 222, 0.3);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

.terminal-header {
  background: rgba(10, 10, 26, 0.9);
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27ca40; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-left: 0.5rem;
}

.terminal-body {
  padding: 2rem;
}

.terminal-title-text {
  font-family: var(--font-display) !important;
  font-size: 2rem;
  color: #00ff88 !important;
}

.terminal-text {
  color: #a0a0b0 !important;
}

.terminal-prompt {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  font-family: var(--font-mono);
}

.prompt-sign {
  color: #00ff88;
  font-weight: bold;
}

.prompt-link {
  color: var(--yellow-accent);
  text-decoration: none;
  transition: all 0.3s ease;
}

.prompt-link:hover {
  color: #00ff88;
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.terminal-image-container {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}

.terminal-img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  border-radius: 8px;
  opacity: 0.8;
}

.image-scan-effect {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 255, 136, 0.05) 0%, transparent 50%);
  animation: imageScan 2s ease-in-out infinite;
}

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

.terminal-footer {
  padding: 0.8rem 2rem;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.blinking-cursor {
  color: #00ff88;
  animation: blink 1s step-end infinite;
}

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

/* Indicador de scroll */
.scroll-indicator {
  position: fixed;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 150px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  z-index: 50;
}

.scroll-bar {
  width: 100%;
  background: var(--purple-neon);
  border-radius: 3px;
  transition: height 0.1s ease;
  box-shadow: 0 0 10px var(--purple-glow);
}

/* Responsive */
@media (max-width: 992px) {
  .hud-nav {
    width: 60px;
    padding: 1rem 0;
  }
  
  .hud-nav:hover {
    width: 60px;
  }
  
  .main-stream {
    margin-left: 60px;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 1.6rem;
  }
  
  .data-container {
    padding: 1.5rem;
  }
  
  .hex-card {
    width: 250px;
    height: 250px;
  }
  
  .card-stack {
    height: 300px;
  }
  
  .stack-card {
    width: 200px;
  }
  
  .stack-img {
    height: 140px;
  }
}

@media (max-width: 768px) {
  .hud-nav {
    bottom: 0;
    top: auto;
    width: 100%;
    height: 65px;
    flex-direction: row;
    padding: 0 0.5rem;
    border-right: none;
    border-top: 1px solid var(--border-subtle);
  }
  
  .hud-nav:hover {
    width: 100%;
  }
  
  .hud-brand {
    display: none;
  }
  
  .hud-links {
    flex-direction: row;
    flex: 1;
    justify-content: space-around;
    padding: 0;
  }
  
  .hud-link {
    flex-direction: column;
    padding: 0.4rem;
    gap: 0.2rem;
  }
  
  .hud-link .link-text {
    font-size: 0.55rem;
    opacity: 1;
  }
  
  .hud-footer {
    display: none;
  }
  
  .main-stream {
    margin-left: 0;
    margin-bottom: 65px;
    scroll-snap-type: y proximity;
  }
  
  .scroll-indicator {
    display: none;
  }
  
  .hero-title {
    font-size: 1.6rem;
  }
  
  .section-title {
    font-size: 1.4rem;
  }
}