/* NeuroPOS Landing Page - Yellow and black concept (constellation-style, clearly visible) */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: #000;
  min-height: 100vh;
  color: #e2e8f0;
  position: relative;
}

/* Futuristic 3D-style background (yellow and black, clearly visible animations) */
.landing-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  perspective: 1200px;
}
.landing-bg-gradient {
  position: absolute;
  inset: 0;
  background: #000;
}
.landing-bg-dots-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transform-style: preserve-3d;
}
/* 3D network canvas (drawn by JS); when no canvas, SVG fallback shows */
.landing-bg-network {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.9;
}
.landing-bg-dots-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.landing-connectors .connector {
  fill: none;
  stroke: url(#yellow-grad);
  stroke-opacity: 0.85;
  stroke-width: 1.2;
  filter: url(#glow);
  animation: connectorGlow 6s ease-in-out infinite;
}
.landing-connectors .connector:nth-child(odd) { animation-delay: 0s; }
.landing-connectors .connector:nth-child(3n) { animation-delay: -1.5s; }
.landing-connectors .connector:nth-child(5n) { animation-delay: -3s; }
@keyframes connectorGlow {
  0%, 100% { stroke-opacity: 0.75; }
  50% { stroke-opacity: 0.95; }
}
/* Dots: filled (yellow) + rings, pulse - clearly visible */
.landing-dot-layer .dot-filled {
  fill: #facc15;
  fill-opacity: 0.95;
  animation: dotPulse 4s ease-in-out infinite;
}
.landing-dot-layer .dot-ring {
  fill: none;
  stroke: #fbbf24;
  stroke-opacity: 0.9;
  stroke-width: 2;
  animation: dotPulse 5s ease-in-out infinite;
}
.landing-dot-layer .dot:nth-child(odd) { animation-delay: -0.5s; }
.landing-dot-layer .dot:nth-child(3n) { animation-delay: -1.5s; }
.landing-dot-layer .dot:nth-child(5n) { animation-delay: -2.5s; }
.landing-dot-layer .dot { transform-box: fill-box; transform-origin: center; }
@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.15); opacity: 1; }
}
/* Grid overlay (subtle yellow) */
.landing-bg-grid {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  pointer-events: none;
}
.landing-bg-grid svg { width: 100%; height: 100%; display: block; }
/* Floating particles (created by JS) */
.landing-bg-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.landing-bg-particles .particle {
  position: absolute;
  bottom: -10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(250, 204, 21, 0.95);
  animation: particleFloat 12s linear infinite;
  opacity: 0;
}
.landing-bg-particles .particle.particle-glow {
  width: 10px;
  height: 10px;
  margin-left: -2px;
  margin-bottom: -2px;
  background: rgba(254, 240, 138, 0.9);
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.9);
  animation-duration: 14s;
}
@keyframes particleFloat {
  0% { transform: translateY(0); opacity: 0; }
  8% { opacity: 0.8; }
  90% { opacity: 0.6; }
  100% { transform: translateY(-100vh); opacity: 0; }
}
/* Vertical stream lines (yellow, clearly visible) */
.landing-bg-streams {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.landing-bg-streams .stream-line {
  position: absolute;
  bottom: 0;
  width: 2px;
  height: 60vh;
  background: linear-gradient(to top, transparent, rgba(250, 204, 21, 0.6), rgba(254, 240, 138, 0.9), transparent);
  animation: streamRise 6s linear infinite;
}
.landing-bg-streams .stream-line:nth-child(1) { left: 12%; animation-delay: 0s; }
.landing-bg-streams .stream-line:nth-child(2) { left: 28%; animation-delay: 1s; }
.landing-bg-streams .stream-line:nth-child(3) { left: 50%; animation-delay: 2s; }
.landing-bg-streams .stream-line:nth-child(4) { left: 68%; animation-delay: 3s; }
.landing-bg-streams .stream-line:nth-child(5) { left: 82%; animation-delay: 4s; }
.landing-bg-streams .stream-line:nth-child(6) { left: 94%; animation-delay: 5s; }
@keyframes streamRise {
  0% { transform: translateY(0); opacity: 0; }
  5% { opacity: 1; }
  93% { opacity: 0.95; }
  100% { transform: translateY(-100vh); opacity: 0; }
}
/* Horizontal scan line (yellow, clearly visible) */
.landing-bg-scanline {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(250, 204, 21, 0.8), #facc15, rgba(254, 240, 138, 0.8), transparent);
  animation: scanlineMove 5s linear infinite;
  pointer-events: none;
}
@keyframes scanlineMove {
  0% { top: -2px; opacity: 0; }
  5% { opacity: 1; }
  95% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}
/* Vignette */
.landing-bg-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.2) 100%);
  pointer-events: none;
}

.landing-header,
.landing-hero,
#loginOverlay { position: relative; z-index: 1; }

