/* ========================================
   SYSTEM 6 HOTLINE - Terminal UI Styles
   ======================================== */

/* === RESET & BASE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background: #000;
  color: #fff;
  min-height: 100vh;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

/* === GLITCH BACKGROUND (from news page) === */
.glitch-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 0, 0.03) 2px,
    rgba(0, 255, 0, 0.03) 4px
  );
  pointer-events: none;
  z-index: 9999;
  animation: vhs-scanlines 0.5s infinite;
}

@keyframes vhs-scanlines {
  0% { transform: translateY(0); }
  100% { transform: translateY(4px); }
}

/* VHS tracking distortion */
.glitch-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(255, 0, 0, 0.05) 25%,
    transparent 25%,
    transparent 50%,
    rgba(0, 255, 0, 0.05) 50%,
    transparent 75%,
    rgba(0, 0, 255, 0.05) 75%,
    transparent 100%
  );
  animation: tracking-distortion 4s infinite;
  opacity: 0;
}

@keyframes tracking-distortion {
  0%, 90%, 100% { opacity: 0; transform: translateX(0); }
  92% { opacity: 0.6; transform: translateX(-10px); }
  94% { opacity: 0.8; transform: translateX(15px); }
  96% { opacity: 0.4; transform: translateX(-5px); }
}

/* Static noise overlay */
.glitch-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
  animation: static-noise 0.2s infinite;
  opacity: 0.3;
}

@keyframes static-noise {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.35; }
}

/* Intensify on interaction */
.glitch-bg.active {
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 0, 0.05) 2px,
    rgba(0, 255, 0, 0.05) 4px
  );
}

.glitch-bg.active::before {
  animation: tracking-distortion 2s infinite;
}

.glitch-bg.intense {
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(255, 255, 0, 0.03) 3px,
    rgba(255, 255, 0, 0.03) 6px
  );
  animation: cyber-scan 4s linear infinite;
}

.glitch-bg.intense::before {
  animation: digital-bars 3s infinite;
}

@keyframes cyber-scan {
  0% { transform: translateY(0); }
  100% { transform: translateY(6px); }
}

@keyframes digital-bars {
  0%, 85%, 100% { opacity: 0; }
  86% { opacity: 1; transform: translateX(-100px); }
  87% { opacity: 0.8; transform: translateX(50px); }
  88% { opacity: 0.6; transform: translateX(-20px); }
  89% { opacity: 0; }
}

/* === CONTAINER === */
.container {
  max-width: 600px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* === BACK LINK === */
.back-link {
  display: inline-block;
  margin-bottom: 30px;
  color: #667eea;
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.3s ease;
  align-self: flex-start;
}

.back-link:hover {
  color: #764ba2;
  transform: translateX(-5px);
}

/* === TERMINAL BOX === */
.terminal {
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid rgba(0, 255, 0, 0.4);
  max-width: 600px;
  width: 100%;
  font-family: 'Courier New', monospace;
  box-shadow:
    inset 0 0 30px rgba(0, 255, 0, 0.1),
    0 0 30px rgba(0, 255, 0, 0.2);
  clip-path: polygon(0 0, 100% 0, 100% 95%, 95% 100%, 0 100%);
}

/* === TERMINAL HEADER === */
.terminal-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 255, 0, 0.2);
  background: rgba(0, 0, 0, 0.3);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

.terminal-dot:nth-child(1) { background: #ff5f56; }
.terminal-dot:nth-child(2) { background: #ffbd2e; }
.terminal-dot:nth-child(3) { background: #27c93f; }

.terminal-title {
  color: #00ff00;
  font-size: 0.85rem;
  letter-spacing: 2px;
  margin-left: 12px;
  font-weight: bold;
}

/* === TERMINAL BODY === */
.terminal-body {
  padding: 20px;
}

/* === STATUS LINES === */
.status-line {
  color: #00ff00;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  margin-bottom: 6px;
  line-height: 1.5;
}

.status-line.center {
  text-align: center;
}

.highlight {
  color: #00ffff;
}

.signal-indicator {
  color: #00ff00;
  letter-spacing: -1px;
  font-size: 0.85em;
}

#signal-status {
  color: #ffff00;
  font-weight: bold;
}

.success {
  color: #00ff00;
  text-shadow: 0 0 10px rgba(0, 255, 0, 0.5), 0 0 20px rgba(0, 255, 0, 0.3);
}

/* === DIVIDER === */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 0, 0.4), transparent);
  margin: 15px 0;
}

/* === STATES === */
.state {
  display: none;
  text-align: center;
  padding: 20px 0;
}

.state.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* === ACTION BUTTON (PRIMARY) === */
.action-btn {
  display: inline-block;
  background: transparent;
  border: 2px solid #00ff00;
  color: #00ff00;
  padding: 15px 30px;
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 15px;
  text-decoration: none;
}

.action-btn:hover {
  background: rgba(0, 255, 0, 0.1);
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.4);
  transform: translateY(-2px);
}

.action-btn:active {
  transform: translateY(0);
}

.btn-icon {
  margin-right: 8px;
}

/* === RINGING BUTTON PULSE === */
.action-btn.ringing {
  animation: pulse-glow 1s infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    border-color: #00ff00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
  }
  50% {
    border-color: #00ff00;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.6), 0 0 60px rgba(0, 255, 0, 0.3);
  }
}

/* === CTA BUTTON (JOIN A-LIST) === */
.cta-btn {
  border-color: #667eea;
  color: #667eea;
  display: block;
  margin: 15px auto 0 auto;
}

