.gwilo-terminal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 999999;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gwilo-terminal-overlay.gwilo-terminal-active {
  opacity: 1;
}

.gwilo-terminal {
  width: 100%;
  max-width: 900px;
  height: 70vh;
  max-height: 600px;
  background: #0a0a0a;
  border: 2px solid hsl(190, 20%, 50%);
  border-radius: 12px;
  box-shadow: 0 0 40px hsla(190, 20%, 50%, 0.3),
              0 0 80px hsla(190, 20%, 50%, 0.1),
              inset 0 0 60px hsla(190, 20%, 50%, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  animation: gwilo-terminal-glow 2s ease-in-out infinite alternate;
}

.gwilo-terminal-active .gwilo-terminal {
  transform: scale(1);
}

@keyframes gwilo-terminal-glow {
  0% {
    box-shadow: 0 0 40px hsla(190, 20%, 50%, 0.3),
                0 0 80px hsla(190, 20%, 50%, 0.1),
                inset 0 0 60px hsla(190, 20%, 50%, 0.05);
  }
  100% {
    box-shadow: 0 0 50px hsla(190, 20%, 50%, 0.4),
                0 0 100px hsla(190, 20%, 50%, 0.2),
                inset 0 0 80px hsla(190, 20%, 50%, 0.08);
  }
}

.gwilo-terminal-header {
  background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
  border-bottom: 1px solid hsl(190, 20%, 50%);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px hsla(190, 20%, 50%, 0.2);
}

.gwilo-terminal-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: hsl(190, 20%, 50%);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.gwilo-terminal-icon {
  font-size: 1.2rem;
  animation: gwilo-terminal-pulse 2s ease-in-out infinite;
}

@keyframes gwilo-terminal-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.gwilo-terminal-close {
  background: transparent;
  border: 1px solid hsl(190, 20%, 50%);
  color: hsl(190, 20%, 50%);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  line-height: 1;
  padding: 0;
}

.gwilo-terminal-close:hover {
  background: hsl(190, 20%, 50%);
  color: #0a0a0a;
  transform: rotate(90deg);
  box-shadow: 0 0 20px hsla(190, 20%, 50%, 0.5);
}

.gwilo-terminal-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  line-height: 1.6;
  color: hsl(153, 20%, 50%);
  background: #000000;
  position: relative;
}

.gwilo-terminal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    hsla(190, 20%, 50%, 0.03) 0px,
    hsla(190, 20%, 50%, 0.03) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  z-index: 0;
}

@keyframes gwilo-terminal-scanline {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(20px);
  }
}

.gwilo-terminal-content::-webkit-scrollbar {
  width: 8px;
}

.gwilo-terminal-content::-webkit-scrollbar-track {
  background: #0a0a0a;
}

.gwilo-terminal-content::-webkit-scrollbar-thumb {
  background: hsl(190, 20%, 50%);
  border-radius: 4px;
}

.gwilo-terminal-content::-webkit-scrollbar-thumb:hover {
  background: hsl(190, 20%, 45%);
}

.gwilo-terminal-welcome {
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.gwilo-ascii-art {
  color: hsl(190, 20%, 50%);
  font-size: 0.75rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  text-shadow: 0 0 10px hsla(190, 20%, 50%, 0.5);
  font-weight: bold;
}

.gwilo-terminal-welcome p {
  color: hsl(153, 20%, 50%);
  margin: 0.5rem 0;
}

.gwilo-terminal-hint {
  color: hsl(190, 20%, 50%) !important;
  font-style: italic;
  opacity: 0.8;
}

.gwilo-terminal-line {
  margin: 0.5rem 0;
  color: #ffffff;
  position: relative;
  z-index: 1;
}

.gwilo-terminal-output {
  margin: 1rem 0;
  padding-left: 1.5rem;
  position: relative;
  z-index: 1;
}

.gwilo-terminal-output p {
  margin: 0.5rem 0;
  color: hsl(153, 20%, 50%);
}

.gwilo-terminal-output strong {
  color: hsl(190, 20%, 50%);
}

.gwilo-terminal-output ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
}

.gwilo-terminal-output ul li {
  margin: 0.5rem 0;
  padding-left: 1rem;
  position: relative;
}

.gwilo-terminal-output ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: hsl(190, 20%, 50%);
}

.gwilo-terminal-output code {
  background: hsla(190, 20%, 50%, 0.1);
  color: hsl(190, 20%, 50%);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  border: 1px solid hsla(190, 20%, 50%, 0.3);
}

.gwilo-terminal-error {
  color: #ff4444 !important;
}

.gwilo-terminal-error p {
  color: #ff4444 !important;
}

.gwilo-terminal-input-area {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  border-top: 1px solid hsl(190, 20%, 50%);
  background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 100%);
  box-shadow: 0 -2px 10px hsla(190, 20%, 50%, 0.2);
}

.gwilo-terminal-prompt {
  color: hsl(190, 20%, 50%);
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  font-weight: bold;
  margin-right: 0.5rem;
  text-shadow: 0 0 5px hsla(190, 20%, 50%, 0.5);
}

.gwilo-terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: hsl(153, 20%, 50%);
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  padding: 0;
}

.gwilo-terminal-input::placeholder {
  color: hsla(153, 20%, 50%, 0.4);
}

.gwilo-terminal-input:focus {
  color: hsl(153, 20%, 50%);
  text-shadow: 0 0 8px hsla(153, 20%, 50%, 0.3);
}

@media (max-width: 768px) {
  .gwilo-terminal-overlay {
    padding: 1rem;
  }
  
  .gwilo-terminal {
    height: 80vh;
    max-height: none;
  }
  
  .gwilo-terminal-header {
    padding: 0.75rem 1rem;
  }
  
  .gwilo-terminal-title {
    font-size: 0.85rem;
  }
  
  .gwilo-terminal-content {
    padding: 1rem;
    font-size: 0.85rem;
  }
  
  .gwilo-ascii-art {
    font-size: 0.6rem;
  }
  
  .gwilo-terminal-input-area {
    padding: 0.75rem 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gwilo-terminal-overlay,
  .gwilo-terminal,
  .gwilo-terminal-close {
    transition: none;
    animation: none;
  }
  
  .gwilo-terminal-content::before {
    animation: none;
  }
}
