/* IzaacWeb V4 Terminal Bot - Modernized */

:root {
  /* Terminal Bot Color Palette */
  --bot-primary: #3cff3c;
  --bot-secondary: #00ff00;
  --bot-background: #000333;
  --bot-dark: #1a1a2d;
  --bot-darker: #0f0f1f;
  --bot-shadow: rgba(102, 255, 102, 0.5);
  --bot-glow: rgba(102, 255, 102, 0.3);
  
  /* Typography */
  --bot-font: 'Courier New', Courier, monospace;
  --bot-font-size: 14px;
  --bot-font-size-large: 24px;
  
  /* Spacing */
  --bot-spacing-xs: 5px;
  --bot-spacing-sm: 10px;
  --bot-spacing-md: 20px;
  --bot-spacing-lg: 30px;
  
  /* Transitions */
  --bot-transition: 0.3s ease;
  --bot-transition-slow: 1s ease;
}

body {
  margin: 0;
  color: var(--bot-primary);
  padding: 0;
  padding-top: 80px; /* Space for fixed header */
  box-sizing: border-box;
  min-height: 100vh;
}

center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 80px);
  padding: var(--bot-spacing-sm);
}

.bot-container {
  width: 100%;
  max-width: 700px;
  font-family: var(--bot-font);
  padding: var(--bot-spacing-md);
  margin: var(--bot-spacing-xs) auto;
  border: 2px outset var(--bot-primary);
  border-radius: var(--bot-spacing-sm);
  background-color: var(--bot-background);
  backdrop-filter: blur(10px);
  box-shadow: 
    0 0 50px var(--bot-shadow),
    inset 0 0 50px var(--bot-glow);
  text-align: center;
  opacity: 0;
  transform: translateY(-20px);
  animation: fadeInOn 1s forwards;
  position: relative;
  overflow: hidden;
  filter: hue-rotate(330deg);
}

.bot-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent, var(--bot-glow), transparent);
  opacity: 0;
  animation: shimmer 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes fadeInOn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0%, 100% { 
    opacity: 0;
    transform: translateX(-100%);
  }
  50% { 
    opacity: 0.3;
    transform: translateX(100%);
  }
}

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

@keyframes blink {
  0%, 50% { 
    border-color: var(--bot-primary); 
  }
  51%, 100% { 
    border-color: transparent; 
  }
}

.bot-title {
  margin-bottom: var(--bot-spacing-md);
  font-size: var(--bot-font-size-large);
  font-weight: bold;
  text-shadow: 0 0 var(--bot-spacing-sm) var(--bot-primary);
  letter-spacing: 2px;
}

.bot-message {
  margin: var(--bot-spacing-sm) 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  text-align: left;
  line-height: 1.6;
  padding: var(--bot-spacing-sm);
  border-left: 3px solid var(--bot-primary);
  background: rgba(0, 0, 0, 0.3);
  border-radius: 0 var(--bot-spacing-xs) var(--bot-spacing-xs) 0;
  animation: fadeIn 0.5s ease;
}

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

.input-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--bot-spacing-sm);
  flex-wrap: wrap;
  margin-top: var(--bot-spacing-md);
}

.bot-input {
  flex: 1;
  min-width: 200px;
  padding: var(--bot-spacing-sm) var(--bot-spacing-md);
  border: 1px outset var(--bot-primary);
  border-radius: var(--bot-spacing-xs);
  background-color: var(--bot-dark);
  box-shadow: 
    0 0 var(--bot-spacing-sm) var(--bot-shadow),
    inset 0 0 var(--bot-spacing-sm) rgba(0, 0, 0, 0.5);
  transition: all var(--bot-transition);
  color: var(--bot-primary);
  font-family: var(--bot-font);
  font-size: var(--bot-font-size);
  outline: none;
}

.bot-input:focus {
  background-color: var(--bot-darker);
  box-shadow: 
    0 0 var(--bot-spacing-md) var(--bot-shadow),
    inset 0 0 var(--bot-spacing-sm) rgba(0, 0, 0, 0.7);
  border-color: var(--bot-secondary);
}

.bot-input:hover {
  background-color: var(--bot-darker);
  transition: background-color var(--bot-transition);
}

.bot-input::placeholder {
  color: rgba(102, 255, 102, 0.6);
  font-style: italic;
}

.bot-button {
  padding: var(--bot-spacing-sm) var(--bot-spacing-md);
  margin: 2px;
  border: 1px outset var(--bot-primary);
  border-radius: var(--bot-spacing-xs);
  background-color: var(--bot-dark);
  color: var(--bot-primary);
  cursor: pointer;
  box-shadow: 0 0 var(--bot-spacing-sm) var(--bot-shadow);
  transition: all var(--bot-transition);
  font-family: var(--bot-font);
  font-size: var(--bot-font-size);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}

.bot-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--bot-glow), transparent);
  transition: left var(--bot-transition);
}

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

.bot-button:hover {
  background-color: var(--bot-darker);
  transform: translateY(-2px);
  box-shadow: 
    0 0 var(--bot-spacing-md) var(--bot-shadow),
    0 5px var(--bot-spacing-sm) rgba(0, 0, 0, 0.3);
  border-color: var(--bot-secondary);
}

.bot-button:active {
  transform: translateY(0);
  box-shadow: 0 0 var(--bot-spacing-sm) var(--bot-shadow);
}

.button-container {
  display: flex;
  gap: var(--bot-spacing-sm);
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: var(--bot-spacing-md);
}

/* Typing indicator */
.typing-indicator {
  display: inline-block;
  width: 3px;
  height: 1em;
  background-color: var(--bot-primary);
  animation: blink 1s infinite;
  margin-left: 2px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  .bot-container {
    width: 90%;
    max-width: 450px;
    padding: var(--bot-spacing-md);
    margin: var(--bot-spacing-sm) auto;
  }
  
  .bot-title {
    font-size: 20px;
  }
  
  .input-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .bot-input {
    min-width: unset;
    width: 100%;
    margin-bottom: var(--bot-spacing-sm);
  }
  
  .input-container .bot-button {
    align-self: center;
    width: auto;
    min-width: 120px;
    max-width: 200px;
    padding: var(--bot-spacing-sm) var(--bot-spacing-lg);
  }
  
  .button-container {
    flex-direction: column;
    width: 100%;
  }
  
  .button-container .bot-button {
    width: 100%;
    max-width: 300px;
  }
  
  .bot-message {
    font-size: 13px;
  }
}

@media screen and (max-width: 480px) {
  
  .bot-container {
    width: 95%;
    max-width: 380px;
    padding: var(--bot-spacing-md);
  }
  
  .bot-title {
    font-size: 18px;
    margin-bottom: var(--bot-spacing-md);
  }
  
  .bot-message {
    font-size: 12px;
    padding: var(--bot-spacing-xs);
  }
  
  .bot-input, .bot-button {
    font-size: 12px;
    padding: var(--bot-spacing-xs) var(--bot-spacing-sm);
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .bot-container {
    animation: none;
    opacity: 1;
    transform: none;
  }
  
  .bot-container::before {
    animation: none;
  }
  
  .bot-button::before {
    transition: none;
  }
  
  .typing-indicator {
    animation: none;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .bot-container {
    border-width: 3px;
    background-color: #000;
  }
  
  .bot-input, .bot-button {
    border-width: 2px;
  }
}