/* CRT Terminal Styling */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  width: 100%;
  background: #0a0a0a;
  overflow: hidden;
}

#terminal-container {
  height: 100%;
  width: 100%;
  padding: 20px;
  background: #0a0a0a;
  position: relative;
}

/* Mobile responsive */
@media (max-width: 768px) {
  #terminal-container {
    padding: 10px;
  }
}

/* CRT screen effect */
#terminal-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%,
    rgba(0, 0, 0, 0.1) 50%
  );
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 10;
}

/* Subtle screen flicker */
#terminal-container::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(18, 16, 16, 0.1);
  opacity: 0;
  pointer-events: none;
  z-index: 11;
  animation: flicker 0.15s infinite;
}

@keyframes flicker {
  0% { opacity: 0.27861; }
  5% { opacity: 0.34769; }
  10% { opacity: 0.23604; }
  15% { opacity: 0.90626; }
  20% { opacity: 0.18128; }
  25% { opacity: 0.83891; }
  30% { opacity: 0.65583; }
  35% { opacity: 0.67807; }
  40% { opacity: 0.26559; }
  45% { opacity: 0.84693; }
  50% { opacity: 0.96019; }
  55% { opacity: 0.08594; }
  60% { opacity: 0.20313; }
  65% { opacity: 0.71988; }
  70% { opacity: 0.53455; }
  75% { opacity: 0.37288; }
  80% { opacity: 0.71428; }
  85% { opacity: 0.70419; }
  90% { opacity: 0.7003; }
  95% { opacity: 0.36108; }
  100% { opacity: 0.24387; }
}

#terminal {
  height: 100%;
  width: 100%;
}

/* Override xterm.js styles for green phosphor look */
.xterm {
  padding: 10px;
}

.xterm-viewport {
  background: #0a0a0a !important;
}

.xterm-screen {
  background: #0a0a0a;
}

/* Text glow effect */
.xterm-rows {
  text-shadow: 0 0 5px rgba(51, 255, 51, 0.5);
}

/* Call indicator */
#call-indicator {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: rgba(255, 50, 50, 0.2);
  border: 1px solid #ff3232;
  border-radius: 4px;
  color: #ff3232;
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 12px;
  z-index: 100;
  text-shadow: 0 0 10px rgba(255, 50, 50, 0.8);
}

#call-indicator.hidden {
  display: none;
}

@media (max-width: 768px) {
  #call-indicator {
    top: 10px;
    right: 10px;
    padding: 8px 12px;
    font-size: 10px;
  }
}

#call-indicator .pulse {
  width: 10px;
  height: 10px;
  background: #ff3232;
  border-radius: 50%;
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

/* Scanline animation (subtle) */
@keyframes scanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

/* Selection color */
::selection {
  background: rgba(51, 255, 51, 0.3);
}

/* Scrollbar styling */
.xterm-viewport::-webkit-scrollbar {
  width: 8px;
}

.xterm-viewport::-webkit-scrollbar-track {
  background: #0a0a0a;
}

.xterm-viewport::-webkit-scrollbar-thumb {
  background: #33ff33;
  border-radius: 4px;
}

.xterm-viewport::-webkit-scrollbar-thumb:hover {
  background: #66ff66;
}
