/* Estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.contenedor {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Barra superior */
.barra-superior {
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.barra-superior h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.barra-superior i {
    margin-right: 10px;
}

.ruta-actual {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Controles */
.controles {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.form-subir, .form-carpeta {
    display: flex;
    gap: 10px;
    align-items: center;
}
.btn-subir-archivos {
    background: linear-gradient(135deg, #4a6cf7, #7a52e0);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.btn-subir-archivos:hover {
    background: linear-gradient(135deg, #3a5ce6, #6a42d0);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-subir-archivos i {
    font-size: 1rem;
}

/* Barra de progreso */
.barra-progreso-contenedor {
    width: 100%;
    background-color: #f1f1f1;
    border-radius: 4px;
    margin-top: 10px;
    display: none;
}

.barra-progreso {
    width: 0%;
    height: 20px;
    background: linear-gradient(135deg, #4a6cf7, #7a52e0);
    border-radius: 4px;
    text-align: center;
    line-height: 20px;
    color: white;
    font-size: 12px;
    transition: width 0.3s;
}

.info-subida {
    margin-top: 5px;
    font-size: 0.8rem;
    color: #666;
}

.btn {
    background: linear-gradient(135deg, #4a6cf7, #7a52e0);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    background: linear-gradient(135deg, #3a5ce6, #6a42d0);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn i {
    font-size: 1rem;
}

input[type="text"], input[type="file"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    flex-grow: 1;
    min-width: 200px;
}

/* Navegación de rutas */
.navegacion-rutas {
    background-color: white;
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.navegacion-rutas a {
    color: #4a6cf7;
    text-decoration: none;
    transition: color 0.2s;
}

.navegacion-rutas a:hover {
    color: #7a52e0;
    text-decoration: underline;
}

/* Contenido */
.contenido {
    background-color: white;
    border-radius: 0 0 8px 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mensaje-vacio {
    text-align: center;
    padding: 50px 20px;
    color: #777;
}

.mensaje-vacio i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #ddd;
}

.mensaje-vacio p {
    font-size: 1.1rem;
}

/* Lista de archivos */
.lista-archivos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.elemento {
    background-color: #f9fafc;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
    border: 1px solid #e1e5eb;
    position: relative;
    overflow: hidden;
    user-select: none; /* Evitar selección de texto al hacer doble click */
    cursor: pointer;
}

.elemento:hover {
    background-color: #f0f4ff;
    transform: translateY(-2px);
}

.icono {
    text-align: center;
    margin-bottom: 10px;
}

.icono i {
    font-size: 3rem;
    color: #4a6cf7;
}

.elemento[data-tipo="carpeta"] .icono i {
    color: #ff9a3c;
}

.elemento[data-tipo="carpeta"] {
    cursor: pointer;
}

.elemento[data-tipo="archivo"] {
    cursor: default;
}

/* Efecto visual al hacer click */
.elemento:active {
    transform: translateY(0);
}


.nombre {
    font-weight: 600;
    text-align: center;
    margin-bottom: 10px;
    word-break: break-word;
}

.detalles {
    font-size: 0.8rem;
    color: #777;
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.acciones {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.btn-accion {
    background: none;
    border: none;
    color: #777;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-accion:hover {
    background-color: #f0f2f7;
    color: #4a6cf7;
}

/* Modales */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-contenido {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.modal h2 {
    margin-bottom: 15px;
    color: #4a6cf7;
}

.modal p {
    margin-bottom: 20px;
}

.modal-botones {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.btn-cancelar {
    background: #f0f2f7;
    color: #555;
}

.btn-cancelar:hover {
    background: #e1e5eb;
}

.btn-aceptar {
    background: #4a6cf7;
    color: white;
}

.btn-aceptar:hover {
    background: #3a5ce6;
}

/* Responsivo */
@media (max-width: 768px) {
    .barra-superior {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .controles {
        flex-direction: column;
    }
    
    .lista-archivos {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

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

.contenido {
    animation: fadeIn 0.3s ease;
}
.resultados-subida {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #6c757d;
}

.resultados-subida h3 {
    margin-bottom: 10px;
    color: #495057;
}

.resultados-subida ul {
    list-style-type: none;
}

.resultados-subida li {
    padding: 5px 0;
    border-bottom: 1px solid #dee2e6;
}

.resultados-subida li.exito {
    color: #28a745;
}

.resultados-subida li.error {
    color: #dc3545;
}
/* Estilos para selección múltiple */
.checkbox-seleccion {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: none;
}

.elemento:hover .checkbox-seleccion {
    display: block;
}

.modo-seleccion .checkbox-seleccion {
    display: block;
}

.modo-seleccion .elemento {
    position: relative;
    border: 2px solid #4a6cf7;
}

.modo-seleccion .acciones {
    display: none;
}

.controles-multiples {
    margin: 15px 0;
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-eliminar-multiples {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.btn-descargar-multiples {
    background: linear-gradient(135deg, #28a745, #218838);
}
/* Estilos para la barra de selección múltiple */
.controles-multiples {
    display: none;
    align-items: center;
    gap: 15px;
    margin: 10px 0;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #4a6cf7;
}

#contador-seleccionados {
    font-weight: bold;
    margin-right: auto;
    color: #495057;
}

.btn-eliminar-multiples {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.btn-eliminar-multiples:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
}

/* Estilo para elementos seleccionados */
.elemento.seleccionado {
    border: 2px solid #4a6cf7 !important;
    background-color: #f0f5ff;
}

.checkbox-seleccion {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    transform: scale(1.3);
}

/* Estilos para el modal de enlaces */
.modal-contenido {
    max-width: 600px;
}

.input-enlace {
    display: flex;
    margin: 20px 0;
}

.input-enlace input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
}

.btn-copiar {
    background: #4a6cf7;
    color: white;
    border: none;
    padding: 0 15px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-copiar:hover {
    background: #3a5ce6;
}

.btn-copiar i {
    margin-right: 5px;
}

.btn-logout {
    background: transparent;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    width: 20px;
}