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

body {
  font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  overflow-x: hidden;
}

.berry-bg {
  position: relative;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.berry-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(255, 107, 107, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(79, 193, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(127, 255, 0, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.terminal-window {
  background: #1e1e1e;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  animation: slideIn 0.5s ease-out;
  position: relative;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ultra-berry {
  animation: rainbow 3s linear infinite, sparkle 2s ease-in-out infinite;
}

@keyframes rainbow {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

@keyframes sparkle {
  0%, 100% { box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
  50% { box-shadow: 0 20px 60px rgba(255, 215, 0, 0.8); }
}

.terminal-titlebar {
  background: #2d2d2d;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #404040;
}

.terminal-title {
  color: #888;
  font-size: 13px;
  font-weight: 500;
  flex: 1;
  text-align: center;
  margin-right: 60px;
}

.terminal-content {
  padding: 20px;
  min-height: 400px;
  max-height: 600px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.6;
  color: #4EC9B0;
}

.terminal-content::-webkit-scrollbar {
  width: 8px;
}

.terminal-content::-webkit-scrollbar-track {
  background: #1e1e1e;
}

.terminal-content::-webkit-scrollbar-thumb {
  background: #4EC9B0;
  border-radius: 4px;
}

.terminal-line {
  margin: 4px 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-output {
  color: #4EC9B0;
}

.terminal-success {
  color: #FFD700;
}

.terminal-prompt {
  color: #9CDCFE;
  font-weight: 600;
}

.terminal-option {
  color: #4FC1FF;
  padding-left: 10px;
}

.terminal-input {
  color: #FFFFFF;
}

.terminal-link {
  color: #4FC1FF;
  text-decoration: underline;
}

.terminal-back {
  color: #FFD700;
}

.terminal-button {
  color: #FF6B6B;
}

.terminal-completed {
  color: #7FFF00;
  opacity: 0.7;
}

.terminal-pending {
  color: #888;
}

.terminal-typing {
  color: #4EC9B0;
}

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

.terminal-prompt {
  color: #4FC1FF;
  margin-right: 8px;
}

.terminal-user-input {
  color: #FFFFFF;
}

.terminal-cursor {
  color: #FFFFFF;
  animation: blink 1s step-end infinite;
  margin-left: 2px;
}

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

.berry-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-family: 'Fira Code', monospace;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.berry-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.berry-button:active {
  transform: translateY(0);
}

.achievement-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.achievement-item {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  color: #1e1e1e;
  padding: 16px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  animation: slideInRight 0.5s ease-out, pulse 2s ease-in-out infinite;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@media (max-width: 768px) {
  .terminal-content {
    font-size: 12px;
    padding: 16px;
    min-height: 300px;
    max-height: 70vh;
  }
  
  .terminal-titlebar {
    padding: 10px 12px;
  }
  
  .terminal-title {
    font-size: 11px;
  }
  
  .berry-button {
    padding: 10px 20px;
    font-size: 12px;
  }
  
  .achievement-toast {
    bottom: 10px;
    right: 10px;
    left: 10px;
  }
  
  .achievement-item {
    padding: 12px 16px;
    font-size: 12px;
  }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .terminal-content {
    font-size: 13px;
    max-height: 500px;
  }
}