/* Estilos generales futuristas para el escaner de documentos */
:root {
  --primary-color: #3a7bd5;
  --primary-gradient: linear-gradient(135deg, #3a7bd5, #00d2ff);
  --accent-color: #00d2ff;
  --dark-color: #1e293b;
  --light-color: #f8fafc;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --border-radius: 10px;
  --box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --transition: all 0.3s ease;
}

/* Contenedor principal más grande */
.container {
  max-width: 1400px;
  padding: 0 15px;
}

/* Tarjetas principales */
.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  transition: var(--transition);
  min-height: 85vh; /* Tarjeta más alta */
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card-header {
  border-bottom: none;
  padding: 1.5rem 2rem;
  background: var(--primary-gradient);
  color: white;
}

.card-header h5 {
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 1.5rem;
}

.card-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Botones */
.btn {
  border-radius: 50px;
  padding: 1rem 2rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.5s;
  z-index: -1;
}

.btn:hover::before {
  width: 100%;
}

.btn-primary {
  background: var(--primary-gradient);
  border: none;
  box-shadow: 0 4px 6px rgba(58, 123, 213, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 14px rgba(58, 123, 213, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  border: none;
  box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 14px rgba(16, 185, 129, 0.4);
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  box-shadow: 0 4px 6px rgba(245, 158, 11, 0.3);
  color: white;
}

.btn-warning:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 14px rgba(245, 158, 11, 0.4);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border: none;
  box-shadow: 0 4px 6px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 14px rgba(239, 68, 68, 0.4);
}

.btn-outline-secondary {
  color: var(--dark-color);
  border: 2px solid #cbd5e1;
  background: transparent;
}

.btn-outline-secondary:hover {
  background-color: #f1f5f9;
  color: var(--dark-color);
  border-color: #94a3b8;
}

.btn-lg {
  padding: 1.5rem 3rem;
  font-size: 1.5rem;
  width: 100%;
  margin-top: 1.5rem;
}

/* Tarjeta de escáner como botón */
.scanner-card {
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--primary-gradient);
  color: white;
  text-align: center;
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--box-shadow);
  width: 100%;
}

.scanner-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.scanner-card h3 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.scanner-card i {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  display: block;
}

/* Vistas específicas para el escáner */

/* Vista de cámara */
#camera-view {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#video {
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  min-height: 70vh; /* Video más grande */
  width: 100%;
  object-fit: cover;
}

/* Marco de cámara futurista */
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 2rem;
}

.video-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 3px solid var(--accent-color);
  border-radius: var(--border-radius);
  box-shadow: 0 0 20px rgba(0, 210, 255, 0.7);
  pointer-events: none;
  z-index: 2;
}

/* Imágenes capturadas y procesadas */
#captured-image, #processed-image {
  border-radius: var(--border-radius);
  min-height: 70vh; /* Imágenes más grandes */
  width: 100%;
  object-fit: contain;
  transition: var(--transition);
  box-shadow: var(--box-shadow);
}

/* Vista de carga */
#loading-view .spinner-border {
  width: 6rem;
  height: 6rem;
  border-width: 0.35rem;
  color: var(--primary-color);
}

/* Efectos de animación para las transiciones entre vistas */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

#camera-view, #confirm-view, #loading-view, #result-view {
  animation: fadeIn 0.5s ease forwards;
  width: 100%;
}

/* Pantalla de inicio */
.container h1 {
  position: relative;
  display: inline-block;
  margin-bottom: 3rem;
  font-size: 3rem;
}

.container h1::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 5px;
  background: var(--primary-gradient);
  border-radius: 2px;
}

/* Efecto de scanner */
@keyframes scanAnimation {
  0% { transform: translateY(-100%); opacity: 0.7; }
  100% { transform: translateY(100%); opacity: 0; }
}

.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 15px;
  background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
  animation: scanAnimation 2s linear infinite;
  opacity: 0.7;
  pointer-events: none;
  z-index: 10;
}

/* Media queries para responsividad */
@media (max-width: 992px) {
  .card-body {
    padding: 1.5rem;
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  .btn-lg {
    padding: 1.25rem 2.5rem;
    font-size: 1.25rem;
  }
  
  #video, #captured-image, #processed-image {
    min-height: 60vh;
  }
}

@media (max-width: 768px) {
  .card-body {
    padding: 1.25rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
  }
  
  #video, #captured-image, #processed-image {
    min-height: 50vh;
  }
}

/* Añadir esquinas y bordes futuristas */
.futuristic-corners {
  position: relative;
}

.futuristic-corners::before,
.futuristic-corners::after {
  content: '';
  position: absolute;
  width: 35px;
  height: 35px;
}

.futuristic-corners::before {
  border-top: 4px solid var(--accent-color);
  border-left: 4px solid var(--accent-color);
  top: 15px;
  left: 15px;
}

.futuristic-corners::after {
  border-bottom: 4px solid var(--accent-color);
  border-right: 4px solid var(--accent-color);
  bottom: 15px;
  right: 15px;
}

/* Decoraciones tecnológicas */
.tech-circles {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 2px solid rgba(0, 210, 255, 0.1);
  pointer-events: none;
}

.tech-circles:nth-child(1) {
  top: -150px;
  left: -150px;
}

.tech-circles:nth-child(2) {
  bottom: -150px;
  right: -150px;
}

/* Botón de captura grande en la parte inferior */
.capture-btn-container {
  width: 100%;
  padding: 1rem 0;
  position: relative;
  z-index: 5;
}