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

body {
  font-family: 'Courier Prime', monospace;
  background-color: #1a1a1a;
  color: #e0e0e0;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
  min-height: 100vh;
}

#story-text {
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 30px;
}

.story-paragraph {
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeIn 0.5s ease-in forwards;
}

.typewriter {
  overflow: hidden;
  border-right: 2px solid #e0e0e0;
  white-space: nowrap;
  animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: #e0e0e0 }
}

@keyframes fadeIn {
  to { opacity: 1 }
}

#input-section {
  margin-top: 30px;
  display: flex;
  gap: 10px;
  align-items: center;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.4s ease;
}

#input-section.show {
  transform: translateY(0);
  opacity: 1;
}

#input-section.hidden {
  display: none !important;
}

#user-input {
  flex: 1;
  padding: 12px 16px;
  background-color: #2a2a2a;
  border: 2px solid #444;
  color: #e0e0e0;
  font-family: 'Courier Prime', monospace;
  font-size: 16px;
  border-radius: 4px;
  outline: none;
  transition: border-color 0.3s ease;
}

#user-input:focus {
  border-color: #666;
}

#submit-button {
  padding: 12px 24px;
  background-color: #333;
  border: 2px solid #555;
  color: #e0e0e0;
  font-family: 'Courier Prime', monospace;
  font-size: 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

#submit-button:hover {
  background-color: #444;
  border-color: #666;
}

#submit-button:active {
  transform: translateY(1px);
}

.hidden {
  display: none !important;
}

.highlight {
  color: #ffcc00;
  font-weight: bold;
}

.profit {
  color: #90EE90; /* Pastel green */
  font-weight: bold;
}

.loss {
  color: #FFB6C1; /* Pastel red */
  font-weight: bold;
}

.neutral {
  color: #e0e0e0;
}

/* Progress bar styles */
.progress-container {
  margin: 20px 0;
  padding: 20px;
  border: 1px solid #444;
  border-radius: 8px;
  background-color: #2a2a2a;
}

.progress-message {
  font-size: 16px;
  margin-bottom: 15px;
  text-align: center;
  color: #e0e0e0;
}

.progress-bar {
  width: 100%;
  height: 20px;
  background-color: #1a1a1a;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #555;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #333 0%, #666 50%, #999 100%);
  width: 0%;
  transition: width 0.1s ease;
  border-radius: 10px;
}

/* Achievement System Styles */
.achievement-notifications {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  pointer-events: none;
}

.achievement-notification {
  background-color: #2a2a2a;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 12px;
  width: 280px;
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s ease;
  font-family: 'Courier Prime', monospace;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.achievement-notification.show {
  transform: translateX(0);
  opacity: 1;
}

.achievement-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.achievement-content {
  flex: 1;
  min-width: 0;
}

.achievement-title {
  font-size: 12px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.achievement-name {
  font-size: 14px;
  font-weight: bold;
  color: #e0e0e0;
  margin-bottom: 4px;
}

.achievement-desc {
  font-size: 12px;
  color: #bbb;
  line-height: 1.4;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
  .container {
    padding: 20px 15px;
  }
  
  #story-text {
    font-size: 16px;
  }
  
  #input-section {
    flex-direction: column;
    align-items: stretch;
  }
  
  #submit-button {
    margin-top: 10px;
  }

  .achievement-notifications {
    top: 10px;
    right: 10px;
  }

  .achievement-notification {
    width: calc(100vw - 40px);
    max-width: 280px;
  }
}

/* Animation Toggle Button */
.animation-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  background-color: #2a2a2a;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 10px 14px;
  color: #e0e0e0;
  font-family: 'Courier Prime', monospace;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.animation-toggle:hover {
  background-color: #333;
  border-color: #555;
}

.animation-toggle:active {
  transform: translateY(1px);
}

.animation-toggle .toggle-icon {
  font-size: 14px;
  margin-right: 6px;
}

@media (max-width: 600px) {
  .animation-toggle {
    bottom: 10px;
    right: 10px;
    padding: 8px 12px;
    font-size: 11px;
  }
}