/* DEMO CENTER  */
.demo-center {
  height: calc(100vh - var(--header-h));
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* =====================
   DEMO SPLIT LAYOUT
===================== */
.demo-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;

  width: 100%;
  max-width: 1400px;
  height: calc(100vh - 160px);

  margin: 0 auto;

  animation: hudFloat 6s ease-in-out infinite;
}

/* =====================
   PANELS
===================== */
.demo-panel {
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.45);
}

/* =====================
   VIDEO
===================== */
.demo-video video,
.demo-video iframe {
  width: 100%;
  height: 100%;
  border: none;
  object-fit: cover;
  background: black;
}

/* =====================
   TERMINAL
===================== */
.terminal {
  padding: 1.4rem;
  overflow-y: auto;
  animation: terminalGlow 3s ease-in-out infinite;
}

.line {
  margin-bottom: 0.5rem;
  white-space: pre-wrap;
  opacity: 0;
  animation: logAppear 0.6s ease forwards;
}

.line.system {
  color: #9ca3af;
}

.line.user {
  color: #6ee7ff;
}

.line.ai {
  color: #a5f3fc;
}

.line.ai.analyzing {
  animation:
    logAppear 0.6s ease forwards,
    analyzingPulse 1.4s ease-in-out infinite;
}

/* =====================
   FOOTER (OPTIONAL)
===================== */
.demo-footer {
  margin-top: 1.2rem;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-align: right;
  color: #67e8f9;
}

/* =====================
   ANIMATIONS
===================== */
@keyframes hudFloat {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes logAppear {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes terminalGlow {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(110, 231, 255, 0.15);
  }
  50% {
    box-shadow: 0 0 22px rgba(110, 231, 255, 0.3);
  }
}

/* =====================
   DEMO RESPONSIVE (MOBILE)
===================== */
@media (max-width: 768px) {
  .demo-center {
    height: auto;
    padding: 1rem 0;
  }

  .demo-split {
    grid-template-columns: 1fr;
    height: auto;
    gap: 1.2rem;
    animation: none;
  }

  .demo-panel {
    min-height: 240px;
    height: auto;
  }

  .terminal {
    font-size: 0.85rem;
  }

  .demo-video iframe {
    aspect-ratio: 16 / 9;
  }
}
