@import url('https://fonts.googleapis.com/css2?family=VT323&family=Share+Tech+Mono&display=swap');

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

body {
  background: #000;
  color: #00ff00;
  font-family: 'VT323', 'Share Tech Mono', monospace;
  min-height: 100vh;
  padding-top: 60px;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
}

.screen {
  display: none;
  animation: fadeIn 0.5s;
}

.screen.active {
  display: block;
}

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

#loading-screen {
  text-align: center;
  padding: 50px 20px;
}

.ascii-logo {
  color: #00ff00;
  font-size: 12px;
  line-height: 1;
  text-shadow: 0 0 10px #00ff00;
  margin-bottom: 30px;
  animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% { text-shadow: 0 0 10px #00ff00; }
  50% { text-shadow: 0 0 20px #00ff00, 0 0 30px #00ff00; }
}

.status-message {
  font-size: 20px;
  margin: 20px 0;
  color: #ffff00;
}

.progress-container {
  width: 100%;
  height: 30px;
  border: 2px solid #00ff00;
  margin: 20px 0;
  background: rgba(0, 0, 0, 0.5);
}

.progress-bar {
  height: 100%;
  background: #00ff00;
  width: 0%;
  transition: width 0.3s;
  box-shadow: 0 0 10px #00ff00;
}

.model-info {
  font-size: 14px;
  color: #888;
  margin-top: 10px;
}

#setup-screen h2 {
  color: #00ff00;
  font-size: 32px;
  margin-bottom: 20px;
  text-shadow: 0 0 10px #00ff00;
}

.intro {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 30px;
  color: #aaffaa;
}

.input-group {
  margin: 25px 0;
}

.input-group label {
  display: block;
  color: #ffff00;
  font-size: 18px;
  margin-bottom: 10px;
}

.hint {
  font-size: 14px;
  color: #888;
  margin-bottom: 10px;
}

.input-group input,
.input-group select {
  width: 100%;
  background: rgba(0, 255, 0, 0.1);
  border: 2px solid #00ff00;
  color: #00ff00;
  font-family: inherit;
  font-size: 18px;
  padding: 10px;
  margin-bottom: 10px;
}

.input-group input:focus,
.input-group select:focus {
  outline: none;
  background: rgba(0, 255, 0, 0.2);
  box-shadow: 0 0 10px #00ff00;
}

.btn-primary {
  background: #00ff00;
  border: 2px solid #00ff00;
  color: #000;
  font-family: inherit;
  font-size: 22px;
  padding: 15px 40px;
  cursor: pointer;
  margin-top: 20px;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: #00cc00;
  box-shadow: 0 0 20px #00ff00;
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px;
  border: 2px solid #00ff00;
  background: rgba(0, 255, 0, 0.05);
}

.timer-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.timer-label {
  color: #ffff00;
  font-size: 18px;
}

.timer-display {
  font-size: 28px;
  color: #00ff00;
  text-shadow: 0 0 10px #00ff00;
}

.timer-display.timer-warning {
  color: #ffaa00;
  text-shadow: 0 0 10px #ffaa00;
}

.timer-display.timer-critical {
  color: #ff0000;
  text-shadow: 0 0 10px #ff0000;
  animation: pulse 0.5s infinite;
}

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

.timer-status {
  color: #ff0000;
  font-size: 16px;
}

.controls {
  display: flex;
  gap: 10px;
}

.btn-small {
  background: rgba(0, 255, 0, 0.2);
  border: 2px solid #00ff00;
  color: #00ff00;
  font-family: inherit;
  font-size: 16px;
  padding: 8px 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-small:hover {
  background: rgba(0, 255, 0, 0.4);
}

.btn-danger {
  border-color: #ff0000;
  color: #ff0000;
  background: rgba(255, 0, 0, 0.2);
}

.btn-danger:hover {
  background: rgba(255, 0, 0, 0.4);
}

#story-container {
  max-height: 50vh;
  overflow-y: auto;
  border: 2px solid #00ff00;
  padding: 20px;
  background: rgba(0, 0, 0, 0.5);
  margin-bottom: 20px;
  font-size: 18px;
  line-height: 1.6;
}

#story-container::-webkit-scrollbar {
  width: 10px;
}

#story-container::-webkit-scrollbar-track {
  background: #000;
}

#story-container::-webkit-scrollbar-thumb {
  background: #00ff00;
}

.story-segment {
  margin-bottom: 20px;
  color: #aaffaa;
  white-space: pre-wrap;
}

.player-choice {
  color: #ffff00;
  margin: 15px 0;
  padding: 10px;
  border-left: 3px solid #ffff00;
  background: rgba(255, 255, 0, 0.1);
}

.timeout {
  color: #ff0000;
  border-left: 3px solid #ff0000;
  padding: 10px;
  background: rgba(255, 0, 0, 0.1);
}

#choices-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.choice-btn {
  background: rgba(0, 255, 0, 0.1);
  border: 2px solid #00ff00;
  color: #00ff00;
  font-family: inherit;
  font-size: 18px;
  padding: 15px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}

.choice-btn:hover {
  background: rgba(0, 255, 0, 0.3);
  box-shadow: 0 0 15px #00ff00;
  transform: translateX(5px);
}

#generating-indicator {
  text-align: center;
  font-size: 20px;
  color: #ffff00;
  padding: 20px;
}

.blink {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

#end-screen h2 {
  color: #00ff00;
  font-size: 36px;
  margin-bottom: 20px;
  text-shadow: 0 0 15px #00ff00;
}

#end-story {
  max-height: 60vh;
  overflow-y: auto;
  border: 2px solid #00ff00;
  padding: 20px;
  background: rgba(0, 0, 0, 0.5);
  margin-bottom: 20px;
  font-size: 18px;
  line-height: 1.6;
  color: #aaffaa;
}

.end-controls {
  text-align: center;
  margin-top: 30px;
}

@media (max-width: 768px) {
  body {
    padding-top: 100px;
  }
  
  .container {
    padding: 10px;
  }
  
  .ascii-logo {
    font-size: 8px;
  }
  
  .game-header {
    flex-direction: column;
    gap: 15px;
  }
  
  .timer-container {
    flex-direction: column;
    text-align: center;
  }
  
  #story-container {
    max-height: 40vh;
    font-size: 16px;
  }
  
  .choice-btn {
    font-size: 16px;
    padding: 12px;
  }
}
