* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', 'Arial', sans-serif;
  background: #0a0a0a;
  min-height: 100vh;
  color: #f5f5f5;
}

.validar-container {
  max-width: 1000px;
  margin: 40px auto;
  padding: 20px;
}

.validar-card {
  background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #0d0d1a 100%);
  border: 2px solid #ffd34d;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 211, 77, 0.2);
  transition: transform 0.3s ease;
}

.validar-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
}

.validar-header {
  text-align: center;
  margin-bottom: 30px;
}

.header-icon {
  font-size: 60px;
  color: #ffd34d;
  margin-bottom: 15px;
  filter: drop-shadow(0 0 8px rgba(255, 211, 77, 0.5));
}

.validar-header h1 {
  margin: 0 0 10px;
  font-size: 2.2rem;
  color: #ffd34d;
  font-weight: 900;
  letter-spacing: 1px;
  text-shadow: 0 0 15px rgba(255, 211, 77, 0.5);
  font-family: 'BatmanForever', 'Arial Black', sans-serif;
}

.validar-header p {
  margin: 0;
  color: #8a8f9e;
  font-size: 1rem;
  letter-spacing: 0.5px;
}

/* Área de subida */
.upload-form {
  margin-bottom: 30px;
}

.upload-area {
  border: 2px dashed rgba(255, 211, 77, 0.4);
  border-radius: 20px;
  padding: 50px 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.03);
}

.upload-area:hover {
  border-color: #ffd34d;
  background: rgba(255, 211, 77, 0.05);
  transform: translateY(-2px);
}

.upload-area.drag-over {
  border-color: #ffd34d;
  background: rgba(255, 211, 77, 0.1);
  transform: scale(1.02);
}

.upload-area.has-file {
  border-color: #4CAF50;
  border-style: solid;
  background: rgba(76, 175, 80, 0.05);
}

.upload-icon {
  font-size: 70px;
  color: #ffd34d;
  margin-bottom: 20px;
}

.upload-content h3 {
  color: #e0e0e0;
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.upload-content p {
  color: #8a8f9e;
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.file-info {
  display: block;
  margin: 15px 0;
  color: #4CAF50;
  font-size: 0.9rem;
}

.btn-select {
  background: rgba(255, 211, 77, 0.1);
  border: 1px solid #ffd34d;
  color: #ffd34d;
  padding: 10px 25px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-select:hover {
  background: #ffd34d;
  color: #0a0a0a;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 211, 77, 0.3);
}

.btn-validar {
  padding: 14px 35px;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #ffd34d 0%, #b8860b 100%);
  color: #0b0b0b;
  box-shadow: 0 6px 20px rgba(255, 211, 77, 0.3);
  font-family: 'Arial Black', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 20px;
}

.btn-validar:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(255, 211, 77, 0.5);
  background: linear-gradient(135deg, #ffe066 0%, #d4a017 100%);
}

/* Loading Spinner */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 4px solid #2c313c;
  border-top: 4px solid #ffd34d;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-overlay p {
  color: #ffd34d;
  margin-top: 20px;
  font-size: 16px;
  letter-spacing: 1px;
  font-weight: 600;
}

/* Resultados */
.resultado {
  margin-top: 30px;
  padding: 25px;
  border-radius: 20px;
  text-align: center;
  animation: slideUp 0.4s ease;
}

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

.resultado.exito {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.05));
  border: 2px solid #4CAF50;
}

.resultado.error {
  background: linear-gradient(135deg, rgba(244, 67, 54, 0.1), rgba(244, 67, 54, 0.05));
  border: 2px solid #f44336;
}

.resultado-icon {
  font-size: 70px;
  margin-bottom: 15px;
}

.resultado.exito .resultado-icon {
  color: #4CAF50;
}

.resultado.error .resultado-icon {
  color: #f44336;
}

.resultado h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  font-family: 'Arial Black', sans-serif;
}

.resultado.exito h3 {
  color: #4CAF50;
}

.resultado.error h3 {
  color: #f44336;
}

.mensaje {
  color: #e0e0e0;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.detalles {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 15px;
  padding: 15px;
  margin: 20px 0;
  text-align: left;
}

.detalle-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.detalle-item:last-child {
  border-bottom: none;
}

.detalle-label {
  color: #ffd34d;
  font-weight: bold;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.detalle-valor {
  color: #e0e0e0;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
}

.verificaciones {
  display: flex;
  justify-content: space-around;
  gap: 15px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.verificacion {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: bold;
}

.verificacion.valido {
  background: rgba(76, 175, 80, 0.2);
  color: #4CAF50;
}

.verificacion.invalido {
  background: rgba(244, 67, 54, 0.2);
  color: #f44336;
}

.sello-verificacion {
  margin-top: 20px;
  padding: 12px;
  background: rgba(255, 211, 77, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #ffd34d;
  font-weight: bold;
}

.sello-verificacion i {
  font-size: 24px;
}

/* Botón volver */
.back-link {
  margin-top: 30px;
  text-align: center;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #8a8f9e;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  padding: 10px 20px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.05);
}

.btn-back:hover {
  color: #ffd34d;
  transform: translateX(-5px);
  background: rgba(255, 211, 77, 0.1);
}

/* MODAL DE ERROR */
.error-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10001;
  animation: fadeIn 0.3s ease;
}

.error-modal-content {
  background: linear-gradient(135deg, #1a1a2e 0%, #0d0d1a 100%);
  border: 2px solid #ff4444;
  border-radius: 20px;
  padding: 30px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 68, 68, 0.3);
  animation: slideUpModal 0.3s ease;
}

.error-icon {
  font-size: 60px;
  margin-bottom: 20px;
  animation: shake 0.5s ease;
}

.error-modal-content h3 {
  color: #ff4444;
  margin: 0 0 15px;
  font-size: 1.5rem;
  font-family: 'Arial Black', sans-serif;
}

.error-modal-content p {
  color: #e0e0e0;
  margin: 10px 0;
  font-size: 14px;
  line-height: 1.5;
}

.error-detail {
  background: rgba(255, 68, 68, 0.1);
  padding: 10px;
  border-radius: 10px;
  font-size: 12px;
  color: #ff8888;
  margin-top: 15px;
}

.btn-cerrar-modal {
  background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  margin-top: 20px;
  transition: all 0.3s ease;
  font-family: 'Arial Black', sans-serif;
}

.btn-cerrar-modal:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 68, 68, 0.4);
  background: linear-gradient(135deg, #ff5555 0%, #dd0000 100%);
}

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

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

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* RESPONSIVE */
@media (max-width: 800px) {
  .validar-container {
    margin: 20px auto;
    padding: 15px;
  }
  
  .validar-card {
    padding: 20px;
  }
  
  .validar-header h1 {
    font-size: 1.6rem;
  }
  
  .upload-area {
    padding: 30px 20px;
  }
  
  .upload-icon {
    font-size: 50px;
  }
  
  .btn-validar {
    padding: 12px 25px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .verificaciones {
    flex-direction: column;
  }
  
  .verificacion {
    justify-content: center;
  }
  
  .detalle-item {
    flex-direction: column;
    gap: 5px;
  }
  
  .resultado {
    padding: 20px;
  }
  
  .error-modal-content {
    padding: 20px;
    margin: 15px;
  }
  
  .error-modal-content h3 {
    font-size: 1.2rem;
  }
}