@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #000;
  color: #00ff41;
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  line-height: 1.4;
  overflow: hidden;
  height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(white 1px, transparent 1px);
  background-size: 10px 10px;
  opacity: 0.2;
  z-index: -1;
  animation: moveStars 100s linear infinite;
}

@keyframes moveStars {
    0% { background-position: 0 0; }
    100% { background-position: -10000px 0; }
}

.terminal {
  width: 100vw;
  height: 100vh;
  background: #000;
  position: relative;
  display: flex;
  flex-direction: column;
}

.terminal::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(white 1px, transparent 1px);
  background-size: 10px 10px;
  opacity: 0.2;
  z-index: -1;
  animation: moveStars 100s linear infinite;
}

.terminal-header {
  background: #1a1a1a;
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #333;
  z-index: 2;
  position: relative;
}

.terminal-title {
  color: #00ff41;
  font-weight: 700;
  font-size: 12px;
}

.terminal-controls {
  display: flex;
  gap: 8px;
}

.control {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.control.close {
  background: #ff5f56;
}
.control.minimize {
  background: #ffbd2e;
}
.control.maximize {
  background: #27ca3f;
}

.terminal-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  position: relative;
  z-index: 2;
  background: rgba(0, 0, 0, 0.9);
}

.output {
  min-height: calc(100vh - 120px);
  white-space: pre-wrap;
  word-wrap: break-word;
}

.line {
  margin-bottom: 4px;
  text-shadow: 0 0 5px currentColor;
}

.line.system {
  color: #ffaa00;
}

.line.father {
  color: #00ff41;
}

.line.player {
  color: #41a6ff;
}

.line.error {
  color: #ff4141;
  animation: flicker 0.5s infinite;
}

.line.glitch {
  animation: glitch 0.3s infinite;
}

.choice {
  color: #ffaa00;
  margin: 8px 0;
  padding-left: 20px;
}

.choice:hover {
  background: rgba(255, 170, 0, 0.1);
  text-shadow: 0 0 8px #ffaa00;
}

.input-line {
  display: flex;
  align-items: center;
  margin-top: 10px;
}

.prompt {
  color: #00ff41;
  margin-right: 8px;
  text-shadow: 0 0 5px currentColor;
}

.cursor {
  color: #00ff41;
  animation: blink 1s infinite;
  text-shadow: 0 0 5px currentColor;
}

.cursor.fast {
  animation: blink 0.3s infinite;
}

.cursor.violent {
  animation: violent-blink 0.1s infinite;
}

.instructions {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.8);
  padding: 10px;
  border: 1px solid #333;
  font-size: 10px;
  color: #666;
  z-index: 3;
}

.instructions p {
  margin-bottom: 2px;
}

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

@keyframes violent-blink {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  25% {
    opacity: 0;
    transform: scale(1.2);
  }
  50% {
    opacity: 1;
    transform: scale(0.8);
  }
  75% {
    opacity: 0;
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

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

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

.corrupted {
  color: #ff4141;
  animation: glitch 0.1s infinite;
  text-shadow: 2px 0 #ff4141, -2px 0 #41ff41, 0 2px #4141ff;
}

.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 12px;
  }

  .terminal-content {
    padding: 15px;
  }

  .instructions {
    bottom: 10px;
    right: 10px;
    font-size: 9px;
  }
}