/* Header: black bar, yellow logo + white nav, yellow CTA */
.landing-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(0, 0, 0, 0.92);
  border-bottom: 1px solid rgba(250, 204, 21, 0.25);
  z-index: 1000;
}
.landing-brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.landing-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #facc15;
  color: #000;
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.landing-brand { font-size: 20px; font-weight: 700; color: #facc15; }
.landing-nav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.landing-nav a { color: #fff; text-decoration: none; font-size: 14px; font-weight: 500; }
.landing-nav a:hover { color: #fef08a; }
.landing-admin-nav { color: #fff; text-decoration: none; font-size: 14px; }
.landing-admin-nav:hover { color: #fef08a; }
.landing-btn-primary {
  background: #facc15;
  color: #000;
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.landing-btn-primary:hover { background: #fef08a; color: #000; transform: translateY(-1px); }

/* Hero: tagline (yellow) + 3-line headline (white) + description + buttons */
.landing-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 48px;
  text-align: center;
}
.landing-hero-tagline {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #facc15;
  margin-bottom: 20px;
  text-transform: uppercase;
}
.landing-hero-headline {
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 0.1em;
}
.landing-hero-headline span { display: block; }
.landing-hero-desc {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 36rem;
  margin: 0 auto 32px;
  line-height: 1.6;
}
.landing-hero .env-badge { font-size: 14px; color: #facc15; margin-top: 16px; }
.landing-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  align-items: center;
}
.landing-hero-actions .landing-btn-primary { padding: 14px 28px; font-size: 16px; text-decoration: none; }
.landing-btn-outline {
  display: inline-block;
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.landing-btn-outline:hover { background: rgba(255, 255, 255, 0.15); color: #fff; border-color: #facc15; }

/* Login modal overlay */
#loginOverlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.8);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#loginOverlay.show { display: flex; }
/* Login modal - yellowish and black to match landing background */
.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 500px;
  background: rgba(10, 10, 10, 0.97);
  border: 2px solid rgba(251, 191, 36, 0.6);
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5), 0 0 40px rgba(250, 204, 21, 0.15);
  overflow: hidden;
}
.modal-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 36px; height: 36px;
  background: rgba(75, 85, 99, 0.8);
  color: #e5e7eb;
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}
.modal-close:hover { background: rgba(251, 191, 36, 0.2); color: #fbbf24; border-color: rgba(251, 191, 36, 0.5); }
.modal-body { padding: 40px 30px; color: #f5f5f5; }
.modal-title { font-size: 24px; font-weight: 700; color: #fff; margin-bottom: 8px; text-align: center; }
.modal-desc { font-size: 16px; color: rgba(251, 191, 36, 0.9); text-align: center; margin-bottom: 24px; }
.modal-form .field { margin-bottom: 20px; }
.modal-form label { display: block; font-weight: 600; color: rgba(253, 230, 138, 0.95); margin-bottom: 8px; font-size: 14px; }
.modal-form input[type="text"],
.modal-form input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid rgba(251, 191, 36, 0.4);
  border-radius: 8px;
  font-size: 16px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
}
.modal-form input::placeholder { color: #9ca3af; }
.modal-form input:focus { outline: none; border-color: #fbbf24; box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.25); }
.tenant-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.tenant-quick button {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(251, 191, 36, 0.4);
  background: rgba(0, 0, 0, 0.4);
  color: #fde68a;
  font-size: 14px;
  cursor: pointer;
}
.tenant-quick button.active { background: rgba(251, 191, 36, 0.3); color: #fbbf24; border-color: #fbbf24; }
.tenant-ok { margin-top: 8px; padding: 8px 12px; background: rgba(34, 197, 94, 0.2); color: #86efac; border: 1px solid rgba(34, 197, 94, 0.5); border-radius: 8px; font-size: 14px; display: none; }
.tenant-err { margin-top: 8px; padding: 8px 12px; background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.5); border-radius: 8px; font-size: 14px; display: none; }
.modal-form .submit-btn {
  width: 100%;
  padding: 14px;
  background: #fbbf24;
  color: #000;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  box-shadow: 0 4px 14px rgba(251, 191, 36, 0.35);
}
.modal-form .submit-btn:hover { background: #fcd34d; box-shadow: 0 4px 20px rgba(251, 191, 36, 0.45); }
.modal-form .submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.modal-admin-link { text-align: center; margin-top: 20px; padding-top: 20px; border-top: 1px solid rgba(251, 191, 36, 0.3); }
.modal-admin-link a { color: #fbbf24; text-decoration: none; font-size: 14px; font-weight: 500; }
.modal-admin-link a:hover { text-decoration: underline; color: #fcd34d; }
#loginMessage {
  margin-top: 16px;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  display: none;
}
#loginMessage.error { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.5); display: block; }
#loginMessage.success { background: rgba(34, 197, 94, 0.2); color: #86efac; border: 1px solid rgba(34, 197, 94, 0.5); display: block; }
#loginMessage.info { background: rgba(59, 130, 246, 0.2); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.5); display: block; }