.cta-btn:hover {
  background: rgba(102, 126, 234, 0.1);
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.4);
  color: #667eea;
}

/* === REPLAY BUTTON === */
.replay-btn {
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #888;
  font-size: 0.85rem;
  padding: 10px 20px;
  display: block;
  margin: 12px auto 0 auto;
}

.replay-btn:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: #ccc;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
}

/* === CTA SECTION === */
.cta-section {
  text-align: center;
}

.cta-text {
  color: #ccc;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 5px;
}

/* === WAVEFORM ANIMATION === */
.waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 60px;
  margin-top: 15px;
}

.wave-bar {
  width: 3px;
  background: #00ff00;
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(0, 255, 0, 0.5);
  animation: waveform-bounce 0.8s ease-in-out infinite;
}

.wave-bar:nth-child(1)  { animation-delay: 0.00s; height: 15px; }
.wave-bar:nth-child(2)  { animation-delay: 0.05s; height: 25px; }
.wave-bar:nth-child(3)  { animation-delay: 0.10s; height: 35px; }
.wave-bar:nth-child(4)  { animation-delay: 0.15s; height: 20px; }
.wave-bar:nth-child(5)  { animation-delay: 0.20s; height: 40px; }
.wave-bar:nth-child(6)  { animation-delay: 0.25s; height: 30px; }
.wave-bar:nth-child(7)  { animation-delay: 0.30s; height: 45px; }
.wave-bar:nth-child(8)  { animation-delay: 0.35s; height: 20px; }
.wave-bar:nth-child(9)  { animation-delay: 0.40s; height: 35px; }
.wave-bar:nth-child(10) { animation-delay: 0.45s; height: 50px; }
.wave-bar:nth-child(11) { animation-delay: 0.50s; height: 25px; }
.wave-bar:nth-child(12) { animation-delay: 0.55s; height: 40px; }
.wave-bar:nth-child(13) { animation-delay: 0.60s; height: 15px; }
.wave-bar:nth-child(14) { animation-delay: 0.65s; height: 30px; }
.wave-bar:nth-child(15) { animation-delay: 0.70s; height: 45px; }
.wave-bar:nth-child(16) { animation-delay: 0.75s; height: 20px; }

@keyframes waveform-bounce {
  0%, 100% {
    transform: scaleY(0.3);
  }
  50% {
    transform: scaleY(1);
  }
}

/* === PULSE TEXT (RINGING STATE) === */
.pulse-text {
  animation: pulse-green 1s infinite;
}

@keyframes pulse-green {
  0%, 100% {
    opacity: 1;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
  }
  50% {
    opacity: 0.6;
    text-shadow: 0 0 20px rgba(0, 255, 0, 0.8);
  }
}

/* === CURSOR BLINK === */
.cursor {
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* === TERMINAL FOOTER === */
.terminal-footer {
  display: flex;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid rgba(0, 255, 0, 0.2);
}

.footer-status {
  color: #444;
  font-family: 'Courier New', monospace;
  font-size: 0.7rem;
  letter-spacing: 1px;
}

/* === PAGE FOOTER === */
footer {
  text-align: center;
  color: #666;
  font-size: 0.85rem;
  margin-top: 60px;
  padding-top: 20px;
  padding-bottom: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer a {
  color: #667eea;
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: #764ba2;
}

footer p {
  margin-bottom: 10px;
}

/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */

/* Tablet and smaller */
@media (max-width: 768px) {
  body {
    padding: 30px 15px;
  }

  .terminal-body {
    padding: 15px;
  }

  .status-line {
    font-size: 0.8rem;
  }

  .action-btn {
    padding: 12px 24px;
    font-size: 1rem;
    letter-spacing: 1px;
  }

  .terminal-title {
    font-size: 0.75rem;
    letter-spacing: 1px;
  }

  .terminal-footer {
    padding: 8px 12px;
  }

  .footer-status {
    font-size: 0.6rem;
  }

  .waveform {
    height: 50px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  body {
    padding: 20px 10px;
  }

  .terminal {
    max-width: calc(100vw - 40px);
  }

  .terminal-body {
    padding: 12px;
  }

  .status-line {
    font-size: 0.75rem;
  }

  .action-btn {
    padding: 10px 18px;
    font-size: 0.85rem;
    letter-spacing: 1px;
  }

  .cta-text {
    font-size: 0.8rem;
  }

  .replay-btn {
    font-size: 0.75rem;
    padding: 8px 16px;
  }

  .terminal-header {
    padding: 8px 12px;
  }

  .terminal-dot {
    width: 10px;
    height: 10px;
    margin-right: 4px;
  }

  .terminal-title {
    font-size: 0.65rem;
  }

  .terminal-footer {
    flex-direction: column;
    gap: 4px;
    padding: 8px 12px;
  }

  .waveform {
    height: 40px;
    gap: 3px;
  }

  .wave-bar {
    width: 2px;
  }

  .back-link {
    font-size: 0.9rem;
    margin-bottom: 20px;
  }
}

/* Short screens (landscape mobile) */
@media (max-height: 600px) {
  body {
    padding: 15px 15px;
    justify-content: flex-start;
  }

  .terminal-body {
    padding: 10px 15px;
  }

  .state {
    padding: 10px 0;
  }

  .action-btn {
    padding: 10px 20px;
    margin-top: 10px;
  }

  .divider {
    margin: 10px 0;
  }

  .back-link {
    margin-bottom: 15px;
  }

  footer {
    margin-top: 30px;
  }

  .waveform {
    height: 35px;
  }
}
