@import url('https://fonts.googleapis.com/css2?family=VT323&family=Inter:wght@400;500;700&family=Space+Mono:wght@400;700&display=swap');

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

@keyframes scanline {
  0% {
    transform: translateY(-100vh);
  }
  100% {
    transform: translateY(100vh);
  }
}

@keyframes pulse {
  0% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.7;
  }
}

@keyframes flicker {
  0% {
    opacity: 0.9;
  }
  5% {
    opacity: 0.8;
  }
  10% {
    opacity: 0.9;
  }
  15% {
    opacity: 0.75;
  }
  20% {
    opacity: 0.9;
  }
  25% {
    opacity: 0.8;
  }
  30% {
    opacity: 0.9;
  }
  35% {
    opacity: 0.7;
  }
  40% {
    opacity: 0.9;
  }
  100% {
    opacity: 0.9;
  }
}

@keyframes pixelate {
  0% {
    filter: none;
  }
  50% {
    filter: pixelate(2px);
  }
  100% {
    filter: none;
  }
}

@keyframes glitch {
  0% {
    transform: translate(0);
  }
  20% {
    transform: translate(-3px, 3px);
  }
  40% {
    transform: translate(-3px, -3px);
  }
  60% {
    transform: translate(3px, 3px);
  }
  80% {
    transform: translate(3px, -3px);
  }
  100% {
    transform: translate(0);
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes neon-border {
  0% {
    box-shadow:
      0 0 5px var(--terminal-purple),
      0 0 10px var(--terminal-purple),
      inset 0 0 5px var(--terminal-purple);
  }
  50% {
    box-shadow:
      0 0 10px var(--terminal-purple),
      0 0 20px var(--terminal-purple),
      inset 0 0 10px var(--terminal-purple);
  }
  100% {
    box-shadow:
      0 0 5px var(--terminal-purple),
      0 0 10px var(--terminal-purple),
      inset 0 0 5px var(--terminal-purple);
  }
}

@keyframes matrix-fall {
  0% {
    transform: translateY(-100%);
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    transform: translateY(1000%);
    opacity: 0;
  }
}

@keyframes float-particle {
  0% {
    transform: translate(0, 0);
    opacity: 0.6;
  }
  25% {
    transform: translate(10px, -10px);
    opacity: 0.8;
  }
  50% {
    transform: translate(0, -20px);
    opacity: 1;
  }
  75% {
    transform: translate(-10px, -10px);
    opacity: 0.8;
  }
  100% {
    transform: translate(0, 0);
    opacity: 0.6;
  }
}

:root {
  --terminal-green: #2dd4bf;
  --terminal-dark: #030303;
  --terminal-blue: #4dabf7;
  --terminal-purple: #a78bfa;
  --terminal-yellow: #fcc419;
  --terminal-red: #ff6b6b;
  --terminal-cyan: #22d3ee;
  --terminal-glow: 0 0 8px rgba(45, 212, 191, 0.5);
  --terminal-font: 'Space Mono', 'VT323', monospace;
  --terminal-purple-glow: 0 0 8px rgba(167, 139, 250, 0.5);
  --body-font: 'Inter', sans-serif;
}

.terminal-theme {
  background-color: var(--terminal-dark);
  color: #fff;
  font-family: var(--body-font);
  position: relative;
}

.terminal-theme::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(3, 3, 3, 0.2) 50%, rgba(0, 0, 0, 0.25) 50%);
  background-size: 100% 4px;
  z-index: 2;
  pointer-events: none;
  animation: flicker 0.3s infinite;
}

.terminal-font {
  font-family: var(--terminal-font);
  letter-spacing: 0.5px;
}

.terminal-window {
  background-color: rgba(0, 0, 0, 0.85);
  border: 1px solid var(--terminal-purple);
  border-radius: 8px;
  overflow: hidden;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(167, 139, 250, 0.3);
  backdrop-filter: blur(4px);
  animation: neon-border 3s infinite ease-in-out;
  transition: all 0.3s ease;
}

.terminal-window:hover {
  transform: translateY(-5px);
  box-shadow:
    0 15px 40px rgba(0, 0, 0, 0.8),
    0 0 30px rgba(45, 212, 191, 0.4);
}

.terminal-header {
  background: linear-gradient(90deg, #111 0%, #0a0a0a 100%);
  padding: 10px 16px;
  border-bottom: 1px solid var(--terminal-purple);
  display: flex;
  align-items: center;
}

.terminal-body {
  padding: 20px;
  overflow-y: auto;
  max-height: 500px;
  background-image: radial-gradient(
    circle at 50% 100%,
    rgba(167, 139, 250, 0.08) 0%,
    transparent 60%
  );
}

.window-button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 8px;
  position: relative;
  transition: all 0.2s ease;
}

.window-button:hover::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.5);
}

.close-button {
  background-color: var(--terminal-red);
}

.minimize-button {
  background-color: var(--terminal-yellow);
}

.maximize-button {
  background-color: var(--terminal-cyan);
}

.terminal-text {
  color: var(--terminal-cyan);
  text-shadow: var(--terminal-glow);
}

.terminal-blue-text {
  color: var(--terminal-blue);
  text-shadow: 0 0 8px rgba(77, 171, 247, 0.5);
}

.terminal-purple-text {
  color: var(--terminal-purple);
  text-shadow: 0 0 8px rgba(167, 139, 250, 0.5);
}

.terminal-yellow-text {
  color: var(--terminal-yellow);
  text-shadow: 0 0 8px rgba(252, 196, 25, 0.5);
}

