/* =============================================
   ESTILOS BASE - WORDLE ORIGINAL (tus estilos)
============================================= */
body {
  font-family: 'Arial', sans-serif;
  text-align: center;
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
  transition: background 0.5s ease;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

/* Modos de seguridad */
.vulnerable-mode {
  background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
}

.secure-mode {
  background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
}

/* Header del Laboratorio */
.lab-header {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.lab-header h1 {
  color: #333;
  margin: 0 0 10px 0;
  font-size: 2.5rem;
}

.subtitle {
  color: #666;
  margin: 0 0 20px 0;
  font-size: 1.1rem;
}

.mode-control {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 15px;
}

.mode-badge {
  padding: 8px 20px;
  border-radius: 25px;
  font-weight: bold;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.mode-badge.vulnerable {
  background: #ff4444;
  color: white;
}

.mode-badge.secure {
  background: #4CAF50;
  color: white;
}

.toggle-btn {
  background: #ff9800;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.toggle-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
}

/* Sección Wordle Original */
.wordle-section {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.wordle-section h2 {
  color: #333;
  margin-bottom: 20px;
}

.game-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 20px auto;
  max-width: 350px;
}

/* Tus estilos originales para letras */
.letter {
  border: 2px solid rgb(255, 255, 255);
  color: white;
  padding: 10px;
  margin: 3px;
  min-width: 45px;
  min-height: 45px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  border-radius: 8px;
  text-transform: uppercase;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Colores de Wordle */
.letter[style*="green"] {
  background: linear-gradient(135deg, #4CAF50, #8BC34A) !important;
  border-color: #45a049;
}

.letter[style*="#f3c237"] {
  background: linear-gradient(135deg, #FFC107, #FF9800) !important;
  border-color: #FF9800;
}

.letter[style*="gray"] {
  background: linear-gradient(135deg, #757575, #9E9E9E) !important;
  border-color: #616161;
}

.input-area {
  margin: 30px auto;
  max-width: 400px;
}

.game-input {
  display: block;
  margin: 0 auto 20px;
  padding: 12px;
  font-size: 18px;
  width: 250px;
  border: 2px solid #ddd;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.game-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.game-btn {
  display: block;
  margin: 0 auto;
  padding: 12px 30px;
  font-size: 18px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(to right, #667eea, #764ba2);
  color: white;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.game-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
}

.game-btn:active {
  background: linear-gradient(to right, #5a6fd8, #6a4190);
  transform: scale(0.95);
}

.game-btn:disabled {
  background: rgb(119, 118, 118);
  color: black;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.message {
  margin: 20px auto;
  padding: 15px;
  border-radius: 8px;
  font-weight: bold;
  max-width: 500px;
}

.vulnerable-mode .message {
  background: rgba(255, 68, 68, 0.1);
  color: #d32f2f;
}

.secure-mode .message {
  background: rgba(76, 175, 80, 0.1);
  color: #388e3c;
}

.error-btn {
  color: #ff4444;
  display: none;
  background-color: rgba(255, 255, 255, 0.9);
  border: 2px solid #ff4444;
  margin: 10px auto;
  padding: 5px 15px;
  border-radius: 5px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.error-btn:hover {
  background: #ff4444;
  color: white;
}

/* Laboratorio de Seguridad */
.security-lab {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.security-lab h2 {
  color: #333;
  margin-bottom: 25px;
  text-align: center;
}

.challenge {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  border-left: 5px solid #ff9800;
}

.challenge h3 {
  color: #333;
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.input-group {
  display: flex;
  gap: 10px;
  margin: 15px 0;
  flex-wrap: wrap;
  justify-content: center;
}

.vuln-input {
  flex: 1;
  min-width: 200px;
  padding: 10px 15px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
}

.vuln-btn {
  background: linear-gradient(to right, #ff9800, #ff5722);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.vuln-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.output-area {
  margin: 15px 0;
  padding: 15px;
  border-radius: 8px;
  min-height: 50px;
  word-break: break-word;
  border: 1px dashed #ff9800;
}

.vuln-form {
  display: flex;
  gap: 10px;
  margin: 15px 0;
  flex-wrap: wrap;
  justify-content: center;
}

.vuln-form input {
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
}

/* Sección de Demos */
.demo-section {
  background: rgba(255, 152, 0, 0.1);
  border-radius: 10px;
  padding: 20px;
  margin-top: 25px;
  border: 2px solid #ff9800;
}

.demo-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 15px 0;
}

.demo-btn {
  background: linear-gradient(to right, #2196F3, #21CBF3);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.demo-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.fix-btn {
  background: linear-gradient(to right, #4CAF50, #8BC34A) !important;
}

.demo-output {
  margin: 15px 0;
  padding: 15px;
  background: white;
  border-radius: 8px;
  min-height: 60px;
  border: 1px solid #ddd;
}

/* Footer */
.info-footer {
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  margin-top: 30px;
}

.info-footer p {
  margin: 5px 0;
}

.info-footer code {
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 5px;
  border-radius: 3px;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }
  
  .lab-header h1 {
    font-size: 1.8rem;
  }
  
  .mode-control {
    flex-direction: column;
    gap: 10px;
  }
  
  .input-group, .vuln-form {
    flex-direction: column;
  }
  
  .vuln-input, .vuln-form input {
    min-width: 100%;
  }
  
  .letter {
    min-width: 40px;
    min-height: 40px;
    font-size: 1.2rem;
  }
}

/* Animaciones */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.challenge, .demo-section {
  animation: fadeIn 0.5s ease;
}