body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  position: relative;
}

h1 {
  color: #333;
}

.top-right {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
}

.top-left {
  position: absolute;
  top: 20px;
  left: 20px;
  background: white;
  padding: 10px;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#upload-btn {
  background-color: #007bff;
  border: none;
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  margin-right: 10px;
}

#upload-btn svg {
  fill: white;
}

.progress {
  width: 200px;
  background-color: #e0e0e0;
  border-radius: 5px;
  overflow: hidden;
  margin-right: 10px;
}

.progress-bar {
  height: 20px;
  background-color: #007bff;
  width: 0%;
}

#file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 1000px;
}

.file-item {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  padding: 15px;
  text-align: center;
  position: relative;
}

.file-item video, .file-item img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 10px;
  max-height: 80vh; /* Limitar la altura máxima al 80% de la altura de la ventana */
  object-fit: contain; /* Ajustar contenido al contenedor */
}

.file-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.file-item .title {
  font-size: 16px;
  font-weight: bold;
  color: #333;
}

.file-item .menu {
  position: relative;
}

.menu-button {
  font-size: 24px;
  cursor: pointer;
}

.menu-button svg {
  fill: #333;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 160px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 1;
  right: 0;
  border-radius: 8px;
}

.dropdown-content .btn {
  background-color: transparent;
  color: black;
  border: none;
  padding: 8px 16px;
  cursor: pointer;
  margin: 5px;
  width: calc(100% - 10px);
  text-align: left;
}

.dropdown-content .btn:hover {
  background-color: #f1f1f1;
}

.show {
  display: block;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0, 0, 0);
  background-color: rgba(0, 0, 0, 0.4);
  padding-top: 60px;
}

.modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 700px;
  position: relative;
}

.close-button {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close-button:hover,
.close-button:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

#modal-video {
  width: 100%;
}

#drop-area {
  border: 2px dashed #007bff;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
}

.upload-item {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.upload-item .progress {
  width: 70%;
}

.cancel-btn {
  background-color: #ff4b5c;
  border: none;
  color: white;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 5px;
}

.cancel-btn:hover {
  background-color: #ff0000;
}

.file-name {
  display: inline-block;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.indicator {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background-color: red; /* Inicialmente en rojo */
  margin-left: 10px;
}

/* Estilos para dispositivos móviles */
@media (max-width: 600px) {
  #file-grid {
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }

  .file-item video, .file-item img {
      max-height: 50vh; /* Limitar la altura máxima al 50% de la altura de la ventana en dispositivos móviles */
  }
}

/* Estilos para el modal de renombrar archivos */
#rename-modal {
  display: none;
  position: fixed;
  z-index: 2;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
  padding-top: 60px;
}

#rename-modal .modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 400px;
  position: relative;
}

#rename-modal h2 {
  margin-top: 0;
}

#rename-modal label {
  display: block;
  margin: 10px 0 5px;
}

#rename-modal input[type="text"] {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

#rename-modal button {
  padding: 10px 15px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#rename-modal button:hover {
  background-color: #0056b3;
}