.terminal-red-text {
  color: var(--terminal-red);
  text-shadow: 0 0 8px rgba(255, 107, 107, 0.5);
}

.terminal-cyan-text {
  color: var(--terminal-cyan);
  text-shadow: 0 0 8px rgba(34, 211, 238, 0.5);
}

.cursor-blink {
  display: inline-block;
  width: 8px;
  height: 16px;
  background-color: var(--terminal-cyan);
  margin-left: 4px;
  animation: blink 1s step-end infinite;
  vertical-align: middle;
  box-shadow: 0 0 5px var(--terminal-cyan);
}

.scan-line {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: rgba(167, 139, 250, 0.15);
  z-index: 3;
  pointer-events: none;
  animation: scanline 8s linear infinite;
  box-shadow: 0 0 10px 1px rgba(45, 212, 191, 0.2);
}

.pixel-image {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.glitch-effect {
  position: relative;
  animation: glitch 0.5s infinite;
}

.pixel-animation {
  animation: pixelate 2s infinite;
}

.float-animation {
  animation: float 6s ease-in-out infinite;
}

.rotate-animation {
  animation: spin 10s linear infinite;
}

.terminal-button {
  background-color: var(--terminal-dark);
  color: var(--terminal-cyan);
  border: 1px solid var(--terminal-purple);
  text-shadow: var(--terminal-glow);
  box-shadow: var(--terminal-glow);
  transition: all 0.3s;
  font-family: var(--terminal-font);
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 16px;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.terminal-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(45, 212, 191, 0.2),
    transparent
  );
  transition: all 0.6s;
  z-index: -1;
}

.terminal-button:hover {
  background-color: rgba(167, 139, 250, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(45, 212, 191, 0.4);
}

.terminal-button:hover::before {
  left: 100%;
}

.grid-pattern {
  background-image: radial-gradient(
    rgba(45, 212, 191, 0.08) 1px,
    transparent 1px
  );
  background-size: 30px 30px;
}

pre.terminal-code {
  font-family: var(--terminal-font);
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
  font-size: 14px;
  line-height: 1.4;
}

.virtual-card {
  backdrop-filter: blur(10px);
  background-color: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: 8px;
  padding: 24px;
  transition: all 0.5s ease;
  overflow: hidden;
  position: relative;
}

.virtual-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--terminal-purple),
    transparent
  );
  animation: pulse 3s infinite;
}

.virtual-card:hover {
  box-shadow: 0 0 30px rgba(45, 212, 191, 0.4);
  transform: translateY(-8px);
  border-color: rgba(167, 139, 250, 0.6);
}

.pulse-glow {
  animation: pulse 3s infinite;
}

.command-prompt {
  display: flex;
  align-items: center;
  margin: 8px 0;
}

.command-prompt::before {
  content: '>';
  color: var(--terminal-purple);
  margin-right: 8px;
  font-weight: bold;
  text-shadow: var(--terminal-purple-glow);
}

.command-output {
  margin-left: 16px;
  margin-bottom: 12px;
  color: #aaa;
}

.loading-dots::after {
  content: '...';
  animation: blink 1s infinite;
}

.matrix-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  z-index: 0;
}

.matrix-column {
  position: absolute;
  top: -100px;
  width: 20px;
  color: rgba(45, 212, 191, 0.3);
  font-family: var(--terminal-font);
  font-size: 16px;
  text-align: center;
  opacity: 0.6;
  animation: matrix-fall 10s linear infinite;
}

.glow-text {
  text-shadow:
    0 0 5px var(--terminal-cyan),
    0 0 10px var(--terminal-cyan);
}

.cyber-grid {
  background-size: 40px 40px;
  background-image: linear-gradient(
      to right,
      rgba(167, 139, 250, 0.05) 1px,
      transparent 1px
    ),
    linear-gradient(to bottom, rgba(45, 212, 191, 0.05) 1px, transparent 1px);
}

.cyber-dots {
  background-image: radial-gradient(
    rgba(167, 139, 250, 0.1) 1px,
    transparent 1px
  );
  background-size: 20px 20px;
}

.holo-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.holo-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to bottom right,
    transparent,
    rgba(45, 212, 191, 0.1),
    transparent
  );
  transform: rotate(30deg);
  pointer-events: none;
  z-index: 1;
  animation: spin 10s linear infinite;
}

/* Glass morphism effect */
.glass-panel {
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: 8px;
}

.neon-border {
  border: 1px solid var(--terminal-purple);
  box-shadow: 0 0 10px var(--terminal-cyan);
}

.gradient-text {
  background: linear-gradient(
    90deg,
    var(--terminal-purple),
    var(--terminal-cyan)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
}

/* Particles styling */
.particles-container {
  pointer-events: none;
}

.particle {
  position: absolute;
  background-color: var(--terminal-cyan);
  border-radius: 50%;
  opacity: 0.6;
  animation: float-particle 10s infinite ease-in-out;
  box-shadow: 0 0 5px var(--terminal-cyan);
}

/* Make some particles different colors */
.particle:nth-child(3n) {
  background-color: var(--terminal-blue);
  box-shadow: 0 0 5px var(--terminal-blue);
}

.particle:nth-child(5n) {
  background-color: var(--terminal-purple);
  box-shadow: 0 0 5px var(--terminal-purple);
}

.particle:nth-child(7n) {
  background-color: var(--terminal-cyan);
  box-shadow: 0 0 5px var(--terminal-cyan);
}
