/* Estilos base del example.css */
body {
  font-family: "Inter", sans-serif;
  background-color: #141414;
  color: #e0e0e0;
  position: relative;
}

/* Container para el fondo animado a-hole */
.animated-background-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
}

/* Elemento a-hole principal */
a-hole {
  position: absolute;
  top: 0;
  left: 0;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Capa de fondo con gradiente radial para crear el "agujero" */
a-hole:before {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: block;
  width: 150%;
  height: 140%;
  background: radial-gradient(ellipse at 50% 55%, transparent 10%, black 100%);
  transform: translate3d(-50%, -50%, 0);
  content: "";
}

/* Capa de color con overlay para efectos visuales */
a-hole:after {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  display: block;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 50% 75%, #a900ff 20%, transparent 75%);
  mix-blend-mode: overlay;
  transform: translate3d(-50%, -50%, 0);
  content: "";
}

/* Animación del aura con gradiente animado */
@keyframes aura-glow {
  0% {
    background-position: 0 100%;
  }
  100% {
    background-position: 0 300%;
  }
}

/* Elemento aura con gradiente animado y efectos de blur */
a-hole .aura {
  position: absolute;
  top: -71.5%;
  left: 50%;
  z-index: 3;
  width: 30%;
  height: 140%;
  background: linear-gradient(
      20deg,
      #00f8f1,
      #ffbd1e20 16.5%,
      #fe848f 33%,
      #fe848f20 49.5%,
      #00f8f1 66%,
      #00f8f160 85.5%,
      #ffbd1e 100%
    )
    0 100% / 100% 200%;
  border-radius: 0 0 100% 100%;
  filter: blur(50px);
  mix-blend-mode: plus-lighter;
  opacity: 0.75;
  transform: translate3d(-50%, 0, 0);
  animation: aura-glow 5s infinite linear;
}

/* Canvas para efectos adicionales */
a-hole canvas.js-canvas {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.card-bg {
  background: rgba(32, 33, 47, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(157, 89, 231, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.btn-accent {
  background-color: #9d59e7;
  color: white;
  box-shadow: 0 4px 15px rgba(157, 89, 231, 0.4);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-accent:hover {
  background-color: #8a46d4;
  box-shadow: 0 6px 20px rgba(138, 70, 212, 0.6);
}

.btn-secondary {
  background-color: #4a4b60;
  color: #e0e0e0;
  border: 1px solid #6b7280;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: #6b7280;
  border-color: #9ca3af;
}

.input-dark {
  background-color: #20212f;
  border: 1px solid #4a4b60;
  color: #e0e0e0;
}

.input-dark:focus {
  border-color: #9d59e7;
  outline: none;
  box-shadow: 0 0 0 2px rgba(157, 89, 231, 0.3);
}

.input-error {
  border-color: #e3342f !important;
  box-shadow: 0 0 0 2px rgba(227, 52, 47, 0.3) !important;
}

.error-bubble {
  pointer-events: none;
  white-space: nowrap;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}

.bubble-form {
  background: #e3342f;
  color: #fff;
  font-size: 0.75rem;
  border-radius: 0.375rem;
  padding: 0.25rem 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.error-bubble-right {
  left: 100%;
  margin-left: 0.5rem;
}

.error-bubble-left {
  right: 100%;
  margin-right: 0.5rem;
}

.hidden {
  display: none;
}

.label-form {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #d1d5db;
  margin-bottom: 0.5rem;
}

.page-wrap {
  max-width: 56rem;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.stack-8 > * + * {
  margin-top: 2rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.input-form {
  width: 100%;
  padding: 1rem;
  border-radius: 0.75rem;
  font-size: 1rem;
}

.btn-form {
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 500;
  font-size: 1.25rem;
  transition: all 0.3s;
}

.btn-form:hover {
  transform: scale(1.05);
}

.btn-responsive {
  width: 100%;
}

@media (min-width: 640px) {
  .btn-responsive {
    width: auto;
  }
}

.card-form {
  padding: 1.5rem;
  border-radius: 1.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

@media (min-width: 640px) {
  .card-form {
    padding: 3rem;
  }
}

.relative-box {
  position: relative;
}

.header-title {
  font-weight: 800;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.875rem;
}

@media (min-width: 640px) {
  .header-title {
    font-size: 2.25rem;
  }
}

.header-subtitle {
  font-size: 1.125rem;
  color: #9ca3af;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.page-padding {
  padding: 1rem;
}

@media (min-width: 640px) {
  .page-padding {
    padding: 2rem;
  }
}

.center-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.center-text {
  text-align: center;
}

.stack-4 > * + * {
  margin-top: 1rem;
}

.stack-6 > * + * {
  margin-top: 1.5rem;
}

.actions-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding-top: 1rem;
}

@media (min-width: 640px) {
  .actions-row {
    flex-direction: row;
    gap: 1.5rem;
  }
}

/* Estilos específicos para la aplicación de subida de archivos */

/* Área de subida de archivos */
.file-upload-area {
  border: 2px dashed #4a4b60;
  border-radius: 0.75rem;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: rgba(32, 33, 47, 0.5);
  position: relative;
}

.file-upload-area:hover {
  border-color: #9d59e7;
  background-color: rgba(157, 89, 231, 0.1);
}

.file-upload-area.dragover {
  border-color: #9d59e7;
  background-color: rgba(157, 89, 231, 0.2);
  transform: scale(1.02);
}

.file-upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.file-upload-icon {
  font-size: 3rem;
  opacity: 0.7;
}

.file-upload-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #e0e0e0;
  margin: 0;
}

.file-upload-subtitle {
  font-size: 0.875rem;
  color: #9ca3af;
  margin: 0;
}

.file-input-hidden {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* Información del archivo seleccionado */
.file-info {
  background-color: rgba(32, 33, 47, 0.8);
  border: 1px solid #4a4b60;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-top: 1rem;
}

.file-info-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.file-name {
  font-weight: 600;
  color: #e0e0e0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-size {
  color: #9ca3af;
  font-size: 0.875rem;
}

.file-remove {
  background: #e3342f;
  color: white;
  border: none;
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.file-remove:hover {
  background: #c53030;
  transform: scale(1.1);
}

/* Área de resultados */
.result-area {
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: 0.75rem;
}

.success-message {
  background-color: rgba(52, 211, 153, 0.1);
  border: 1px solid #34d399;
  border-radius: 0.75rem;
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.success-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.success-content h3 {
  color: #34d399;
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.success-content p {
  color: #e0e0e0;
  margin: 0 0 1rem 0;
}

.github-link {
  color: #9d59e7;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.github-link:hover {
  color: #8a46d4;
}

.error-message {
  background-color: rgba(227, 52, 47, 0.1);
  border: 1px solid #e3342f;
  border-radius: 0.75rem;
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.error-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.error-content h3 {
  color: #e3342f;
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.error-content p {
  color: #e0e0e0;
  margin: 0;
}

/* Loading */
.loading-area {
  text-align: center;
  padding: 2rem;
}

.loading-spinner {
  width: 3rem;
  height: 3rem;
  border: 3px solid #4a4b60;
  border-top: 3px solid #9d59e7;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem auto;
}

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

.loading-area p {
  color: #9ca3af;
  margin: 0;
}

/* Estilos para vista previa de archivos */
.file-preview-container {
  margin-top: 1rem;
  border-radius: 0.75rem;
  overflow: hidden;
  background-color: rgba(32, 33, 47, 0.6);
  border: 1px solid #4a4b60;
}

.file-preview-content {
  position: relative;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
}

.preview-spinner {
  width: 2rem;
  height: 2rem;
  border: 2px solid #4a4b60;
  border-top: 2px solid #9d59e7;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.preview-loading p {
  color: #9ca3af;
  margin: 0;
  font-size: 0.875rem;
}

/* Vista previa de imágenes */
.preview-image-container {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
}

.preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.5rem;
}

/* Vista previa de videos */
.preview-video-container {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
}

.preview-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.5rem;
}

/* Vista previa de PDF */
.preview-pdf-container {
  position: relative;
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
}

.preview-pdf-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  text-align: center;
}

.pdf-icon {
  font-size: 4rem;
  opacity: 0.8;
}

.pdf-info h4 {
  color: #e0e0e0;
  margin: 0 0 0.5rem 0;
  font-size: 1.125rem;
  font-weight: 600;
}

.pdf-info p {
  color: #9ca3af;
  margin: 0 0 1rem 0;
  font-size: 0.875rem;
}

.btn-preview-pdf {
  background-color: #9d59e7;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-preview-pdf:hover {
  background-color: #8a46d4;
  transform: scale(1.05);
}

/* Vista previa genérica */
.preview-generic-container {
  position: relative;
  width: 100%;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
}

.preview-generic-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  text-align: center;
}

.generic-icon {
  font-size: 3rem;
  opacity: 0.8;
}

.generic-info h4 {
  color: #e0e0e0;
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

.generic-info p {
  color: #9ca3af;
  margin: 0;
  font-size: 0.75rem;
}

/* Overlay para tipo de archivo */
.preview-overlay {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  border-radius: 0.5rem;
  padding: 0.25rem 0.75rem;
}

.preview-type {
  color: #e0e0e0;
  font-size: 0.75rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Animaciones para las vistas previas */
.preview-image-container,
.preview-video-container,
.preview-pdf-container,
.preview-generic-container {
  transition: all 0.3s ease;
}

.preview-image-container:hover,
.preview-video-container:hover {
  transform: scale(1.02);
}

.preview-pdf-container:hover,
.preview-generic-container:hover {
  background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
}

/* Responsive para vistas previas */
@media (max-width: 639px) {
  .file-preview-content {
    min-height: 150px;
  }

  .preview-image-container,
  .preview-video-container {
    height: 200px;
  }

  .preview-pdf-container,
  .preview-generic-container {
    height: 120px;
  }

  .preview-pdf-content {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .pdf-icon {
    font-size: 3rem;
  }

  .preview-generic-content {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
  }

  .generic-icon {
    font-size: 2rem;
  }

  .generic-info h4 {
    max-width: 150px;
    font-size: 0.875rem;
  }

  .preview-overlay {
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.125rem 0.5rem;
  }

  .preview-type {
    font-size: 0.625rem;
  }
}

/* Estilos para información del repositorio */
.repo-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Asegurar que el input de commit tenga el mismo ancho que el repositorio destino */
#commitMessage {
  width: 100%;
  box-sizing: border-box;
}

/* Estilos para el campo de token */
.token-help {
  margin-top: 0.5rem;
}

.token-help small {
  color: #9ca3af;
  font-size: 0.75rem;
  line-height: 1.4;
}

.repo-destination {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background-color: rgba(32, 33, 47, 0.6);
  border: 1px solid #4a4b60;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
}

.repo-destination:hover {
  background-color: rgba(157, 89, 231, 0.1);
  border-color: #9d59e7;
}

.repo-icon {
  font-size: 1.5rem;
  opacity: 0.8;
}

.repo-text {
  color: #e0e0e0;
  font-weight: 500;
  font-size: 1rem;
}

/* Indicador de ruta automática */
.path-indicator {
  margin-top: 1rem;
  padding: 1rem;
  background-color: rgba(52, 211, 153, 0.1);
  border: 1px solid #34d399;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.path-indicator-icon {
  font-size: 1.25rem;
}

.path-indicator-content h4 {
  color: #34d399;
  margin: 0 0 0.25rem 0;
  font-size: 0.875rem;
  font-weight: 600;
}

.path-indicator-content p {
  color: #9ca3af;
  margin: 0;
  font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 639px) {
  .file-upload-content {
    gap: 0.5rem;
  }

  .file-upload-icon {
    font-size: 2rem;
  }

  .file-upload-title {
    font-size: 1rem;
  }

  .file-upload-subtitle {
    font-size: 0.75rem;
  }

  .file-info-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .file-name {
    white-space: normal;
    word-break: break-all;
  }

  .repo-destination {
    padding: 0.75rem;
    gap: 0.5rem;
  }

  .repo-icon {
    font-size: 1.25rem;
  }

  .repo-text {
    font-size: 0.875rem;
  }

  .path-indicator {
    padding: 0.75rem;
    gap: 0.5rem;
  }

  .path-indicator-icon {
    font-size: 1rem;
  }

  .path-indicator-content h4 {
    font-size: 0.75rem;
  }

  .path-indicator-content p {
    font-size: 0.625rem;
  }
}
